-
Notifications
You must be signed in to change notification settings - Fork 23
[OpenAPI Generator] Enable allow-list for API and Model classes #530
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Moved stale PR to personal fork. |
…s-and-models # Conflicts: # datamodel/openapi/openapi-generator/src/main/java/com/sap/cloud/sdk/datamodel/openapi/generator/GenerationConfigurationConverter.java
MatKuhr
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
generally lgtm. However, allow-list is not ideal for our purposes. E.g. for orchestration we already have 47 files, and typically we would want to only exclude a few files from generation.
Did you check the options for block-list? Maybe using .openapi-generator-ignore can be made to work?
...ain/java/com/sap/cloud/sdk/datamodel/openapi/generator/GenerationConfigurationConverter.java
Outdated
Show resolved
Hide resolved
...st/java/com/sap/cloud/sdk/datamodel/openapi/generator/DataModelGeneratorIntegrationTest.java
Outdated
Show resolved
Hide resolved
| version: 1.0.0 | ||
| description: API for managing sodas in a soda store | ||
| paths: | ||
| /sodas: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(minor) since there is only one API, this only tests that NotExist doesn't cause the generation to fail..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand the implication of this statement
...or/src/test/resources/DataModelGeneratorIntegrationTest/generate-models/input/sodastore.yaml
Outdated
Show resolved
Hide resolved
…elGeneratorIntegrationTest/generate-models/input/sodastore.yaml Co-authored-by: Matthias Kuhr <[email protected]>
newtork
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After realizing the allow/block-listing of model classes leads to non-compileable code, I'm hesitant to introduce this feature. I feel like we need to go back to the drawing board.
…s' into openapi/allowlist-apis-and-models
Please find similar setting names in the original OpenAPI generator.
Usage:
additionalPropertiesdefinemodelsToGenerateandapisToGenerate. Use<space>or,as delimiter.Note:
SodasApi.java, theapisToGeneratefield should containSodas(without suffix),apisToGenerateis not defined, all APIs are allowed. Same withmodelsToGenerate.Definition of Done
Error handling created / updated & covered by the tests aboveDocumentation updatedRelease notes updated