Skip to content

Conversation

aaa2000
Copy link
Contributor

@aaa2000 aaa2000 commented Oct 12, 2025

Q A
Branch? main
Tickets Closes #7019
License MIT
Doc PR Is documentation needed for this feature?

When an entity is marked as readonly (via Doctrine’s [#Entity(readOnly: true)]), API Platform should automatically exclude write-related operations (PUT, PATCH) from the generated OpenAPI documentation. This aligns with Doctrine’s behavior, where readonly entities are skipped during updates but still allow creation and deletion.

Changes:

OpenAPI documentation now omits PUT and PATCH operations for entities marked as readonly.
POST and DELETE operations remain available, matching Doctrine’s semantics.

@dunglas
Copy link
Member

dunglas commented Oct 12, 2025

Good idea.

@aaa2000 aaa2000 force-pushed the feat-7019-doctrine-readonly branch from 7e80c37 to 610265f Compare October 12, 2025 17:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Doctrine] Not include write operations for readonly entities

2 participants