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

Add option to read swagger spec directly from URL #99

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Tradunsky
Copy link

Springfox swagger does generation of swagger.json at runtime, because of that we need to run app to get that file and refresh DapperDox. With this simple param, DapperDox will receive fresh swagger spec directly from the service running with springfox.

@Tradunsky
Copy link
Author

ok, first build has failed because of running with master version of spec.go and config.go, but main.go is from serve-spec-by-url. So, I decided to separate main.go part into separate PR after this one is merged.

as about this build, I've got confused.. not sure what is the root cause of such error, need to investigate.

@Tradunsky
Copy link
Author

@zxchris Please take a look

@frinka
Copy link

frinka commented May 14, 2019

@Tradunsky How is this different from providing a URL to the spec-filename parameter? For instance, we use -spec-filename=https://our-app.oursite.com/v2/api-docs, which is where the swagger.json is hosted by springfox. You would still need to restart DapperDox either way to get the latest the version, right?

@Tradunsky
Copy link
Author

@frinka Sorry for late response.
ok, I didn't know that in spec-filename you can specify an URL to resource, moreover, according to doc, you also would need to specify spec-dir where that files are located.
Are you sure that URL is supported? If so, it looks a bit confusing. Not sure if even correcting doc can help in this design approach.

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

Successfully merging this pull request may close these issues.

None yet

2 participants