Skip to content

Add json generator #57

Closed
Closed

Description

@ovflowd

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.

Activity

  1. added 2 commits that reference this issue on Sep 5, 2024
    ee6db10
    6cba54f
  2. flakey5 commented on Sep 10, 2024

    @flakey5
    Member

    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

  3. ovflowd commented on Sep 10, 2024

    @ovflowd
    MemberAuthor

    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.

  4. ovflowd commented on Sep 10, 2024

    @ovflowd
    MemberAuthor

    Notes here from downstream discussion: DefinitelyTyped/DefinitelyTyped#70298

  5. added a commit that references this issue on Sep 24, 2024
    dccd5e3
  6. added a commit that references this issue on Oct 9, 2024
    46e2c4b
  7. self-assigned this
    on Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions