Skip to content

readOnly on nested objectsΒ #6537

@joerghaubrichs

Description

@joerghaubrichs
Description

Apparently the readOnly property is ignored for definitions of type object. In my example, SomeDefinition has a property someSubObject, which is an object and should be readOnly. So I would expect someSubObject to be in the list of readOnlyVars for SomeDefinition, but instead I find it in the readWriteVars list.

The other readOnly property, someString, is correctly listed in readOnlyVars and not in readWriteVars.

Is there something wrong with the definition, or is this a bug?

Swagger-codegen version

2.2.3

Swagger declaration file content or url
definitions:
  SomeDefinition:
    type: object
    properties:
      someString:
        readOnly: true
        type: string
      someSubObject:
        readOnly: true
        type: object
        properties:
          someProperty:
            type: string

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions