zch93 opened a new pull request, #507:
URL: https://github.com/apache/flink-kubernetes-operator/pull/507

   ## What is the purpose of the change
   
   *This PR will resolve the CRD reference generation process. Currently the 
CRD reference generator does not respect JsonProperty annotation in case of 
enums (eg.: `public enum JobState`) which means the procedure generates the 
name of the ENUM instead of the value of the particular json property (eg.: 
`SUSPENDED` instead of suspended from `@JsonProperty("suspended")`). With these 
modifications generator will return with the values of the json properties in 
case of enums.*
   
   
   ## Brief change log
   
   #### In `CrdReferenceDoclet` class:
     - A new method added: `getJsonPropValueOfEnum(Element e)`
     - Call the `getJsonPropValueOfEnum(Element e)` inside the `public Void 
scan(Element e, Integer depth)` method
   
   ## Verifying this change
   
     - First I suggest to check the current version here: 
[/custom-resource/reference/](https://nightlies.apache.org/flink/flink-kubernetes-operator-docs-main/docs/custom-resource/reference/)
     - Then checkout this PR and
     - Run the `mvn clean install -Pgenerate-docs -DskipTests` command within 
the `/flink-kubernetes-operator` (so from the top level within the project)
     - After it returned with **success**, then you can go to the 
`/flink-kubernetes-operator/docs` folder and
     - Run the `hugo -b "" serve` command (for more information about this and 
about the pre-reqs, please check this [READ 
ME](https://github.com/apache/flink-kubernetes-operator/tree/main/docs#build-the-site-locally))
     - After you built the site locally, you can check the changes at 
`http://localhost:1313/`
   
   *Example:*
   
   #### 1. Before changes:
   
   <img width="777" alt="Screenshot 2023-01-18 at 15 17 13" 
src="https://user-images.githubusercontent.com/73717102/213194689-01b8ffa6-5c8a-4657-b562-5e1eccf636db.png";>
   
   #### 2. After changes:
   
   <img width="750" alt="Screenshot 2023-01-18 at 15 17 24" 
src="https://user-images.githubusercontent.com/73717102/213194723-d72d50b1-a90c-48ed-87b7-4518ffea1fca.png";>
   
   ## Does this pull request potentially affect one of the following parts:
   
     - Dependencies (does it add or upgrade a dependency): no
     - The public API, i.e., is any changes to the `CustomResourceDescriptors`: 
no
     - Core observer or reconciler logic that is regularly executed: no
   
   ## Documentation
   
     - Does this pull request introduce a new feature? yes (new method within 
`CrdReferenceDoclet` class)
     - If yes, how is the feature documented? not documented
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to