-
Notifications
You must be signed in to change notification settings - Fork 40
feat: api doc generation script #589
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
base: main
Are you sure you want to change the base?
Conversation
* 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
f079cf2 to
3a4fd1d
Compare
scripts/artifact-generation.js
Outdated
| "fr-ca": "API References [FR]", | ||
| "ja-jp": "API References [JP]", |
There was a problem hiding this comment.
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
| "fr-ca": "MyAccount API", | ||
| "ja-jp": "MyAccount API", |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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"; |
There was a problem hiding this comment.
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", |
There was a problem hiding this comment.
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", |
There was a problem hiding this comment.
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"] |
There was a problem hiding this comment.
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"] |
There was a problem hiding this comment.
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), |
There was a problem hiding this comment.
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
Description
References
Testing
npm run testexecutes unit and integration testsChecklist
CONTRIBUTING.md.