Skip to content

fix: only generate jsonld docs when docs disabled#5862

Closed
Romaixn wants to merge 1 commit intoapi-platform:3.1from
Romaixn:fix/contexts-error-route-when-docs-disabled
Closed

fix: only generate jsonld docs when docs disabled#5862
Romaixn wants to merge 1 commit intoapi-platform:3.1from
Romaixn:fix/contexts-error-route-when-docs-disabled

Conversation

@Romaixn
Copy link
Copy Markdown
Contributor

@Romaixn Romaixn commented Oct 3, 2023

Q A
Branch? 3.1
Tickets Closes #5528
License MIT

Only generate jsonld docs when docs disabled to avoid routing error when request to /contexts.

To avoid routing error when request to /contexts
@dunglas
Copy link
Copy Markdown
Member

dunglas commented Oct 26, 2023

I wonder if we cannot do that in a cleaner way: for instance, we could set docs_formats in the DI Extension to jsonld if enabled_docs is false, so we can simplify the routing part and always register the route, as it will work only for JSON-LD.

Maybe can we do even better now that we have this docs_formats option and deprecate the enable_docs config option, as new system is more powerful and cover this old use case.

WDYT?

@stale
Copy link
Copy Markdown

stale Bot commented Dec 26, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale Bot added the stale label Dec 26, 2023
@stale stale Bot closed this Jan 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants