Skip to content

AWS ApiGateway compatibility #3193

@MLDMoritz

Description

@MLDMoritz

API Platform version(s) affected:
"api-platform/core": "^2.5",

Description
When I try to import the schema from http://localhost/api/docs.json?api_gateway=true to ApiGateway it errors.

How to reproduce
Create an Entity which has a normalizationGroup, get the api_gateway "compatible" json spec and try to import it.

Possible Solution
Entity name has colon in it, which API Gateway doesn't allow.

Additional Context

Error Message from APIGateway importer:

Your API was not imported due to errors in the Swagger file.
Unable to create model for 'ConfirmEmailconfirmEmail:write': Model name must be alphanumeric: ConfirmEmailconfirmEmail:write
Unable to create model for 'EmailCheck:b7add851abebff79e75557aab315cdc2emailCheck:read': Model name must be alphanumeric: EmailCheck:b7add851abebff79e75557aab315cdc2emailCheck:read
Unable to create model for 'EmailCheckemailCheck:write': Model name must be alphanumeric: EmailCheckemailCheck:write
Unable to create model for 'GenerateTokengenerateToken:write': Model name must be alphanumeric: GenerateTokengenerateToken:write
Unable to create model for 'RefreshTokenrefreshToken:write': Model name must be alphanumeric: RefreshTokenrefreshToken:write
Unable to create model for 'Register:5b4fa5b4800265236a947e59c5cd3661register:read': Model name must be alphanumeric: Register:5b4fa5b4800265236a947e59c5cd3661register:read
Unable to create model for 'Registerregister:write': Model name must be alphanumeric: Registerregister:write
Unable to create model for 'Userregister:read': Model name must be alphanumeric: Userregister:read
Unable to create model for 'Useruser:read': Model name must be alphanumeric: Useruser:read
Unable to put method 'POST' on resource at path '/api/confirm_email': Invalid model identifier specified: null
Unable to put method 'POST' on resource at path '/api/email_check': Invalid model identifier specified: null
Unable to put method 'POST' on resource at path '/api/register': Invalid model identifier specified: null
Unable to put method 'PUT' on resource at path '/api/users/{id}/change_email': Invalid model identifier specified: null
Unable to put method 'PUT' on resource at path '/api/users/{id}/change_password': Invalid model identifier specified: null
Unable to put method 'POST' on resource at path '/token/generate': Invalid model identifier specified: null
Unable to put method 'POST' on resource at path '/token/refresh': Invalid model identifier specified: null
Additionally, these warnings were found:
API Key security definition 'apiKey' has unexpected name or location. Ignoring.
Unknown or invalid reference specified by '#/definitions/ConfirmEmailconfirmEmail:write'. Ignoring.
Unknown or invalid reference specified by '#/definitions/EmailCheckemailCheck:write'. Ignoring.
Unknown or invalid reference specified by '#/definitions/Registerregister:write'. Ignoring.
Unknown or invalid reference specified by '#/definitions/RequestPasswordReset:7f546cb601bbd9e0eb1a7cfa305ea7fb'. Ignoring.
Invalid format for model application/json for method POST
Unknown or invalid reference specified by '#/definitions/Useruser:read'. Ignoring.
Unable to create model for 200 response to method 'GET /api/users': Invalid model specified: Validation Result: warnings : [], errors : [Invalid model specified: Useruser:read]
Unknown or invalid reference specified by '#/definitions/Useruser:read'. Ignoring.
Invalid format for model application/json for method GET
Unknown or invalid reference specified by '#/definitions/ChangeEmail:5bab9375ca064bc028c7d4f29f2eaf2f'. Ignoring.
Unknown or invalid reference specified by '#/definitions/ChangePassword:b12382e7dd54bc0f641b9ded532416fc'. Ignoring.
Unknown or invalid reference specified by '#/definitions/GenerateTokengenerateToken:write'. Ignoring.
Unknown or invalid reference specified by '#/definitions/RefreshTokenrefreshToken:write'. Ignoring.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions