Replies: 1 comment
-
I succeed to do something, not very pretty, but it's work... i'm opened to a better idea if someone has :) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I need to develop a plugin to handle custom properties in my openapi contracts.
For example i have a custom property to handle item writable only on create operation (x-createOnly) or on update operation (x-updateOnly).
I want x-createOnly items to be displayed in model/example only for a POST body, and x-updateOnly for PUT body.
I target only openapi 3.1 schema.
I'm able to handle my custom properties for the model wrapping function fn.jsonSchema202012.getProperties and using a custom context to know in which context function is called (get, post, put).
To handle it for examples, i thought to wrap fn.jsonSchema202012.getSampleSchema to modify my schema before generate the example, but i'm not able to use hook in this function to know the context.
Do i miss something or is there a better solution to handle my case?
Beta Was this translation helpful? Give feedback.
All reactions