temando / serverless-openapi-documentation

Serverless 1.0 plugin to generate OpenAPI V3 documentation from serverless configuration
MIT License
93 stars 127 forks source link

Support $ref: {{model: Foo}} as in Swagger 2 plugin #19

Open denis-sokolov opened 6 years ago

denis-sokolov commented 6 years ago

In Swagger 2 plugin I can reference models in other models. Most commonly, when an endpoint response model is an array containing item models. See the issue at the serverless-aws-documentation.

When I run serverless openapi generate on such configuration, I get this error:

could not dereference value as a json pointer or uri: {{model: Foo}}

Feel free to close this issue if this is not going to be added soon, but I want something to refer to and to maybe have someone explain to me why I’m wrong. :-)

whisller commented 6 years ago

Any news about this issue? Is there a plan to implement it?

seth9874 commented 6 years ago

Also wondering about news on this feature.

martinsson commented 3 years ago

Does anyone know of a work-around for this?

Currently we're deploying the service to amazon, then we're exporting the openapi doc from the deployed version. While this works it is very slow. Additionaly we use the openapi doc for generating the DTOs that our frontend needs. This workflow forces us to deploy the backend before we compile and test the front...

martinsson commented 3 years ago

This is now supported in a forked version

https://www.npmjs.com/package/@martinsson/serverless-openapi-documentation

There are some other additions too, fixing a bug where the requestModels property was ignored. It also has tests for those features

gus-tavo01 commented 2 years ago

Hi @martinsson would you accept any PR on your repo?

martinsson commented 2 years ago

Sure

On Wed, May 4, 2022, 9:24 PM Gustavo Loera Vazquez @.***> wrote:

Hi @martinsson https://github.com/martinsson would you accept any PR on your repo?

— Reply to this email directly, view it on GitHub https://github.com/temando/serverless-openapi-documentation/issues/19#issuecomment-1117735436, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABMPQBTDKG56DFFEBIQNFLVILFG5ANCNFSM4EM2HJ7A . You are receiving this because you were mentioned.Message ID: @.***>