Skip to content

docs: class defined as "Ping" but endpoints trying to fetch "Pings"#10033

Merged
michalsn merged 5 commits intocodeigniter4:developfrom
cjbaezilla:fix-typo-api-userguide
Mar 19, 2026
Merged

docs: class defined as "Ping" but endpoints trying to fetch "Pings"#10033
michalsn merged 5 commits intocodeigniter4:developfrom
cjbaezilla:fix-typo-api-userguide

Conversation

@cjbaezilla
Copy link
Contributor

Title
Fix typo in user guide documentation first api page

Description
Class was defined as "Ping" but endpoints were pointing to "Pings" returning 404 in the example.

Checklist:

  • Securely signed commits
  • Component(s) with PHPDoc blocks, only if necessary or adds value (without duplication)
  • Unit testing, with >80% coverage
  • User guide updated
  • Conforms to style guide

@mergeable
Copy link

mergeable bot commented Mar 10, 2026

Hi there, cjbaezilla! 👋

Thank you for sending this PR!

We expect the following in all Pull Requests (PRs).

Important

We expect all code changes or bug-fixes to be accompanied by one or more tests added to our test suite to prove the code works.

If pull requests do not comply with the above, they will likely be closed. Since we are a team of volunteers, we don't have any more time to work
on the framework than you do. Please make it as painless for your contributions to be included as possible.

See https://github.com/codeigniter4/CodeIgniter4/blob/develop/contributing/pull_request.md

Sincerely, the mergeable bot 🤖

@paulbalandan
Copy link
Member

The plural endpoints were the review notes in #9808 when I picked that up. So I think it should be the other way around. Make the controller name as plural?

@paulbalandan paulbalandan changed the title class defined as "Ping" but endpoints trying to fetch "Pings" docs: class defined as "Ping" but endpoints trying to fetch "Pings" Mar 11, 2026
@neznaika0
Copy link
Contributor

The ping example is unsuccessful - it does not imply a Domain. Therefore, ping looks reasonable, since and /api/login /api/auth /api/jwt/

@michalsn
Copy link
Member

In general, the plural form should be used for resources (most common REST style). Singular form for service-style endpoints. So I would agree with this change, since this is health/action endpoint.

@neznaika0
Copy link
Contributor

Change spaces for table.

@paulbalandan
Copy link
Member

@cjbaezilla would you be able to fix the failures so that this can be merged?

@cjbaezilla
Copy link
Contributor Author

@cjbaezilla would you be able to fix the failures so that this can be merged?

hello there @paulbalandan, i really have no idea how to pass the tests, and honestly don't have the time either to start looking around, i like the project and i saw the error so if anyone else want to get attributed for it please be my guest, thank you very much for your consideration in the matter, best regards.

@cjbaezilla
Copy link
Contributor Author

In general, the plural form should be used for resources (most common REST style). Singular form for service-style endpoints. So I would agree with this change, since this is health/action endpoint.

this was the same rationale i made.

@michalsn michalsn force-pushed the fix-typo-api-userguide branch from 3b44b5d to 04b655c Compare March 19, 2026 08:24
@michalsn michalsn merged commit 601cfa9 into codeigniter4:develop Mar 19, 2026
4 checks passed
@michalsn
Copy link
Member

Thank you @cjbaezilla

@michalsn michalsn added the documentation Pull requests for documentation only label Mar 19, 2026
@cjbaezilla
Copy link
Contributor Author

Hooray! thanks guys have a great day 🤝

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

Labels

documentation Pull requests for documentation only

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants