On Wednesday, 13 September 2017 15:03:37 UTC-4, Silviu Dicu wrote:
>
> Hello,
>
> I started to use pyramid_swagger - 
> http://pyramid-swagger.readthedocs.io/en/latest/index.html for an api 
> project, which works quite
> nice but I didn't figure it out how can I mount it under a specific url. 
> I'm using the composite:main and the config I have is
>
>  [composite:main]
>  use = egg:rutter#urlmap
>  /marketing = marketing
>  / = api
>
> The swagger is configured as
>
> settings['pyramid_swagger.base_path_api_docs'] = 'api/'
> settings['pyramid_swagger.schema_directory'] = 'api/api_docs/'
> settings['pyramid_swagger.schema_file'] = 'swagger.json'
> settings['pyramid_swagger.enable_api_doc_views'] = True
> settings['pyramid_swagger.swagger_versions'] = '2.0'
> settings['pyramid_swagger.use_models'] = True
>
> All this works ... however if I want to use something like
>
>
>  [composite:main]
>  use = egg:rutter#urlmap
>  /marketing = marketing
> * /apiv1 = api*
>
> Swagger will not make available the swagger_data['X'] where X is a 
> resource ... hence is not enabled.
>
> Is any way to configure pyramid swagger for this problem ?
>
> thanks.
>
>

Found the problem ... basically the swagger will kick in only for the path 
that is defined as basePath from the definition (swagger.json).
Pyramid was happy to mount the app under any path.  

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pylons-discuss+unsubscr...@googlegroups.com.
To post to this group, send email to pylons-discuss@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pylons-discuss/f9ea74e3-79ab-402e-acc5-d09e3c7c260a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to