Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

For JSON:API, the ID is not required in the POST request #6738

Open
cay89 opened this issue Oct 21, 2024 · 4 comments
Open

For JSON:API, the ID is not required in the POST request #6738

cay89 opened this issue Oct 21, 2024 · 4 comments

Comments

@cay89
Copy link
Contributor

cay89 commented Oct 21, 2024

API Platform version(s) affected: 4.0.4

Description
According to the JSON:API documentation, an ID is not required in a POST request, but Api Platform requires it in OpenAPI documentation.

image

Can this be resolved so that the ID is not mandatory in a POST request? It also throws an error when I include an ID.

@cay89 cay89 changed the title For JSON:API, the ID is nor in the POST request For JSON:API, the ID is not required in the POST request Oct 21, 2024
@cay89
Copy link
Contributor Author

cay89 commented Oct 21, 2024

I wouldn't create a new issue, but I don't think the link in the response header is good either:

image

@dunglas
Copy link
Member

dunglas commented Oct 21, 2024

If you didn't disable JSON-LD, this link is expected for autodiscoverability of the Hydra docs.

@cay89
Copy link
Contributor Author

cay89 commented Oct 21, 2024

If you didn't disable JSON-LD, this link is expected for autodiscoverability of the Hydra docs.

I think I turned it off:

image

@dunglas
Copy link
Member

dunglas commented Oct 21, 2024

Indeed, that's a bug then!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants