Open iandelahorne opened 6 years ago
Still a problem:
$ swagger generate client -f https://esi.tech.ccp.is/swagger.json
The swagger spec at "https://esi.tech.ccp.is/swagger.json" is invalid against swagger specification 2.0. see errors :
- must validate one and only one schema (oneOf)
- must validate one and only one schema (oneOf)
- type in paths./versions/.get.responses.200.schema is required
- type in paths./versions/.get.responses.200.schema is required
- must validate one and only one schema (oneOf)
- must validate one and only one schema (oneOf)
- type in paths./versions/.get.responses.200.schema is required
- type in paths./versions/.get.responses.200.schema is required
- must validate one and only one schema (oneOf)
- must validate one and only one schema (oneOf)
- type in paths./versions/.get.responses.200.schema is required
- type in paths./versions/.get.responses.200.schema is required
- must validate one and only one schema (oneOf)
- must validate one and only one schema (oneOf)
- type in paths./versions/.get.responses.200.schema is required
- type in paths./versions/.get.responses.200.schema is required
Luckily it is a very easy fix:
curl https://esi.tech.ccp.is/swagger.json -O
Edit swagger.json. Look for:
{
"/versions/": {
"get": {
"responses": {
"200": {
"schema": {
// Add the following:
"type": "array",
// ...
}
}
}
}
}
}
Then go-swagger will happily consume the file.
This was used with:
swagger version
version: 0.13.0
commit: 8135eb6728e43b73489e80f94426e6d387809502
And the ESI swagger.json specification used was the one available at 2017-12-15 20:18 UTC.
I also forgot to talk about the main swagger-API, not just the meta:
$ curl https://esi.tech.ccp.is/latest/swagger.json -O
$ swagger generate client -f swagger.json
The swagger spec at "swagger.json" is invalid against swagger specification 2.0. see errors :
- type in /killmails/{killmail_id}/{killmail_hash}/.victim is required
- type in /characters/{character_id}/fittings/ is required
This is an issue with github.com/go-openapi/validate, and I am filing a bug and failing test case for them. Having the nested "items" object within an array (which uses the "items" swagger keyword) is what is causing these to fail; and it seems to be go-specific.
I will provide a link once I file the bug against that project.
meta spec titles & types have been updated
The issue I filed is at: https://github.com/go-openapi/validate/issues/43
Workaround is to simply delete the get
response example in /characters/{character_id}/fittings/
; similarly for /killmails/{killmail_id}/{killmail_hash}/
which will allow go-swagger to successfully generate the code.
The swagger specification is invalid, according to latest go-swagger against latest swagger.json:
The second error,
/corporations/{corporation_id}/containers/logs/.logged_at
, is due to one of the exampleslogged_at
missing aZ
at the end of (i e2017-10-11T12:04:33
->2017-10-11T12:04:33Z
As for the other two, no idea why those are failing.