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

Use the package.json of BALA files to render package and module documentations #159

Closed
azinneera opened this issue Jul 31, 2024 · 2 comments

Comments

@azinneera
Copy link

azinneera commented Jul 31, 2024

Description:
Related lang issue: ballerina-platform/ballerina-lang#42981

With these changes, the package.json of the BALA will be added with the "docs" field as shown below. BC can read this entry and render the documentation.

{
  "organization": "asmaj",
  "name": "readmeTest",
  "version": "0.1.0",
  "export": [
    "readmeTest"
  ],
  "docs": {
    "readmeTest.mod1": "docs/readmeTest.mod1/Module.md", // Optional. pattern- "<moduleName>" : "<docPath>"
    "readmeTest": "docs/Package.md" // Mandatory. pattern- "<packageName>" : "<docPath>"
  },
  "ballerina_version": "2201.10.0-SNAPSHOT",
  "implementation_vendor": "WSO2",
  "language_spec_version": "2024R1",
  "platform": "any",
  "graalvmCompatible": true,
  "template": false
}

Note: With the new structure, documentation for the default module is also expected to be contained in the package documentation MD file. Therefore, the Module.md of the default module will not be packaged into the BALA.

@tharindu-nw
Copy link

We render the package content in Ballerina Central using the description field in the api-doc.json file generated by org.ballerinalang.docgen.docs.BallerinaDocGenerator (same as bal doc command). This change should be added to that class in lang.

@tharindu-nw tharindu-nw removed their assignment Oct 7, 2024
@azinneera
Copy link
Author

Closing since this is handled in the CLI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

No branches or pull requests

2 participants