podhmo / reflect-openapi

Define OpenAPI with reflect package
Apache License 2.0
3 stars 0 forks source link

run with FORCE=1, skip validation #119

Closed podhmo closed 1 year ago

podhmo commented 1 year ago

currently validation is always called.

$ FORCE=1 make
go generate
2023/01/30 22:30:57 !! EmitDoc (commit): invalid components: schema "AddPetInput": invalid default: property "Pretty" is unsupported
Schema:
  {
    "additionalProperties": false,
    "default": {
      "Pretty": false,
      "name": "foo"
    },
    "properties": {
      "name": {
        "description": "Name of the pet",
        "type": "string"
      },
      "tag": {
        "description": "Type of the pet",
        "type": "string"
      }
    },
    "required": [
      "name"
    ],
    "title": "AddPetInput",
    "type": "object",
    "x-go-type": "main.AddPetInput"
  }

Value:
  {
    "Pretty": false,
    "name": "foo"
  }
exit status 1
podhmo commented 1 year ago

this is not library behaviour