[jira] [Commented] (ATLAS-3594) Invalid Swagger Specifications in Atlas Swagger.json
[ https://issues.apache.org/jira/browse/ATLAS-3594?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17022076#comment-17022076 ] Siddharth Singh commented on ATLAS-3594: Errors Corrected * Invalid Default values in Schemas * UN-necessary escape \/ in paths * HTML Escape characters in description * Conflicting Operation IDS [^apacheAtlas.json] > Invalid Swagger Specifications in Atlas Swagger.json > > > Key: ATLAS-3594 > URL: https://issues.apache.org/jira/browse/ATLAS-3594 > Project: Atlas > Issue Type: Bug > Components: atlas-core >Affects Versions: 2.0.0 > Environment: Ubuntu >Reporter: Siddharth Singh >Priority: Major > Labels: rest, swagger > Attachments: apacheAtlas.json > > > Swagger specification provided in > [https://atlas.apache.org/api/v2/ui/swagger.json] are invalid and one cannot > generate a client from them. > There happens to be invalid schema. > > Steps to reproduce: > * Download Apache Atlas Swagger Specs > * Open any Swagger Code generating Utility and Generate a Client for the same > > Sample output from go-swagger on parsing the file > {code:java} > swagger generate client -f api/apacheAtlas.json >> output.txt > 2020/01/22 16:54:01 validating spec api/apacheAtlas.json > The swagger spec at "api/apacheAtlas.json" is invalid against swagger > specification 2.0. see errors : > - > "paths./v2/entity/uniqueAttribute/type/{typeName}/classifications.post.parameters" > must validate one and only one schema (oneOf). Found none valid > - > paths./v2/entity/uniqueAttribute/type/{typeName}/classifications.post.parameters.in > in body should be one of [header] > - > "paths./v2/entity/uniqueAttribute/type/{typeName}/classifications.put.parameters" > must validate one and only one schema (oneOf). Found none valid > - > paths./v2/entity/uniqueAttribute/type/{typeName}/classifications.put.parameters.in > in body should be one of [header] > - "paths./v2/glossary.get.responses.200" must validate one and only one > schema (oneOf). Found none valid > - paths./v2/glossary.get.responses.200.example in body is a forbidden property > - "paths./v2/glossary.post.responses.200" must validate one and only one > schema (oneOf). Found none valid > - paths./v2/glossary.post.responses.200.example in body is a forbidden > property > - "paths./v2/glossary.post.responses.400" must validate one and only one > schema (oneOf). Found none valid > - paths./v2/glossary.post.responses.400.example in body is a forbidden > property > - "paths./v2/glossary.post.responses.409" must validate one and only one > schema (oneOf). Found none valid > - paths./v2/glossary.post.responses.409.example in body is a forbidden > property > - "paths./v2/search/saved.post.responses.201" must validate one and only one > schema (oneOf). Found none valid > - paths./v2/search/saved.post.responses.201.example in body is a forbidden > property > - "paths./v2/search/saved.put.responses.204" must validate one and only one > schema (oneOf). Found none valid > - paths./v2/search/saved.put.responses.204.example in body is a forbidden > property > - "paths./v2/search/saved.get.responses.200" must validate one and only one > schema (oneOf). Found none valid > - paths./v2/search/saved.get.responses.200.example in body is a forbidden > property > - "paths./v2/types/entitydef/guid/{guid}.get.parameters" must validate one > and only one schema (oneOf). Found none valid > - paths./v2/types/entitydef/guid/{guid}.get.parameters.in in body should be > one of [header] > - "paths./v2/types/entitydef/guid/{guid}.get.responses.200" must validate one > and only one schema (oneOf). Found none valid > - paths./v2/types/entitydef/guid/{guid}.get.responses.200.example in body is > a forbidden property > - "paths./v2/types/entitydef/guid/{guid}.get.responses.404" must validate one > and only one schema (oneOf). Found none valid > - paths./v2/types/entitydef/guid/{guid}.get.responses.404.example in body is > a forbidden property > - "paths./v2/entity/guid/{guid}/classifications.post.parameters" must > validate one and only one schema (oneOf). Found none valid > - paths./v2/entity/guid/{guid}/classifications.post.parameters.in in body > should be one of [header] > - "paths./v2/entity/guid/{guid}/classifications.put.parameters" must validate > one and only one schema (oneOf). Found none valid > - paths./v2/entity/guid/{guid}/classifications.put.parameters.in in body > should be one of [header] > - "paths./v2/entity/guid/{guid}/classifications.get.parameters" must validate > one and only one schema (oneOf). Found none valid > - paths./v2/entity/guid/{guid}/classifications.get.parameters.in in body > should be one of [header] > - "paths./v2/entity/guid/{guid}/classifications.get.responses.200"
[jira] [Commented] (ATLAS-3594) Invalid Swagger Specifications in Atlas Swagger.json
[ https://issues.apache.org/jira/browse/ATLAS-3594?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17021816#comment-17021816 ] Siddharth Singh commented on ATLAS-3594: There is another issue for some paths, for example {color:#9876aa}/v2/entity/\{guid}/audit gets the audit events by guid, then why is guid is set to required false when it is clearly required, this causes the generation to fail {color} > Invalid Swagger Specifications in Atlas Swagger.json > > > Key: ATLAS-3594 > URL: https://issues.apache.org/jira/browse/ATLAS-3594 > Project: Atlas > Issue Type: Bug > Components: atlas-core >Affects Versions: 2.0.0 > Environment: Ubuntu >Reporter: Siddharth Singh >Priority: Major > Labels: rest, swagger > > Swagger specification provided in > [https://atlas.apache.org/api/v2/ui/swagger.json] are invalid and one cannot > generate a client from them. > There happens to be invalid schema. > > Steps to reproduce: > * Download Apache Atlas Swagger Specs > * Open any Swagger Code generating Utility and Generate a Client for the same > > Sample output from go-swagger on parsing the file > {code:java} > swagger generate client -f api/apacheAtlas.json >> output.txt > 2020/01/22 16:54:01 validating spec api/apacheAtlas.json > The swagger spec at "api/apacheAtlas.json" is invalid against swagger > specification 2.0. see errors : > - > "paths./v2/entity/uniqueAttribute/type/{typeName}/classifications.post.parameters" > must validate one and only one schema (oneOf). Found none valid > - > paths./v2/entity/uniqueAttribute/type/{typeName}/classifications.post.parameters.in > in body should be one of [header] > - > "paths./v2/entity/uniqueAttribute/type/{typeName}/classifications.put.parameters" > must validate one and only one schema (oneOf). Found none valid > - > paths./v2/entity/uniqueAttribute/type/{typeName}/classifications.put.parameters.in > in body should be one of [header] > - "paths./v2/glossary.get.responses.200" must validate one and only one > schema (oneOf). Found none valid > - paths./v2/glossary.get.responses.200.example in body is a forbidden property > - "paths./v2/glossary.post.responses.200" must validate one and only one > schema (oneOf). Found none valid > - paths./v2/glossary.post.responses.200.example in body is a forbidden > property > - "paths./v2/glossary.post.responses.400" must validate one and only one > schema (oneOf). Found none valid > - paths./v2/glossary.post.responses.400.example in body is a forbidden > property > - "paths./v2/glossary.post.responses.409" must validate one and only one > schema (oneOf). Found none valid > - paths./v2/glossary.post.responses.409.example in body is a forbidden > property > - "paths./v2/search/saved.post.responses.201" must validate one and only one > schema (oneOf). Found none valid > - paths./v2/search/saved.post.responses.201.example in body is a forbidden > property > - "paths./v2/search/saved.put.responses.204" must validate one and only one > schema (oneOf). Found none valid > - paths./v2/search/saved.put.responses.204.example in body is a forbidden > property > - "paths./v2/search/saved.get.responses.200" must validate one and only one > schema (oneOf). Found none valid > - paths./v2/search/saved.get.responses.200.example in body is a forbidden > property > - "paths./v2/types/entitydef/guid/{guid}.get.parameters" must validate one > and only one schema (oneOf). Found none valid > - paths./v2/types/entitydef/guid/{guid}.get.parameters.in in body should be > one of [header] > - "paths./v2/types/entitydef/guid/{guid}.get.responses.200" must validate one > and only one schema (oneOf). Found none valid > - paths./v2/types/entitydef/guid/{guid}.get.responses.200.example in body is > a forbidden property > - "paths./v2/types/entitydef/guid/{guid}.get.responses.404" must validate one > and only one schema (oneOf). Found none valid > - paths./v2/types/entitydef/guid/{guid}.get.responses.404.example in body is > a forbidden property > - "paths./v2/entity/guid/{guid}/classifications.post.parameters" must > validate one and only one schema (oneOf). Found none valid > - paths./v2/entity/guid/{guid}/classifications.post.parameters.in in body > should be one of [header] > - "paths./v2/entity/guid/{guid}/classifications.put.parameters" must validate > one and only one schema (oneOf). Found none valid > - paths./v2/entity/guid/{guid}/classifications.put.parameters.in in body > should be one of [header] > - "paths./v2/entity/guid/{guid}/classifications.get.parameters" must validate > one and only one schema (oneOf). Found none valid > - paths./v2/entity/guid/{guid}/classifications.get.parameters.in in body > should be one of [header] > -
[jira] [Commented] (ATLAS-3594) Invalid Swagger Specifications in Atlas Swagger.json
[ https://issues.apache.org/jira/browse/ATLAS-3594?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17021012#comment-17021012 ] Siddharth Singh commented on ATLAS-3594: Removing the example property from path lets it work > Invalid Swagger Specifications in Atlas Swagger.json > > > Key: ATLAS-3594 > URL: https://issues.apache.org/jira/browse/ATLAS-3594 > Project: Atlas > Issue Type: Bug > Components: atlas-core >Affects Versions: 2.0.0 > Environment: Ubuntu >Reporter: Siddharth Singh >Priority: Major > Labels: rest, swagger > > Swagger specification provided in > [https://atlas.apache.org/api/v2/ui/swagger.json] are invalid and one cannot > generate a client from them. > There happens to be invalid schema. > > Steps to reproduce: > * Download Apache Atlas Swagger Specs > * Open any Swagger Code generating Utility and Generate a Client for the same > > Sample output from go-swagger on parsing the file > {code:java} > swagger generate client -f api/apacheAtlas.json >> output.txt > 2020/01/22 16:54:01 validating spec api/apacheAtlas.json > The swagger spec at "api/apacheAtlas.json" is invalid against swagger > specification 2.0. see errors : > - > "paths./v2/entity/uniqueAttribute/type/{typeName}/classifications.post.parameters" > must validate one and only one schema (oneOf). Found none valid > - > paths./v2/entity/uniqueAttribute/type/{typeName}/classifications.post.parameters.in > in body should be one of [header] > - > "paths./v2/entity/uniqueAttribute/type/{typeName}/classifications.put.parameters" > must validate one and only one schema (oneOf). Found none valid > - > paths./v2/entity/uniqueAttribute/type/{typeName}/classifications.put.parameters.in > in body should be one of [header] > - "paths./v2/glossary.get.responses.200" must validate one and only one > schema (oneOf). Found none valid > - paths./v2/glossary.get.responses.200.example in body is a forbidden property > - "paths./v2/glossary.post.responses.200" must validate one and only one > schema (oneOf). Found none valid > - paths./v2/glossary.post.responses.200.example in body is a forbidden > property > - "paths./v2/glossary.post.responses.400" must validate one and only one > schema (oneOf). Found none valid > - paths./v2/glossary.post.responses.400.example in body is a forbidden > property > - "paths./v2/glossary.post.responses.409" must validate one and only one > schema (oneOf). Found none valid > - paths./v2/glossary.post.responses.409.example in body is a forbidden > property > - "paths./v2/search/saved.post.responses.201" must validate one and only one > schema (oneOf). Found none valid > - paths./v2/search/saved.post.responses.201.example in body is a forbidden > property > - "paths./v2/search/saved.put.responses.204" must validate one and only one > schema (oneOf). Found none valid > - paths./v2/search/saved.put.responses.204.example in body is a forbidden > property > - "paths./v2/search/saved.get.responses.200" must validate one and only one > schema (oneOf). Found none valid > - paths./v2/search/saved.get.responses.200.example in body is a forbidden > property > - "paths./v2/types/entitydef/guid/{guid}.get.parameters" must validate one > and only one schema (oneOf). Found none valid > - paths./v2/types/entitydef/guid/{guid}.get.parameters.in in body should be > one of [header] > - "paths./v2/types/entitydef/guid/{guid}.get.responses.200" must validate one > and only one schema (oneOf). Found none valid > - paths./v2/types/entitydef/guid/{guid}.get.responses.200.example in body is > a forbidden property > - "paths./v2/types/entitydef/guid/{guid}.get.responses.404" must validate one > and only one schema (oneOf). Found none valid > - paths./v2/types/entitydef/guid/{guid}.get.responses.404.example in body is > a forbidden property > - "paths./v2/entity/guid/{guid}/classifications.post.parameters" must > validate one and only one schema (oneOf). Found none valid > - paths./v2/entity/guid/{guid}/classifications.post.parameters.in in body > should be one of [header] > - "paths./v2/entity/guid/{guid}/classifications.put.parameters" must validate > one and only one schema (oneOf). Found none valid > - paths./v2/entity/guid/{guid}/classifications.put.parameters.in in body > should be one of [header] > - "paths./v2/entity/guid/{guid}/classifications.get.parameters" must validate > one and only one schema (oneOf). Found none valid > - paths./v2/entity/guid/{guid}/classifications.get.parameters.in in body > should be one of [header] > - "paths./v2/entity/guid/{guid}/classifications.get.responses.200" must > validate one and only one schema (oneOf). Found none valid > - paths./v2/entity/guid/{guid}/classifications.get.responses.200.example in > body is a forbidden