0

I want to have something like:

House:
      type: object
      properties:
        id:
          #unique identifier of the house
          $ref: './schemas/common.yaml#/Id'
        name:
          type: string
          description: name that identifies the house
          example: House1
        type:
          type: string
          description: type of house
          example: Detached
       value:
          #amount of money that is to be paid for the house
          $ref: './schemas/common.yaml#/Money'

Would it be a bad practice to use "type" as the name of the third attribute? What other options do I have? What is the best practice in this case?

There is this other question on the same: How to name a property using a reserved keyword in OpenApi/Swagger/YAML but I wonder if anything has changed for openAPI v3.0 and what does "when java code is generated, if find type method is already defined" comment means in the answer section.

Thank you.

User2130
  • 555
  • 1
  • 6
  • 16

0 Answers0