github.com/thetreep/go-swagger@v0.0.0-20240223100711-35af64f14f01/docs/usage/expand.md (about) 1 # Expand a swagger spec 2 3 The toolkit has a command to expand a swagger specification. 4 5 Expanding a specification resolve all `$ref` (remote or local) and replace them by their expanded 6 content in the main spec document. 7 8 ### Usage 9 10 To expand a specification: 11 12 ``` 13 Usage: 14 swagger [OPTIONS] expand [expand-OPTIONS] 15 16 expands the $refs in a swagger document to inline schemas 17 18 Application Options: 19 -q, --quiet silence logs 20 --log-output=LOG-FILE redirect logs to file 21 22 Help Options: 23 -h, --help Show this help message 24 25 [expand command options] 26 --compact applies to JSON formatted specs. When present, doesn't prettify the json 27 -o, --output= the file to write to 28 --format=[yaml|json] the format for the spec document (default: json) 29 ```