Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

apigateway: Deployment of model without any required field fails #27433

Closed
tmplcl opened this issue Oct 6, 2023 · 2 comments
Closed

apigateway: Deployment of model without any required field fails #27433

tmplcl opened this issue Oct 6, 2023 · 2 comments
Labels
@aws-cdk/aws-apigateway Related to Amazon API Gateway bug This issue is a bug. closed-for-staleness This issue was automatically closed because it hadn't received any attention in a while. p3 response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.

Comments

@tmplcl
Copy link

tmplcl commented Oct 6, 2023

Describe the bug

When deploying an API Gateway Model validator without any required fields the deployment fails for this resource.

When I add any field to the required block the deployment works.

Expected Behavior

The deployment of the API Gateway Model succeeds.

Current Behavior

The deployment of the API Gateway Model fails and throws the following error.

Resource handler returned message: "Invalid model specified: Validation Result: warnings : [], errors : [Invalid modelschema specified] (Service: ApiGateway, Status Code: 400, Request ID: (RequestToken: , HandlerErrorCode: InvalidRequest)

Reproduction Steps

Deploy API Gateway Model:

new apigateway.Model(this, 'model-validator', {
      restApi: this.apigateway,
      contentType: 'application/json',
      description: 'desc'
      modelName: 'model',
      schema: {
        type: JsonSchemaType.OBJECT,
        required: [],
        properties: {
          description: { type: apigateway.JsonSchemaType.STRING }
        }
    }
}

Possible Solution

No response

Additional Information/Context

No response

CDK CLI Version

2.99.1

Framework Version

No response

Node.js Version

v18.17.1

OS

Mac OS

Language

Typescript

Language Version

No response

Other information

No response

@tmplcl tmplcl added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Oct 6, 2023
@github-actions github-actions bot added the @aws-cdk/aws-apigateway Related to Amazon API Gateway label Oct 6, 2023
@peterwoodworth
Copy link
Contributor

I don't understand the bug report - If you need to fill in this property for your model, then supply it.

Do you think this shouldn't be throwing an error? Do you think required should be required?

@peterwoodworth peterwoodworth added response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. and removed needs-triage This issue or PR still needs to be triaged. labels Oct 6, 2023
@github-actions
Copy link

github-actions bot commented Oct 8, 2023

This issue has not received a response in a while. If you want to keep this issue open, please leave a comment below and auto-close will be canceled.

@github-actions github-actions bot added closing-soon This issue will automatically close in 4 days unless further comments are made. closed-for-staleness This issue was automatically closed because it hadn't received any attention in a while. and removed closing-soon This issue will automatically close in 4 days unless further comments are made. labels Oct 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-apigateway Related to Amazon API Gateway bug This issue is a bug. closed-for-staleness This issue was automatically closed because it hadn't received any attention in a while. p3 response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.
Projects
None yet
Development

No branches or pull requests

3 participants