You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Swagger is unable to generate Http client for a swagger 3.0 specification.
I have downloaded the swagger pre-compiled binary. I am trying to generate the API client using the instructions present here: https://goswagger.io/generate/client.html
The link for requirements details certain dependencies that must be got using go get. However, it is not clear if these are required during the generation process itself.
The below code snippet provides the command executed and the corresponding output
swagger generate client -f https://raw.githubusercontent.com/goharbor/pluggable-scanner-spec/master/api/spec/scanner-adapter-openapi-v1.0.yaml
2019/12/27 11:31:27 validating spec https://raw.githubusercontent.com/goharbor/pluggable-scanner-spec/master/api/spec/scanner-adapter-openapi-v1.0.yaml
The swagger spec at "https://raw.githubusercontent.com/goharbor/pluggable-scanner-spec/master/api/spec/scanner-adapter-openapi-v1.0.yaml" is invalid against swagger specification . see errors :
- .components in body is a forbidden property
- .openapi in body is a forbidden property
- .servers in body is a forbidden property
- "paths./metadata.get.responses.200" must validate one and only one schema (oneOf). Found none valid
- paths./metadata.get.responses.200.content in body is a forbidden property
- "paths./metadata.get.responses.500" must validate one and only one schema (oneOf). Found none valid
- paths./metadata.get.responses.500.content in body is a forbidden property
- paths./scan.post.requestBody in body is a forbidden property
- "paths./scan.post.responses.400" must validate one and only one schema (oneOf). Found none valid
- paths./scan.post.responses.400.content in body is a forbidden property
- "paths./scan.post.responses.422" must validate one and only one schema (oneOf). Found none valid
- paths./scan.post.responses.422.content in body is a forbidden property
- "paths./scan.post.responses.500" must validate one and only one schema (oneOf). Found none valid
- paths./scan.post.responses.500.content in body is a forbidden property
- "paths./scan.post.responses.202" must validate one and only one schema (oneOf). Found none valid
- paths./scan.post.responses.202.content in body is a forbidden property
- "paths./scan/{scan_request_id}/report.get.parameters" must validate one and only one schema (oneOf). Found none valid
- paths./scan/{scan_request_id}/report.get.parameters.style in body is a forbidden property
- paths./scan/{scan_request_id}/report.get.parameters.explode in body is a forbidden property
- paths./scan/{scan_request_id}/report.get.parameters.in in body should be one of [body]
- paths./scan/{scan_request_id}/report.get.parameters.example in body is a forbidden property
- "paths./scan/{scan_request_id}/report.get.responses.500" must validate one and only one schema (oneOf). Found none valid
- paths./scan/{scan_request_id}/report.get.responses.500.content in body is a forbidden property
- "paths./scan/{scan_request_id}/report.get.responses.200" must validate one and only one schema (oneOf). Found none valid
- paths./scan/{scan_request_id}/report.get.responses.200.content in body is a forbidden property
- "paths./scan/{scan_request_id}/report.get.responses.302" must validate one and only one schema (oneOf). Found none valid
- paths./scan/{scan_request_id}/report.get.responses.302.headers.Refresh-After.schema in body is a forbidden property
- paths./scan/{scan_request_id}/report.get.responses.302.headers.Refresh-After.type in body is required
- .swagger in body is required
Environment
version: v0.21.0
commit: 7c0fc3ee340f9d99d85573bc54a57e303a639692
chaitra@ALPHA-CENTAURI:/tmp/swaggersample$ go version
go version go1.13.1 linux/amd64
chaitra@ALPHA-CENTAURI:/tmp/swaggersample$
OS: Ubtuntu 18.04```
The text was updated successfully, but these errors were encountered:
Swagger is unable to generate Http client for a swagger 3.0 specification.
I have downloaded the swagger pre-compiled binary. I am trying to generate the API client using the instructions present here:
https://goswagger.io/generate/client.html
The link for requirements details certain dependencies that must be got using
go get
. However, it is not clear if these are required during the generation process itself.Requirements link : https://goswagger.io/generate/requirements.html
Swagger specification
Swagger specification can be found here:
https://raw.githubusercontent.com/goharbor/pluggable-scanner-spec/master/api/spec/scanner-adapter-openapi-v1.0.yaml
Steps to reproduce
The below code snippet provides the command executed and the corresponding output
Environment
The text was updated successfully, but these errors were encountered: