Skip to content

Autogenerated CRUD API should omit Id fields for adding new entities by POST #736

@vbg8exadel

Description

@vbg8exadel

Description and expected behavior
I used to use Spring Data Rest which does generate the CRUD API out of managed entity classes. They correctly omit Id fields from POST operations where we add new entity to the DB. The Id is autogenerated either by DB or by the framework code. Therefore, the API should not ask for the Id to be provided as part of the request.

Screenshots
Here is a typical example:
image

Environment (please complete the following information):

  • ZenStack version: 1.0.2
  • Prisma version: 5.3.1
  • Database type: Postgresql

Additional context
Even though the Id marked as required in the Open API, actual POST /entity doesn't fail for request without Id, which is correct.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions