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

Make well-known Open API description locations list more easily configurable #360

Closed
tlmii opened this issue Jul 7, 2020 · 2 comments · Fixed by #424
Closed

Make well-known Open API description locations list more easily configurable #360

tlmii opened this issue Jul 7, 2020 · 2 comments · Fixed by #424
Labels
5.0-dash Potential final items for 5.0 enhancement New feature or request
Milestone

Comments

@tlmii
Copy link
Member

tlmii commented Jul 7, 2020

Right now we have a hard-coded list of well-known URLs to query when looking for the OpenAPI description file:

private const string SwaggerSearchPaths = "swagger.json|swagger/v1/swagger.json|openapi.json|/swagger.json|/swagger/v1/swagger.json|/openapi.json";

We also have a(n undocumented) preference the user can set - swagger.searchPaths - to override the defaults completely.

It would be nice to allow the user to add entries to the list if they have a common pattern they use/see/like without blowing away the existing list (or needing to type it all back in). It might also be nice to allow them to remove entries from the list if they know they'll never encounter them to prevent extra network traffic when trying to connect. Same thing could go for just reordering them.

@tlmii tlmii added the enhancement New feature or request label Jul 7, 2020
@tlmii tlmii changed the title Make well-known Open API description locations list configurable Make well-known Open API description locations list more easily configurable Jul 20, 2020
@tlmii tlmii added the 5.0-dash Potential final items for 5.0 label Oct 22, 2020
@tlmii
Copy link
Member Author

tlmii commented Oct 22, 2020

My proposal here is this:

Two additional preferences, so that the complete set is

  1. swagger.removeFromSearchPaths - pipe-delimited list that removes specific entries from the default list
  2. swagger.addToSearchPaths - pipe-delimited list that adds new entries to the default list
  3. swagger.searchPaths - the existing preference, which we'll document. A pipe-delimited list that overrides the default list (and the other two preferences) altogether.

@bradygaster
Copy link
Member

hugely agree with this as a feature. love the hyper-configurability of it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
5.0-dash Potential final items for 5.0 enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants