Provide a `resource_type` route parameter (e.g. for openapi, jsonapi_schema)

Created on 29 January 2020, almost 5 years ago
Updated 18 July 2024, 6 months ago

Open API tries to upcast the resource_type parameter, which JSON:API Resource routes do not attach. This causes a crash in Open API. One thing we could do is take the first _jsonapi_resource_types value and set that as the default. It isn't perfect, and still causes issues for custom resource types. But it prevents Open API from crashing.

✨ Feature request
Status

Postponed

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States mglaman WI, USA

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡ΈUnited States bradjones1 Digital Nomad Life

    OpenAPI for JSON:API is getting a complete rewrite so I think this may no longer be necessary.

  • πŸ‡―πŸ‡΅Japan ptmkenny

    Something to consider: while debugging ✨ Support JSON:API filters Needs work and trying to filter a resource, I was getting lots of errors until I realized that the first element of the array is used as the resource type, as noted in #5. Since _jsonapi_resource_types is an array, I had (wrongly) assumed that order didn't matter and put all the types in alphabetical order.

    It would be great to find a way to make this more clear to devs.

Production build 0.71.5 2024