Skip to content

Add json generator #57

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

Closed
ovflowd opened this issue Aug 5, 2024 · 3 comments · Fixed by #142
Closed

Add json generator #57

ovflowd opened this issue Aug 5, 2024 · 3 comments · Fixed by #142
Assignees

Comments

@ovflowd
Copy link
Member

ovflowd commented Aug 5, 2024

This issue details the creation of the json generator. Unlike the json-simple generator that writes all content on a predefined single file, the json generator works like the other generators (i.e., legacy-HTML); it writes a JSON file for each module.

The json generator follows a hierarchy of the module (being a nested JSON (a JSON tree, where each depth level increases the nested-ness (as we have on the current https://nodejs.org/api/*.json format)

We also need to parse a section entry API options (params, return types, etc.) similarly as it is done on the current JSON format; There's room for improvement here and an opportunity to better the format.

There are other little pieces. For example, the metadata within node.updates should be flattened out to be properties directly of the node entry instead of an array.

I also believe the signature transformation (options) of methods/classes/constructors can be part of a centralized process until it can be reused or applied directly at the ApiDocMetadataEntry as a new property.

I also believe we could follow the JSDoc schema, which would be completely different from the current one but completely easy for downstream users to consume. This is just an idea, but feels good.

@flakey5
Copy link
Member

flakey5 commented Sep 10, 2024

I also believe we could follow the JSDoc schema

JSDoc or JSON schema?

Also, starting some preliminary work on what the schema should look like here

@ovflowd
Copy link
Member Author

ovflowd commented Sep 10, 2024

I also believe we could follow the JSDoc schema

JSDoc or JSON schema?

Also, starting some preliminary work on what the schema should look like here

JSDoc schema :) like the properties of each object within the JSON match the properties that JSdoc schema supports.

@ovflowd
Copy link
Member Author

ovflowd commented Sep 10, 2024

Notes here from downstream discussion: DefinitelyTyped/DefinitelyTyped#70298

flakey5 added a commit that referenced this issue Sep 24, 2024
Closes #57

Signed-off-by: flakey5 <[email protected]>
flakey5 added a commit that referenced this issue Oct 9, 2024
Closes #57

Signed-off-by: flakey5 <[email protected]>
@avivkeller avivkeller self-assigned this Nov 18, 2024
@github-project-automation github-project-automation bot moved this from In Progress to Done in Node.js API Documentation Tooling Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

3 participants