Skip to content

refactor(dev/ocs): re-organize for readability, fix/modernize code snippets, minor clarifications#14071

Open
joshtrichards wants to merge 5 commits intomasterfrom
jtr/dev-openapi-adjustments
Open

refactor(dev/ocs): re-organize for readability, fix/modernize code snippets, minor clarifications#14071
joshtrichards wants to merge 5 commits intomasterfrom
jtr/dev-openapi-adjustments

Conversation

@joshtrichards
Copy link
Member

☑️ Resolves

  • Adjusted some headings
  • Change the order of sections within the chapter
  • Minor language tweaks and very minor technical clarifications
  • PHP code fixes/updates

Reviewers: If you see a bunch of lines dropped in some spot, they were just moved elsewhere.

🖼️ Screenshots

Signed-off-by: Josh <josh.t.richards@gmail.com>
Signed-off-by: Josh <josh.t.richards@gmail.com>
Signed-off-by: Josh <josh.t.richards@gmail.com>
Signed-off-by: Josh <josh.t.richards@gmail.com>
Signed-off-by: Josh <josh.t.richards@gmail.com>
@joshtrichards
Copy link
Member Author

/backport to stable33

@joshtrichards joshtrichards changed the title refactor(dev): re-organize for readability, fix/modernize code snippets, minor clarifications refactor(dev/ocs): re-organize for readability, fix/modernize code snippets, minor clarifications Feb 13, 2026
Copy link
Member

@provokateurin provokateurin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!


* Prefer OCS endpoints (``OCSController`` + ``DataResponse``) for public APIs
* Add explicit types everywhere (parameters, helper methods, and return types)
* Use ``null`` (or ``\stdClass``) to represent an empty JSON object
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* Use ``null`` (or ``\stdClass``) to represent an empty JSON object
* Use ``\stdClass`` to represent an empty JSON object

I think I get what you mean, but null really isn't an empty JSON object.

A controller and methods can have multiple scopes, however when a method has the attribute set,
all scopes from the controller are ignored.

Methods that require admin permissions due to missing ``#[NoAdminRequired]`` or ``#[PublicPage]`` attribute or the
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Methods that require admin permissions due to missing ``#[NoAdminRequired]`` or ``#[PublicPage]`` attribute or the
Methods that require admin permissions due to missing ``#[NoAdminRequired]`` or a present ``#[PublicPage]`` attribute or the

Sounds like the missing applies to both attributes.

class ResponseDefinitions {}

The name of every type definition has to start with the app ID.
The name of every type definition must start with the *readable app ID* as expected by theopenapi-extractor.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The name of every type definition must start with the *readable app ID* as expected by theopenapi-extractor.
The name of every type definition must start with the *readable app ID* as expected by the openapi-extractor.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants