serverless-openapi-documentation icon indicating copy to clipboard operation
serverless-openapi-documentation copied to clipboard

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

Open denis-sokolov opened this issue 7 years ago • 6 comments

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. :-)

denis-sokolov avatar Jan 22 '18 11:01 denis-sokolov

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

whisller avatar Jul 24 '18 12:07 whisller

Also wondering about news on this feature.

seth9874 avatar Aug 17 '18 20:08 seth9874

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 avatar Oct 15 '20 13:10 martinsson

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

martinsson avatar Oct 22 '20 09:10 martinsson

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

gus-tavo01 avatar May 04 '22 19:05 gus-tavo01

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: @.***>

martinsson avatar May 05 '22 06:05 martinsson