galasa-dev / projectmanagement

Project Management repo for Issues and ZenHub
7 stars 3 forks source link

openapi2beans to support AnyOf #1901

Open Wyvinar opened 2 weeks ago

Wyvinar commented 2 weeks ago

Story

As a Galasa developer, I want to be able to use the AnyOf section to create and interface within java that my any of objects can inherit off

Background

We have a schema within the openapi yaml that has the any of tag:

    Resources:
      type: object
      properties:
        action:
          type: string
          enum: ["apply","create","update","delete"]
        data:
          type: array
          description: An array of Galasa Resources that should contain one or more entrys matching any of the schemas outlined
          items:
            anyOf:
              - $ref: '#/components/schemas/GalasaProperty'

and it currently isn't being generated as a jave bean using openapi2beans. so the basic structure of an any of:

AnyOfArray:
  type: array
  items:
    anyOf:
      [list of properties/schemas or references]

Tasks