Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

https://openapi-generator.tech/docs/generators/spring/#schema-support-feature 

From the documentation of the openapi generator used in A1PMS, AllOf is not supported for spring server generator. But it still generated objects without the use of extending the parent class. For example:

An extended object in the specification yaml:

Code Block
languageyml
themeMidnight
components:
  schemas:
    Policy:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
    PolicyExtended:
      allOf:
        - $ref: '#/components/schemas/Policy'
        - type: object
          properties:
            description:
              type: string



Code Block
languagejava
themeMidnight
public class Policy {

  private String id;
  private String name;
...
}

public class PolicyExtended {

  private String id;
  private String name;
  private String description;
...
}


...