Skip to content

Support setting description on object properties #165

@dennisameling

Description

@dennisameling

As part of the OpenAPI 3 spec, it's supported to set a description on object properties:

  "components" : {
    "schemas" : {
      "DummyObject" : {
        "type" : "object",
        "additionalProperties" : false,
        "properties" : {
          "dummy_property" : {
            "type" : "string",
            "format" : "date-time",
            "example" : "2022-12-30T12:00:00Z",
            "description": "Fancy description here" <-- This one
          },
          "dummy_property_two" : {
            "type" : "string",
            "format" : "date-time",
            "example" : "2022-12-30T12:15:00Z"
          },
        },
        "required" : [ "dummy_property"]
      }
  }

However, this library doesn't seem to support that. Please let me know if I missed something here though. I found things like @OpenApiName, @OpenApiExample and @OpenApiPropertyType, but couldn't find anything to set a description. I also tried with the @Custom annotation which I came across in your tests, but it doesn't seem to have any effect on the generated spec.

Thanks in advance! 😊

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions