-
Notifications
You must be signed in to change notification settings - Fork 419
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
Swagger spec still invalid #1180
Comments
Which deploy are you using? The swagger validator seems to pass on the dev server as well as with the 7.0.0dev. Can you give me some details about the deploy you are using? Are there any plugins enabled? https://online.swagger.io/validator/debug?url=https://kinto.dev.mozaws.net/v1/__api__ |
The provided Smwogger code example also seems to work with the current master and the dev server. |
The one on staging is the one we're having problems with |
Is it https://kinto.dev.mozaws.net/ ? It seems to pass swagger validator and I was able to use the smwogger release version with it. Can you confirm the result? >>> import asyncio
>>> from smwogger import API
>>>
>>>
>>> async def print_operations():
... async with API('https://kinto.dev.mozaws.net/v1/__api__') as api:
... print(api.operations)
...
>>> loop = asyncio.get_event_loop()
>>> try:
... loop.run_until_complete(print_operations())
... finally:
... loop.close()
...
['__heartbeat__', '__lbheartbeat__', '__version__', 'batch', 'contribute', 'create_attachment', 'create_bucket', 'create_collection', 'create_flush', 'create_group', 'create_portier-login', 'create_portier-verify', 'create_record', 'create_stepfunction', 'delete_attachment', 'delete_bucket', 'delete_buckets', 'delete_collection', 'delete_collections', 'delete_group', 'delete_groups', 'delete_history', 'delete_record', 'delete_records', 'get_bucket', 'get_buckets', 'get_changess', 'get_collection', 'get_collections', 'get_fxa-oauth-login', 'get_fxa-oauth-params', 'get_fxa-oauth-token', 'get_group', 'get_groups', 'get_history', 'get_openapi_spec', 'get_permissionss', 'get_record', 'get_records', 'patch_bucket', 'patch_collection', 'patch_group', 'patch_record', 'server_info', 'update_bucket', 'update_collection', 'update_group', 'update_record'] |
No, it's https://kinto.stage.mozaws.net |
@gabisurita note that the swagger validator at swagger.io passes even with this issue, as it seems more relax on this problem for some reason. |
I got it. It's related to the blocklist plugin. I'll investigated it. Related to: Cornices/cornice.ext.swagger#68 |
The Swagger spec is still invalid it seems
Extract:
In this API definitions, smwogger will choke on api_ver and metrics because their definitions in the parameter list should not include the regexp and just be the name of the parameter
The right definition should be
To validate that it works, you can try this small program with Smowgger to print all operations:
cc @gabisurita @chartjes
The text was updated successfully, but these errors were encountered: