Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
denis-sokolov opened this issue Jan 22, 2018 · 6 comments
Open

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

denis-sokolov opened this issue Jan 22, 2018 · 6 comments

Comments

@denis-sokolov
Copy link
Contributor

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
Copy link

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

@seth9874
Copy link

Also wondering about news on this feature.

@martinsson
Copy link

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
Copy link

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
Copy link

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

@martinsson
Copy link

martinsson commented May 5, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants