Burgyn / MMLib.SwaggerForOcelot

This repo contains swagger extension for ocelot.
MIT License
351 stars 93 forks source link

Aggregation schema not full #191

Open zohanidze opened 2 years ago

zohanidze commented 2 years ago

I use custom aggregation with two routes. First route have simple model and schema is ok. But second model is very big and have many object-properties in it. This Object-properties is not load in output schema and this objects appear as null. For example, profile has list of addresses. And model of address can not been appeared in schema.

swagger

"Aggregates": [ { "RouteKeys": [ "accountV1Settings", "accountV1Me" ], "Description": "Account descriptions", "UpstreamPathTemplate": "/gw/api/acc" } ],

Burgyn commented 2 years ago

Hi,

Are the properties in the original downstream documentation?

zohanidze commented 2 years ago

Hi!

Ocelot config: ocelot.zip

Original Json-Model for accountMe: accountMe.zip

Burgyn commented 2 years ago

Hi,

please can you attach origin OpenApi schema definition of address type? (you've probably attached an example from swagger ui)

thanks.

zohanidze commented 2 years ago

originJson.zip Hi, attach origin OpenApi schema definition.

thanks.

Burgyn commented 2 years ago

Hi,

it appears that indirectly referenced types are not included in the resulting scheme. I will try fix it next week.

zohanidze commented 2 years ago

thanks!

Burgyn commented 2 years ago

After much research, I found that it is not easy to add such an indirect reference to the resulting scheme. Implementing of this requirement would require several days of work.

I'm sorry, but I don't have time for this right now.

However, I'm open for PR.

zohanidze commented 2 years ago

We will wait for this change in the future. P.S. If I have time, maybe I will look at this problem myself and do PR.

Thanks!

Burgyn commented 2 years ago

Hi,

Thanks. Contributing is welcome.