Skip to content

API fails swagger validation  #4010

@stevegt

Description

@stevegt

Either I'm doing something wrong or the API (as of d94472e) is not currently emitting swagger-compliant JSON. This is causing problems when trying to use various parsers and client generators/libraries to create gitea clients, as they try to validate when parsing. The error messages I'm getting vary by library, but as a simple check, try this:

$ curl https://try.gitea.io/swagger.v1.json > swagger.v1.json 
$ npm install -g swagger-cli
$ swagger-cli validate swagger.v1.json 
Swagger schema validation failed. 
  Missing required property: description at #/responses/parameterBodies
 
JSON_OBJECT_VALIDATION_FAILED

I've tried other parsers and validators, both CLI and online, and get different errors; still trying to figure out if there's any common denominator other than PEBCAK. Anyone else seeing this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/bugtype/docsThis PR mainly updates/creates documentation

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions