Versions Compared

Key

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

...

OpenAPI Required Properties

By In OpenAPI 3 by default, all object properties are optional. You can specify the required properties Required properties can be identified in the required list:  

Code Block
languageyml
themeMidnight
components: 
  schemas:
    Policy:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
      required:
        - id

...