Azure / autorest.csharp

Extension for AutoRest (https://github.com/Azure/autorest) that generates C# code
MIT License
142 stars 166 forks source link

ERROR: Schema violation: Additional properties not allowed: value #193

Open shrutikanda opened 5 years ago

shrutikanda commented 5 years ago

ERROR: Schema violation: Additional properties not allowed: value


{
    "swagger": "2.0",
    "info": {
        "version": "1.0.0",
        "title": "Simple API"
    },
    "produces": [
        "application/json"
    ],
    "paths": {
        "/getIntegers": {
            "get": {
                "operationId": "list",
                "description": "Gets those integers.",
                "x-ms-pageable": {
                    "nextLinkName": "nextIntegersUrl",
                    "value": "payload",
                    "operationName": "listMore"
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/PagedIntegerCollection"
                        }
                    }
                }
            }
        }
    },
    "definitions": {
        "PagedIntegerCollection": {
            "description": "Page of integers.",
            "type": "object",
            "properties": {
                "payload": {
                    "type": "array",
                    "items": {
                        "type": "integer"
                    }
                },
                "nextIntegersUrl": {
                    "type": "string"
                }
            }
        }
    }
}
shrutikanda commented 5 years ago

Command I am trying is :

autorest --input-file=swagger.json --csharp --azure-validator --azure-arm --azureresourceschema --openapi-type=arm --output-folder=Pagination --namespace=test

JonathanWilbur commented 5 years ago

Yeah, I think additionalProperties should be permitted in the JSON schema.

Danya25 commented 10 months ago

Any updates about this problem?