ebowman / api-first-hand

API-First bootstrapping tool for building RESTful web services from a Swagger/OpenAPI spec
MIT License
142 stars 22 forks source link

Must comment out additionalProperties: false for it to work #54

Closed alexec closed 7 years ago

alexec commented 7 years ago

No following schema fails to compile

  failureResponse:
    type: object
    properties:
      reason:
        type: string
        maxLength: 255
        description: a simple description for the failure
    required:
    - reason
    # additionalProperties: false
rror] (compile:swaggerParseSpec) com.fasterxml.jackson.core.JsonParseException: Can not instantiate value of type [simple type, class de.zalando.swagger.strictModel$Schema] from Boolean value (false); no single-boolean/Boolean-arg constructor/factory method
[error]  at [Source: N/A; line: -1, column: -1] (through reference chain: de.zalando.swagger.Schema["additionalProperties"]) through reference chain: paths → /customer-subscriptions → post → responses → default → schema
LappleApple commented 7 years ago

Hi @alexec, sorry for the delay in response. How would you like us to proceed?

slavaschmidt commented 7 years ago

@alexec, as for now we do not support OpenAPI 3.0 The definition of additionalProperties as false is invalid in Swagger 2.0 Please refer to https://github.com/OAI/OpenAPI-Specification/issues/668 for further explanations