Skip to content

Conversation

@mikemimik
Copy link
Contributor

Description

  • Add script for generating API documentation based on an OpenAPI Spec
  • Add unit tests for functions utilised by script
  • Add integration test for script

References

Testing

  • Running npm run test executes unit and integration tests

Checklist

  • I've read and followed CONTRIBUTING.md.
  • I've tested the site build for this change locally.
  • I've made appropriate docs updates for any code or config changes.
  • I've coordinated with the Product Docs and/or Docs Management team about non-trivial changes.

@mikemimik mikemimik self-assigned this Feb 11, 2026
snollygolly and others added 5 commits February 11, 2026 02:31
* feat: adding generation script
* fix: removing folder from json path

---------

Co-authored-by: Matt Horning <[email protected]>
- deps: add [email protected]
- deps: add [email protected]
- chore: update type to commonjs
- chore: add testing script
- BREAKING CHANGE: refactored from original
@mikemimik mikemimik force-pushed the feat/api-doc-generation-script branch from f079cf2 to 3a4fd1d Compare February 11, 2026 07:31
Comment on lines 16 to 17
"fr-ca": "API References [FR]",
"ja-jp": "API References [JP]",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

✋🏽 Change Request: add translated language values

Comment on lines +28 to +29
"fr-ca": "MyAccount API",
"ja-jp": "MyAccount API",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

✋🏽 Change Request: add translated language values

await fs.mkdir(docpath, { recursive: true });
} catch (err) {
console.error(`failed to create: ${docpath}`, err);
// TODO: figure out of `break` or `continue` is what we want here
Copy link
Contributor Author

Choose a reason for hiding this comment

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

✋🏽 Change Request: make determination

filename,
});
} catch (err) {
// TODO: figure out of `break` or `continue` is what we want here
Copy link
Contributor Author

Choose a reason for hiding this comment

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

✋🏽 Change Request: make determination

`${SPEC_LOCATION}/${oasConfig.docRootDirectory}/${oasConfig.outputFile}`,
);
// this isn't present in the original, but that presents problems i think?
oasData.openapi = "3.1.0";
Copy link
Contributor Author

Choose a reason for hiding this comment

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

✋🏽 Change Request: this should be unneeded; should be safe to remove

- values aren't translated in docs.json
- add dropdown sections for other languages
- flatten array of scopes
main/docs.json Outdated
"pages": ["docs/api"]
"dropdowns": [
{
"dropdown": "Auth0 API Reference Documenation",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

✋🏽 Change Request: translate this value

"pages": ["docs/api"]
"dropdowns": [
{
"dropdown": "Auth0 API Reference Documentation",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

✋🏽 Change Request: translate this value

{
"dropdown": "Auth0 API Reference Documentation",
"icon": "book-open",
"pages": ["docs/api"]
Copy link
Contributor Author

Choose a reason for hiding this comment

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

✋🏽 Change Request: create translated page and update this reference

{
"dropdown": "Auth0 API Reference Documenation",
"icon": "book-open",
"pages": ["docs/api"]
Copy link
Contributor Author

Choose a reason for hiding this comment

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

✋🏽 Change Request: create translated page and update this reference

- update logic of 'covertDocsToFormat'
- update logic of 'patchDocsJson' to handle docsByLocale
- update docs grouping logic to account for locale
- update write location of oas
const data = { group: " ", pages: [] };
for (const folder in docs[locale]) {
data.pages.push({
group: startCase(folder),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

✋🏽 Change Request: the value of group should be the 'pretty' value, if one exists, from the tags section of the OAS

@mikemimik mikemimik changed the title Feat/api doc generation script feat: api doc generation script Feb 11, 2026
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