Skip to content

JSON Schemas generated by API Platform should include additionalProperties: false #3382

Description

@quentinus95

API Platform version(s) affected: 2.5.1

Description
Today, JSON Schemas generated by API-Platform do not include additionalProperties: false. This reduces type saftey when using a code generator.

How to reproduce
Create an ApiResource in a new project, check the generated Swagger documentation. The JSON Schema generated for the ApiResource does not include additionalProperties: false.

Possible Solution
Simply add additionalProperties: false when generating the schema.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions