An OpenAPI specification can become very lengthy. It would be helpful if the export process could support splitting YAML files into smaller, organized parts.
The idea is to have each type of content (such as endpoints, schemas, etc.) stored in its own directory. Within these directories, the models or related items would be grouped into subfolders.
Example 1: Root-Level Models
For instance, if your project structure looks like this:
Root
-> Model1
-> Model2
It could generate a single .yaml
file within the entry points directory containing both Model1
and Model2
.
Example 2: Subfolder Organization
Let’s extend this structure to include folders:
Root
-> Folder1
-> Model1
-> Model2
-> Folder2
-> Model3
In this case, the export process would generate two separate .yaml
files:
folder1.yaml
: This file would includeModel1
andModel2
.folder2.yaml
: This file would includeModel3
.
Example 3: Nested Folders
For more complex structures, such as:
Root
-> FolderA
-> FolderB
-> Model1
-> Model2
The folder hierarchy should be treated as a real folder structure during the export. This means the .yaml
files should reflect the nesting. For example, folderb.yaml
in this case would contain Model1
and Model2
.
This approach ensures that the OpenAPI specification remains maintainable and well-organized, even for large projects. (It could be not use as a OpenAPI and needed to be joined, but this would make it editable via GitHub etc. and then also more easy to import back to ApiDog if there are changes made