Support forum for ASP.NET Zero (
By banksearch
#25411 Normally, swagger reads the Data Annotations and shows whether the property is required or not in the documentation as below:

Code: Select all"definitions": {
    "TodoItem": {
        "required": [
        "type": "object",
        "properties": {
            "id": {
                "format": "int64",
                "type": "integer"
            "name": {
                "type": "string"
            "isComplete": {
                "default": false,
                "type": "boolean"

But as the web apis are generated dynamically this does not seem to be working.

Even I have the [Required] attribute in some properties, swagger document seems to totally ignores those.

Any idea why?