Skip to content

Being able to see the class within an EntityModel as a Schema #453

Closed
@chrisatrotter

Description

@chrisatrotter

Is your feature request related to a problem? Please describe.

When wrapping a class in a EntityModel, then it would be useful to have that class unwrapped and shown as a Schema from the api-docs. This would be similar to how a class in a CollectionModel gets unwrapped and shown as a Schema from the api-docs.

This is how both EntityModel and CollectionModel are currently represented:

EntityModel

"components":{ 
    "schemas":{ 
       "EntityModel_Example_":{ 
          "type":"object",
          "properties":{ 
             ...
             "_links":{ 
                "$ref":"#/components/schemas/Links"
             }
          }
       }
    }
 }

CollectionModel

"components":{ 
    "schemas":{ 
       "CollectionModel_Example_":{ 
          "type":"object",
          "properties":{ 
             "_embedded":{ 
                "type":"object",
                "additionalProperties":{ 
                   "type":"array",
                   "items":{ 
                      "$ref":"#/components/schemas/Example"
                   }
                }
             },
             "_links":{ 
                ...
             }
          }
       },
       "Example":{ 
          "type":"object",
          "properties":{ 
             ...
          }
       }
    }
 }

Describe the solution you'd like
It would be useful to see the class that the EntityModel holds as a Schema.

EntityModel

"components":{ 
    "schemas":{ 
       "EntityModel_Example_":{ 
          "type":"object",
          "properties":{
             ...
             "_links":{ 
                "$ref":"#/components/schemas/Links"
             },
          }
       },
       "Example":{ 
          "type":"object",
          "properties":{
             ...
          }
       }
    }
 }

Describe alternatives you've considered
None so far

Additional context
None

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