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

[SPIKE] Resolve $ref in api/controller/route specs #435

Closed
bajtos opened this issue Jul 13, 2017 · 6 comments
Closed

[SPIKE] Resolve $ref in api/controller/route specs #435

bajtos opened this issue Jul 13, 2017 · 6 comments

Comments

@bajtos
Copy link
Member

bajtos commented Jul 13, 2017

At the moment, our code processing Swagger/OpenAPI Spec does not support $ref references, we assume all entities have been denormalized/dereferenced. IMO, this is a severe limitation because even the simples CRUD-based REST APIs usually reuse model (response object) definitions.

We should investigate how to support $ref in all places allowed by OpenAPI spec. Let's limit the scope to relative references only (e.g. #/definitions/User) and exclude external references (e.g. http://json-schema.org/address).

Acceptance Criteria

  • Establish agreement of the virtual OpenAPI Spec / $ref resolution
  • What's the target OpenAPI Spec we're resolving against.
  • Consistency between top-down and bottom-up approach
  • Contributing Artifacts: Controller, Models, OpenAPI Spec, others?
@stale
Copy link

stale bot commented Jun 13, 2018

This issue has been marked stale because it has not seen activity within six months. If you believe this to be in error, please contact one of the code owners, listed in the CODEOWNERS file at the top-level of this repository. This issue will be closed within 30 days of being stale.

@stale stale bot added the stale label Jun 13, 2018
@virkt25
Copy link
Contributor

virkt25 commented Jun 14, 2018

@bajtos @jannyHou is this still an issue with the migration to OAS3?

@stale stale bot removed the stale label Jun 14, 2018
@raymondfeng
Copy link
Contributor

raymondfeng commented Jun 14, 2018

swagger-parser now supports openapi 3.0 with dereference. We should use it.

See https://github.com/BigstickCarpet/swagger-parser/blob/master/docs/swagger-parser.md#dereferenceapi-options-callback

@bajtos
Copy link
Member Author

bajtos commented Jul 23, 2018

I am keeping this in CoreGA scope, I'd like to know the estimate before deciding whether to keep or push out this feature.

@bajtos bajtos added the p2 label Jul 30, 2018
@virkt25 virkt25 changed the title Resolve $ref in api/controller/route specs [SPIKE] Resolve $ref in api/controller/route specs Aug 7, 2018
@dhmlau dhmlau removed the non-DP3 label Aug 23, 2018
@stale
Copy link

stale bot commented Sep 20, 2019

This issue has been marked stale because it has not seen activity within six months. If you believe this to be in error, please contact one of the code owners, listed in the CODEOWNERS file at the top-level of this repository. This issue will be closed within 30 days of being stale.

@stale stale bot added the stale label Sep 20, 2019
@stale
Copy link

stale bot commented Oct 20, 2019

This issue has been closed due to continued inactivity. Thank you for your understanding. If you believe this to be in error, please contact one of the code owners, listed in the CODEOWNERS file at the top-level of this repository.

@stale stale bot closed this as completed Oct 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants