Skip to content

Build an API explorer for the Events and Orgs endpoints#567

Merged
allella merged 12 commits into
hackgvl:developfrom
irby:feat/api-doc-explorer
Jul 9, 2025
Merged

Build an API explorer for the Events and Orgs endpoints#567
allella merged 12 commits into
hackgvl:developfrom
irby:feat/api-doc-explorer

Conversation

@irby

@irby irby commented Jul 1, 2025

Copy link
Copy Markdown
Contributor

Creates an API explorer that can be visible on the /docs/api route, making it easy to document the available APIs and play around with the API calls.

image

@irby
irby requested a review from allella July 2, 2025 15:03
Signed-off-by: Matthew H. Irby <matt.irby@outlook.com>
@irby

irby commented Jul 2, 2025

Copy link
Copy Markdown
Contributor Author

@JenBauer FYI

Comment thread composer.json Outdated
Signed-off-by: Matthew H. Irby <matt.irby@outlook.com>
@allella

allella commented Jul 2, 2025

Copy link
Copy Markdown
Member

@irby Related to this to-do, would it be easy / advisable to create a GitHub action that fires anytime the API files change and raise a PR with the compiled files?

@irby

irby commented Jul 2, 2025

Copy link
Copy Markdown
Contributor Author

@allella I did try that (see earlier commits) but I ran into a couple things:

  • PRs coming from forked repos run into permissions issues trying to commit changes to the forked repo's branch.
  • Whenever the php artisan scribe:generate script is run, the API examples change because it's using a Factory to generate the model. This will cause the changes to be committed every time the Action is run.

I think it would be good to have at some point but it would require some thinking on my end on how that would all work :) A homework item for another day, I think.

Comment thread CONTRIBUTING.md Outdated
Comment thread config/scribe.php

@allella allella left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Added a few other comments or questions.

Signed-off-by: Matthew H. Irby <matt.irby@outlook.com>
@bogdankharchenko

Copy link
Copy Markdown
Collaborator

Looks good, let's give it a whirl.

@allella
allella merged commit 1468d2e into hackgvl:develop Jul 9, 2025
3 of 4 checks passed
@allella

allella commented Jul 9, 2025

Copy link
Copy Markdown
Member

@irby the require-dev is causing a bit of an issue on stage because we treat that more like production to test equivalent packages.

It sounds like we agreed to expose /docs to the world. If we still want to do that, then knuckleswtf/scribe may need to be moved because our deploy script on stage and production uses composer install --no-dev

@irby

irby commented Jul 9, 2025

Copy link
Copy Markdown
Contributor Author

@allella Gotcha. I wondered if that might happen. I'll raise a PR to move that dependency up to non-dev.

oliviasculley pushed a commit to oliviasculley/hackgreenville-com that referenced this pull request Oct 12, 2025
* Build an API explorer for the Events and Orgs endpoints

* Change trigger source from pull_request_target to pull_request

* Migrate database

* Allow contents write

* Checkout branch to commit to

* push commits to branch

* switch to just erroring out if changes were detected

* add in updated api docs

* Discard update api docs Action

* update route to docs/api instead of api-docs

Signed-off-by: Matthew H. Irby <matt.irby@outlook.com>

* Make scribe a dev dependency

Signed-off-by: Matthew H. Irby <matt.irby@outlook.com>

* chore(pr): Put bulletpoint on single line

Signed-off-by: Matthew H. Irby <matt.irby@outlook.com>

---------

Signed-off-by: Matthew H. Irby <matt.irby@outlook.com>
oliviasculley pushed a commit to oliviasculley/hackgreenville-com that referenced this pull request Oct 12, 2025
* Build an API explorer for the Events and Orgs endpoints

* Change trigger source from pull_request_target to pull_request

* Migrate database

* Allow contents write

* Checkout branch to commit to

* push commits to branch

* switch to just erroring out if changes were detected

* add in updated api docs

* Discard update api docs Action

* update route to docs/api instead of api-docs

Signed-off-by: Matthew H. Irby <matt.irby@outlook.com>

* Make scribe a dev dependency

Signed-off-by: Matthew H. Irby <matt.irby@outlook.com>

* chore(pr): Put bulletpoint on single line

Signed-off-by: Matthew H. Irby <matt.irby@outlook.com>

---------

Signed-off-by: Matthew H. Irby <matt.irby@outlook.com>
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.

3 participants