Skip to content

if 'anyOf' is imported to AWS API Gateway, schema-level validations are silently omitted by Gateway #25

Open
@issmith1

Description

@issmith1

This is a note for awareness. 'anyOf' definition is not supported in AWS API Gateway.
A workaround is to pre-process the interface spec to remove the anyOf structure.
https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-known-issues.html

Also note that for 'anyOf', neither swagger nor OpenAPI generators (openapi-generator-cli-4.3.1, swagger-codegen-cli-3.2.0 and 3.2.1) create correct code for the language spring. I didn't test other languages.

OpenAPI Codegen had issues with inheritance which appear to be closed for some languages but other languages seem to be lacking contributors. OpenAPITools/openapi-generator#2845

It seems that anyOf is being used so that industry can augment the spec which makes sense.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions