Closed mdh09 closed 4 weeks ago
Hi @mdh09! Could you explain how you use the split
command? Is the split code going to be your source of truth? What do you use the bundled and split versions for? Why does having many separate files make it difficult to navigate (I'd expect the opposite 🙂)?
Note: there is a similar request: https://github.com/Redocly/redocly-cli/issues/1502
Closing due to inactivity.
We have naming conventions to our schemas and would like to know if it's possible to group schemas with similar naming conventions together. By naming convention, we have schemas like Architype.Date, Architype.Name, Models.Contracts, Models.Vehicles, Properties.StopDate, Properties.ContractNumber.
Properties
schemas usually$ref
anArchitype
schema.Model
schemas usually$ref
multipleProperties
schemas.The
split
command is great in that there's not a single giant file, but having hundreds of little files makes navigation a nightmare.Having the ability to group schemas with the same conventions (
Architype
,Models
,Properties
, etc) into the same file would lessen the numbers of files created by the split's default functionality. By this I mean, all theArchitype
schemas go into a singleArchitype.json
file; all theProperties
schemas would go into a singleProperties.json
file; etc...As to what that would look like: Option 1. Add a new extension
The
x-SchemaGroup
. This extension would be added to each of the schemas. An example would be:split
command would have an option--SplitBySchemaGroup
and the process would group by the extension and create 1 file per x-SchemaGroup defined.Option 2. Lean on the Name of the schemas. For example, only allow a schema name to have 1 or maybe 2 delimiters. This would be the
From there, the process would be similar to option 1 only that instead of grouping by the extension, the grouping be by the first word before the delimiter.
.
in the following case.There could be more options, but these 2 were the most transparent options in my head.
Thank you in advance!