cloud-sdk-java icon indicating copy to clipboard operation
cloud-sdk-java copied to clipboard

[OpenAPI Generator] Enable allow-list for API and Model classes

Open newtork opened this issue 1 year ago • 0 comments

Usage:

  • In additionalProperties define includeApis and includeModels. Use <space> or , as delimiter.
<plugin>
  <groupId>com.sap.cloud.sdk.datamodel</groupId>
  <artifactId>openapi-generator-maven-plugin</artifactId>
  <configuration>
    <additionalProperties>
      <includeApis>Sodas,Orders</includeApis>
      <includeModels>
        Order
        OrderWithTimestamp
        Soda
        SodaWithId
      </includeModels>
    </additionalProperties>

Note:

  • To enable the generation of file SodasApi.java, the includeApis field should contain Sodas (without suffix),
  • If includeApis is not defined, all APIs are allowed. Same with includeModels.
  • The "include" prefix was chosen with regards to OData similar settings for <includeEntitySets> and <includeFunctionImports>

newtork avatar Aug 09 '24 19:08 newtork