dapperdox icon indicating copy to clipboard operation
dapperdox copied to clipboard

DapperDox not honoring required and additional attributes for properties

Open eduardocampano opened this issue 6 years ago • 0 comments

I've checked several times the generated swagger spec but I cannot get DapperDox to show the appropriate required and maxLength and minLength to be shown in docs

Paths contain this:

"/dogs": {
    "post": {
        "tags": [
            "Dogs"
        ],
        "summary": "Create Dog",
        "operationId": "DogsPost",
        "consumes": [
            "application/json-patch+json",
            "application/json",
            "text/json",
            "application/*+json"
        ],
        "produces": [],
        "parameters": [
            {
                "name": "model",
                "in": "body",
                "required": true,
                "schema": {
                    "$ref": "#/definitions/DogCreateRequest"
                }
            }
        ],
        "responses": {
            "200": {
                "description": "Success"
            }
        }
    }
}

Schema is:

"DogCreateRequest": {
    "title": "DogCreateRequest",
    "required": [
        "name"
    ],
    "type": "object",
    "properties": {
        "name": {
            "title": "String",
            "maxLength": 100,
            "minLength": 0,
            "type": "string"
        }
    }
}

image

eduardocampano avatar May 01 '18 06:05 eduardocampano