Skip to content

Fixed and enhanced OpenAPI#195

Draft
adriendupuis wants to merge 34 commits into
5.0from
enh-openapi
Draft

Fixed and enhanced OpenAPI#195
adriendupuis wants to merge 34 commits into
5.0from
enh-openapi

Conversation

@adriendupuis
Copy link
Copy Markdown
Contributor

@adriendupuis adriendupuis commented Aug 5, 2025

🎫 Issue IBX-10444

⚠️ Don't merge, don't review, this PR is split into smaller batches for review. It's kept to host a summary of what is done and what is left to do.

Related PRs:

Description:

Accept and Content-Type headers

https://spec.openapis.org/oas/v3.1.1.html#x4-8-12-2-1-common-fixed-fields

If in is "header" and the name field is "Accept", "Content-Type" or "Authorization", the parameter definition SHALL be ignored.

https://swagger.io/docs/specification/v3_0/describing-parameters/#header-parameters

Note: Header parameters named Accept, Content-Type and Authorization are not allowed.

When using "Try it out' on live doc (/api/ibexa/v2/doc#/Objects/api_contentobjects_contentId_get), the previously displayed Accept header parameter form input was never taken into account. To choose an Accept header, one must be selected in the Responses panel.

So, I removed the useless and ignored Accept header parameter definition, and moved it's description up into the ressource description.

image
Other changes
Copilot's help

See #218 and ibexa/segmentation#167 for how I used Copilot for repetitive tasks.
Between the two, I added, for example, the mime-type sorting, more example fixing instructions, the operationId.

Summary
Package PR Batch Branch State Comment
ibexa/rest #228 Desc fix-response-descriptions Draft Fix description overridden with status code
ibexa/rest #217 JWT fix-jwt-doc Merged Needed for MCP Server doc documentation-developer#3106
ibexa/rest #195 0/6 enh-openapi Draft Split into 6 batches; WIP/TODO: BinaryContent, ContentTypeCopyController,…
ibexa/rest #220 1/6 enh-openapi-ContentType Review
ibexa/rest #221 1/6 enh-openapi-Content Review
ibexa/rest #222 1/6 enh-openapi-Location-ObjectState Review
ibexa/rest #223 1/6 enh-openapi-User-Session Review
ibexa/rest #224 1/6 enh-openapi-Role Review
ibexa/rest #225 1/6 enh-openapi-misc Review
ibexa/activity-log ibexa/activity-log#157 1/1 fix-openapi Review
ibexa/calendar ibexa/calendar#92 1/1 fix-openapi Review
ibexa/cart ibexa/cart#170 1/1 fix-openapi Review
ibexa/collaboration ibexa/collaboration#109 1/1 fix-openapi Review
ibexa/connect ibexa/connect#TODO TODO TODO: document TemplateController
ibexa/connector-ai ibexa/connector-ai#179 1/2 reduce_image_size Review Image size
ibexa/connector-ai ibexa/connector-ai#181 2/2 fix-openapi Review
ibexa/connector-dam ibexa/connector-dam#TODO TODO TODO: document AssetVariationController & AssetController
ibexa/connector-qualifio ibexa/connector-qualifio#TODO TODO TODO: document CampaignListController
ibexa/corporate-account ibexa/corporate-account#359 1/1 fix-openapi Review
ibexa/discounts ibexa/discounts#324 1/1 fix-openapi Review
ibexa/discounts-codes ibexa/discounts-codes#47 1/1 openapi QA Full implementation
ibexa/integrated-help ibexa/integrated-help#TODO TODO TODO: document ProductTourController
ibexa/order-management ibexa/order-management#181 1/1 fix-openapi Review
ibexa/payment ibexa/payment#195 1/1 fix-openapi Review
ibexa/personalization ibexa/personalization#TODO TODO TODO
ibexa/product-catalog ibexa/product-catalog#1503 1/1 fix-openapi Review
ibexa/segmentation ibexa/segmentation#167 1/1 fix-openapi Review Prompt in description
ibexa/share ibexa/share#TODO TODO TODO: document UsersWithPermissionInfoController
ibexa/shipping ibexa/shipping#144 1/1 fix-openapi Review Document ShipmentCreateController, format the others
ibexa/shopping-list ibexa/shopping-list#61 1/1 fix-openapi Review Minor changes
ibexa/taxonomy ibexa/taxonomy#412 1/1 fix-openapi Review

ibexa/documentation-developer#3194 removes the script forcing JSON before XML as it won't be needed anymore.

For QA:

You can generate the specification and user other tools to check it.

php bin/console ibexa:openapi --yaml

Pasted in SwaggerEditor: only report warnings about GET routes with payloads:
requestBody does not have well-defined semantics for GET, HEAD and DELETE operations

Using Redocly CLI lint command several errors are reported.
You can compare with and without the fixes to see many errors disappearing. I ignore several rules for now. I use JSON output to not have line numbers and ease the comparison between the outputs without/with the fixes.

php bin/console ibexa:openapi --yaml > openapi.yaml

redocly lint openapi.yaml --format=json --extends=recommended \
    --skip-rule=no-identical-paths \
    --skip-rule=no-ambiguous-paths \
    --skip-rule=operation-4xx-response \
    --skip-rule=no-invalid-media-type-examples \
    --skip-rule=info-license \
    --skip-rule=tag-description \
    --skip-rule=no-unused-components \
    --skip-rule=operation-2xx-response \
> redocly-lint.fixed.json

Documentation:

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Aug 5, 2025

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Oct 5, 2025

@sonarqubecloud
Copy link
Copy Markdown

@sonarqubecloud
Copy link
Copy Markdown

@adriendupuis adriendupuis changed the base branch from main to 5.0 April 28, 2026 12:23
@sonarqubecloud
Copy link
Copy Markdown

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.

5 participants