-
Notifications
You must be signed in to change notification settings - Fork 26
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
[Enhancement]support an option to display schema attributes in a flatten way #164
Comments
cc @ffforest Here I uploaded a demo to demonstrate the appearance when displaying the schema attributes in a flattened way: After I saw this demo with all real models in the catalog repo, I think displaying attributes in a flattened way with markdown is not a good idea:
Research on similar documentation platforms: Terraform RegistryTerraform registry adopts a flat representation more suitably, as the resources and data resources of TF usually have less level of attribute nesting and less model reuse than Kusion. Pulumi RegistryThe approach of Pulumi Registry is closer to the method we are currently adopting on kusionstack.io website.(Though kusionstack.io does not include all the related models on the AppConfiguration schema page) Pulumi registry adopts a navigation representation of nested schemas. All the related schemas are organized in a fixed section - example: https://www.pulumi.com/registry/packages/grafana/api-docs/cloudaccesspolicy/ OpenAPI-based API management platformThey all adopted a flat representation. (I believe that was for the purpose of quickly validating RESTful APIs)
The ConclusionBased on following facts:
Currently, we can continue the navigation way. Once our website and registry design are matured and we have more time to support the generation of HTML documentation, we can consider supporting the Spotlight way. |
For now, we'll generate the doc for schemas and subpackage within the same package into a single package doc file. |
Enhancement
Background
KCL focuses on model abstraction and configuration, and it's important to provide a clear overview of the attribute list and attribute details in the model documentation to both model maintainers and developers writing configurations based on the model.
The goal is to achieve that: With all information readily available in the doc, developers can write usable configurations without the need to navigate to other pages -- that requires all the configurable fields, along with their structures, constraints, and descriptions, can be obtained on a single page for the concerned model.
Design
Currently, the documentation generated by the KCL Doc tool only supports nested display of models, see konfig model docs on kusionstack.io.
flat(the way terraform registry adopted, example) and the nested representation, pros and cons:
Solution
provide an option on whether to display schema attributes in a flattened or nested way.
The text was updated successfully, but these errors were encountered: