You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As a real-world project gose on, the number of paths grows, and the single yaml file becomes bigger, which lead to a slow loading when the swagger-ui js is trying to load a full yaml file.
I'd like to known how to spilt Path Item Object into seperate yaml files, but also keeps the auto-complete suggestion provided by any IDE, is there any official suggestions / guides / examples ?
IDEA uses schema store's open api schema to provide auto-complete suggestion.
The text was updated successfully, but these errors were encountered:
To split the Path Item object into separate YAML files while maintaining autocomplete suggestions in IDEs like IDEA, you can follow these steps:
Separate paths into individual files: create separate YAML files for each endpoint or groups of endpoints. For example, you could have files like user.yaml, product.yaml, order.yaml, etc., each containing the definitions for their respective paths.
Utilize references: in your main Swagger YAML file, use references to these separate files containing path definitions. For instance:
JSON references: you can also utilize JSON References to reference external files containing path definitions. This allows for a more flexible project structure and easier maintenance.
configure IDE for autocomplete: Configure your IDE settings to point to the OpenAPI schema from schema store to enable autocomplete suggestions for your YAML files. This will allow the IDE to provide prompts for keywords, data structures, and other OpenAPI specification elements within your files.
For example, In IntelliJ IDEA you can find various settings for autocompletion and hints. Open the Settings window (File > Settings) and review the editor and autocompletion sections.
As a real-world project gose on, the number of paths grows, and the single yaml file becomes bigger, which lead to a slow loading when the swagger-ui js is trying to load a full yaml file.
I'd like to known how to spilt Path Item Object into seperate yaml files, but also keeps the auto-complete suggestion provided by any IDE, is there any official suggestions / guides / examples ?
The text was updated successfully, but these errors were encountered: