Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improvements to API Reference #830

Merged
merged 35 commits into from
Feb 7, 2025
Merged

Improvements to API Reference #830

merged 35 commits into from
Feb 7, 2025

Conversation

backlineint
Copy link
Collaborator

This pull request is for: (mark with an "x")

  • examples/*
  • modules/next
  • packages/next-drupal
  • starters/basic-starter
  • starters/graphql-starter
  • starters/pages-starter
  • [ X] Other

GitHub Issue: #829
Please add a link to the GitHub issue
where this problem is discussed.

Describe your changes

More detail in the issue, but this PR is attempting to bridge the gap between our old API reference section and the new autogenerated API docs.

This would also be a reasonable home for any final documentation updates related to the 2.x stable release.

Standing this up for feeback. While it does have pretty obvious UX
disadvantages, it draws a clearer distinction and provides more
detail in the docs.

* Promote API link to header menu
* Serve HTML API docs out of public dir - if we stick to this we'll
want to clean up the URLs with Next redirects or something similar.
See /api/classes/NextDrupal.html#getresource for output
Not positive if we want to ignore this, or just find a way to
re-order this in menus.
Copy link

vercel bot commented Jan 21, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
next-drupal-next ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 7, 2025 4:01pm
2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
next-drupal ⬜️ Ignored (Inspect) Visit Preview Feb 7, 2025 4:01pm
next-drupal-v1-6 ⬜️ Ignored (Inspect) Visit Preview Feb 7, 2025 4:01pm

@@ -294,6 +294,62 @@ export class NextDrupal extends NextDrupalBase {
* @param {string} uuid The UUID of the resource.
* @param {JsonApiOptions & JsonApiWithCacheOptions & JsonApiWithNextFetchOptions} options Options for the request.
* @returns {Promise<T>} The fetched resource.
* @examples
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This examples diff was made by feeding the markdown from the old reference section to Copilot, which made this waaaay less tedious.

Copy link
Member

Choose a reason for hiding this comment

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

Nice! This looks really good.

@backlineint backlineint marked this pull request as ready for review February 7, 2025 16:01
@backlineint backlineint merged commit bd967a8 into main Feb 7, 2025
6 of 17 checks passed
@backlineint backlineint deleted the reference-examples branch February 7, 2025 16:01
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.

2 participants