-
Notifications
You must be signed in to change notification settings - Fork 47
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 Support For Not Enabling Spec View #208
Comments
Routes and views are not registered by So I'm not sure what the problem is, can you provide more detail? |
A route and view is added when you register your spec which you can see here: pyramid_openapi3/pyramid_openapi3/__init__.py Line 251 in 6e9c6b7
By default a view is added and you can see the spec file. I had to disable it by committing the config and adding my own afterwards, but it would be nice if it was optional by the library. If there’s a different way to setup the library without creating a view let me know. I poked around and didn’t see anything so I followed what was in the README |
Ahhh, now I see, you mean the route/view for the Swagger UI, I thought you meant the routes/views for endpoint defined in If you wanna contribute this feature, having |
No that’s for the OpenAPI yaml file. The swagger UI registration has its own endpoint which is here: pyramid_openapi3/pyramid_openapi3/__init__.py Line 148 in 6e9c6b7
The link I sent previously creates a route/view for the YAML file which you can see here: pyramid_openapi3/pyramid_openapi3/__init__.py Line 248 in 6e9c6b7
It’s generating a new view where the YAML file is the response. |
Ah, yes, you are correct, long day here, sorry. |
All good! I’ve been out on vacation, but I don’t mind making these changes when I get back and opening up a PR for them if that sounds like a good idea to you. |
A |
Hey @zach-hamm, do you want to keep working on this, or should I close the issue? |
I was hoping to update the
config.pyramid_openapi3_spec
directive so that it registers the spec file to the library, but doesn't enable the route/view. The reason being is we need to perform some filtering on our spec file to determine if you have access to see all of the contents or not. Alternatively, there could be another way to just register the spec file without creating a view for it like:config.pyramid_openapi3_register_spec
The text was updated successfully, but these errors were encountered: