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

Supporting x-tagGroups in join command #1314

Closed
Tracked by #1354
unional opened this issue Oct 25, 2023 · 7 comments · Fixed by #1394
Closed
Tracked by #1354

Supporting x-tagGroups in join command #1314

unional opened this issue Oct 25, 2023 · 7 comments · Fixed by #1394

Comments

@unional
Copy link

unional commented Oct 25, 2023

Describe the problem to be solved

Currently, the join command creates a spec that uses the filename as the x-tagGroups.

This cause all tags are added to the same openapespec group for the following:

# /packages/api-a/open_api/openapespec.yaml
# /packages/api-b/open_api/openapespec.yaml

redocly join packages/api-a/open_api/openapispec.yaml packages/api-b/open_api/openapispec.yaml -o public/openapi.yaml

# or
redocly join packages/*/open_api/*.yaml -o public/openapi.yaml

Describe the solution you'd like

Use info.title of each file as the group name

Describe alternatives you've considered

add a flag to specify which prop to use.

Additional context

@AlexVarchuk
Copy link
Contributor

Seems it is related to @redocly/cli.

@AlexVarchuk AlexVarchuk transferred this issue from Redocly/redoc Oct 26, 2023
@tatomyr tatomyr added the p3 label Nov 29, 2023
@tatomyr
Copy link
Contributor

tatomyr commented Nov 29, 2023

Thanks for the suggestion @unional!

@tatomyr
Copy link
Contributor

tatomyr commented Nov 29, 2023

Hey @unional, could you check if using this option covers your case?

@tatomyr tatomyr added question Further information is requested and removed p3 labels Nov 29, 2023
@unional
Copy link
Author

unional commented Nov 30, 2023

Hey @unional, could you check if using this option covers your case?

Nope. That changes the tags not the tag groups.

@tatomyr tatomyr added p3 and removed question Further information is requested labels Nov 30, 2023
@lornajane
Copy link
Collaborator

It's very difficult to pick a prefix solution here that works for everyone - although we do have the option to not create the groups which I think is important. I agree that info.title would be (or should be) a more API-specific group label and would like us to make this change, but we need to take care with special characters in it to create a useful value for the tag groups.

Also we'll need to make it very clear in the changelog that this behaviour is changing - minor version bump at a minimum. I know the join command is still marked experimental but we do see quite a bit of usage!

@unional
Copy link
Author

unional commented Apr 2, 2024

I observe another issue related to this.
Without the x-tagGroups support for the join command, I can' control the order or filter out specific tags from the join doc.

Able to filter out tags are especially important as we can add the next version of API to the documentation during development while they are not exposed in the final doc.

@lornajane
Copy link
Collaborator

Thanks for your comment @unional , but in general it's better to open a new issue than to comment on a closed one where additional conversation might not be seen.

For this additional issue, perhaps you can use the filter-out decorator after joining to produce the output of the combined API descriptions without the tagged endpoints? There's more information about the filter-out decorator in the docs: https://redocly.com/docs/cli/decorators/filter-out/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants