Skip to content

feat(docs): enhance general information output with model details #4000

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

Conversation

viictoo
Copy link
Contributor

@viictoo viictoo commented May 6, 2025

Added a new section to the general information output in the docs service to display the models defined in the script configuration. The output now includes a label for 'Model' or 'Models' based on the count of models, improving clarity for users.

EXT-592


This PR enhances the documentation service by adding model information to the general information section. It displays the defined models with appropriate singular/plural labels based on the count, and includes input model details for 'action' endpoint types.

This summary was automatically generated by @propel-code-bot

Added a new section to the general information output in the docs service to display the models defined in the script configuration. The output now includes a label for 'Model' or 'Models' based on the count of models, improving clarity for users.
Copy link

linear bot commented May 6, 2025

Copy link

cubic-dev-ai bot commented May 6, 2025

Your mrge subscription is currently inactive. Please reactivate your subscription to receive AI reviews and use mrge.

@viictoo viictoo requested a review from a team May 6, 2025 17:26
const generalInfo = [
`## General Information`,
``,
`- **Description:** ${scriptConfig.description ?? ''}`,
`- **Version:** ${scriptConfig.version ? scriptConfig.version : '0.0.1'}`,
`- **Group:** ${endpoint && typeof endpoint !== 'string' && 'group' in endpoint ? endpoint?.group : 'Others'}`,
`- **Scopes:** ${scopes ? `\`${scopes}\`` : '_None_'}`,
`- **Endpoint Type:** ${endpointType.slice(0, 1).toUpperCase()}${endpointType.slice(1)}`
`- **Endpoint Type:** ${endpointType.slice(0, 1).toUpperCase()}${endpointType.slice(1)}`,
`- **${modelLabel}:** ${models}`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

output undefined if an action has no output.
also it's probably missing Input for action too (when available)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated to include action inputs as well.
Just confirming that by undefined it is the string itself rather than omitting the Model info if there is no output model

current sample output

## General Information

- **Description:** Test action with no input and output models
- **Version:** 0.0.1
- **Group:** TestAction
- **Scopes:** _None_
- **Endpoint Type:** Action
- **Model:** `undefined`
- **Input Model:** _None_

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

alt option

## General Information

- **Description:** Test action with no input and output models
- **Version:** 0.0.1
- **Group:** TestAction
- **Scopes:** _None_
- **Input Model:** _None_
- **Model:** _None_

…n the endpoint type is 'action'.

- eslint fixes: There should be at least one empty line between import groups
@viictoo viictoo requested a review from bodinsamuel May 9, 2025 06:34
@bodinsamuel bodinsamuel enabled auto-merge (squash) May 12, 2025 08:21
…-the-general-information-section-of-the-docs
@bodinsamuel bodinsamuel merged commit 9d20aae into master May 12, 2025
17 checks passed
@bodinsamuel bodinsamuel deleted the victorlangat/ext-592/add-the-model-name-to-the-general-information-section-of-the-docs branch May 12, 2025 08:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants