Skip to content

airframe-http-codegen: complex object parameter should be optional if the default value is defined #2149

@xerial

Description

@xerial

model class:

case class SubmitQueryRequest(query:String, params:Map[String, Any]=Map.empty, ulid:ULID = ULID.newULID)

Generated openapi.yaml:

components:
  schemas:
    SubmitQueryRequest:
      type: object
      required:
        - query
        - params <<-- this should not be here
        - ulid << -- this should not be here
      properties:
        query:
          type: string
        params:
          type: object
          additionalProperties:
            type: string
        ulid:
          type: object
          required:
            - ulid
          properties:
            ulid:
              type: string

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions