-
Hi, In one of my downstream services, I have an API Endpoint which has a polymorphic model (base and sub types). When I configure the services.AddSwaggerGen in my downstream service to UseOneOfForPolymorphism(), the schemas aren't generated in the OpenAPI JSON schema hence are not displayed in the Gateway Swagger UI. When I navigate to the Swagger UI directly to my downstream service it correctly displays the polymorphic model in the UI (and obviously the OpenAPI JSON has the various subtype models listed under schemas). Does the SwaggerForOcelot not support UseOneOfForPolymorphism() in the downstream services? I'm using the following versions:
|
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 1 reply
-
Hi, thank you for your question. Unfortunately, this package does not support Thanks. |
Beta Was this translation helpful? Give feedback.
-
Thanks Burgyn for the quick reply. I've created a quick simple API which demonstrates the Polymorphic API endpoint (called api/events) and have added the swagger.Json in the readme. You can access the solution at https://github.com/assadf/PolymorphicAPI. |
Beta Was this translation helpful? Give feedback.
-
Hi @assadf, thanks for your demo. Please can you try |
Beta Was this translation helpful? Give feedback.
-
@Burgyn, it's working beautifully. Thanks for the quick turnaround on this, you're a star. |
Beta Was this translation helpful? Give feedback.
Hi @assadf,
thanks for your demo. Please can you try
version 3.2.0
?