Currently, OpenAPI swagger documentation supports the definition of extension properties in the @Schema annotation, it is built like a Map<String, Object> and generally allows the OpenAPI user to define customs properties on the documentation.
Expected Behavior
We could use this feature to address which of our attributes is a localized attribute by simply defining this annotation:
Multiple extentionProperties can be defined in the same Schema. allowing us to enhance the OpenAPI doc further.
It could also be useful to define the types of relationships in the OpenAPI documentation with something like this:
The reason I'm opening this feature is that I need to send more information to the FrontEnd point of my applications through OpenAPI to handle various situations, such as localized properties and others. By adding the extension property we are able to send all the necessary information and many more, leading to a more customizable experience for OpenAPI definition.
Currently, OpenAPI swagger documentation supports the definition of extension properties in the @Schema annotation, it is built like a Map<String, Object> and generally allows the OpenAPI user to define customs properties on the documentation.
Expected Behavior
We could use this feature to address which of our attributes is a localized attribute by simply defining this annotation:
Multiple extentionProperties can be defined in the same Schema. allowing us to enhance the OpenAPI doc further. It could also be useful to define the types of relationships in the OpenAPI documentation with something like this:
the output of the schema above for a normal attribute will be something like this:
Current Behavior
Currently this feature is not supported on Elide meaning that the openAPI doc ignores this property inside the schema annotation
Possible Solution
A possible solution that can be done is to add inside the JsonApiModelResolver.class a method like this:
Then call it inside the processAttribute and processRelationship method by calling the Schema<?>.setExtensions method like this:
Context
The reason I'm opening this feature is that I need to send more information to the FrontEnd point of my applications through OpenAPI to handle various situations, such as localized properties and others. By adding the extension property we are able to send all the necessary information and many more, leading to a more customizable experience for OpenAPI definition.