Replies: 2 comments
-
I've found that apparently my reading comprehension was lacking, as the link object is defined in the response(s) objects, not the schema. Admittedly, it's the last word on the wiki about additional responses, so I just missed it. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Thanks for reporting back and closing the issue 👍 |
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
-
First check
Description
How can I create Link Objects (https://swagger.io/specification/#linkObject) properly for my models?
My basic User model can be posted with a List[int], of which the int value represents the ID value of a different model (Provider).
I'd like to access the (randomly generated) operationId for the Provider model's
get
endpoint, then put that in alinks
property in the User model. The OpenAPI spec's Link Object allows references to be made, but how do I do this in FastAPI? I can see that Field could do something similar, although I don't know if the end result is properly spec'ed.Beta Was this translation helpful? Give feedback.
All reactions