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

[Swagger] attribute definitions.Dummy.externalDocs is unexpected #878

Closed
maechler opened this issue Dec 11, 2016 · 3 comments
Closed

[Swagger] attribute definitions.Dummy.externalDocs is unexpected #878

maechler opened this issue Dec 11, 2016 · 3 comments

Comments

@maechler
Copy link
Contributor

The swagger online validator is throwing an error on the attribute externalDocs. I have tested this with version 2.0.1 of api-platform/core.

I simply copied the expected value from the following test and put it on a webserver:

test
https://github.com/api-platform/core/blob/master/tests/Swagger/Serializer/DocumentationNormalizerTest.php#L711

produced json
http://www.bit9.ch/apiplatform.json

swagger validator
http://online.swagger.io/validator/debug?url=http://www.bit9.ch/apiplatform.json

{
  "messages": [
    "attribute definitions.Dummy.externalDocs is unexpected",
    "attribute definitions.Dummy_be35824b9d92d1dfc6f78fe086649b8f.externalDocs is unexpected"
  ]
}

The swagger specification seems to allow the attribute externalDocs: http://swagger.io/specification/#schemaObject
Do you know about that error? Is that rather a bug of the swagger online validator?
I have not found anything to that issue so far..

@Simperfit
Copy link
Contributor

It is allowed by the schema and the schema is validated with swagger-cli

I don't know about that error.

Maybe it's not allowed in the definitions anymore ?

@dunglas
Copy link
Member

dunglas commented Dec 12, 2016

It looks like a bug in the online validator. As you pointed out, externalDocs is explicitly allowed by the spec: http://swagger.io/specification/#schemaObject

It should be reported on the validator bug tracker.

@maechler
Copy link
Contributor Author

Thanks for having a look at it!

swagger-api/validator-badge#97

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

No branches or pull requests

3 participants