MMLib.SwaggerForOcelot icon indicating copy to clipboard operation
MMLib.SwaggerForOcelot copied to clipboard

Aggregation schema not full

Open zohanidze opened this issue 3 years ago • 9 comments

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" } ],

zohanidze avatar Oct 01 '21 19:10 zohanidze

Hi,

Are the properties in the original downstream documentation?

Burgyn avatar Oct 04 '21 08:10 Burgyn

Hi!

Ocelot config: ocelot.zip

Original Json-Model for accountMe: accountMe.zip

zohanidze avatar Oct 06 '21 06:10 zohanidze

Hi,

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

thanks.

Burgyn avatar Oct 08 '21 06:10 Burgyn

originJson.zip Hi, attach origin OpenApi schema definition.

thanks.

zohanidze avatar Oct 08 '21 13:10 zohanidze

Hi,

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

Burgyn avatar Oct 12 '21 06:10 Burgyn

thanks!

zohanidze avatar Oct 13 '21 08:10 zohanidze

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.

Burgyn avatar Oct 22 '21 05:10 Burgyn

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!

zohanidze avatar Oct 22 '21 06:10 zohanidze

Hi,

Thanks. Contributing is welcome.

Burgyn avatar Oct 22 '21 07:10 Burgyn