@@ -3343,6 +3343,7 @@ quen2404/openapi-diff: >
33433343
33443344
33453345
3346+
33463347
33473348
33483349
@@ -3598,11 +3599,95 @@ Mermade/openapi-filter: >
35983599 "status": "403"
35993600 }
36003601Mermade/openapi-extract: >
3601- {
3602- "message": "Rate limit exceeded",
3603- "documentation_url": "https://docs.github.com/en/rest/using-the-rest-api/getting-started-with-the-rest-api#rate-limiting",
3604- "status": "403"
3605- }
3602+ # openapi-extract
3603+
3604+
3605+ 
3606+
3607+
3608+ Extract paths, operations, parameters, schemas etc from OpenAPI/Swagger definitions.
3609+
3610+
3611+ Works with OpenAPI/Swagger 2.0 and 3.x definitions.
3612+
3613+
3614+ ```
3615+
3616+ Usage: openapi-extract [options] {infile} [{outfile}]
3617+
3618+
3619+ Options:
3620+ -h, --help Show help [boolean]
3621+ --version Show version number [boolean]
3622+ --openai make the definition OpenAI compliant [boolean]
3623+ --server include server information [boolean]
3624+ --shard shard the input to an output directory [string]
3625+ -p, --path the path to extract [string]
3626+ -o, --operationid the operationIds to extract [array]
3627+ -m, --method the method to extract for the given path [string]
3628+ -i, --info copy full info object, otherwise minimal [boolean]
3629+ -d, --removeDocs remove all externalDocs properties [boolean]
3630+ -r, --removeExamples remove all example/examples properties [boolean]
3631+ -x, --removeExtensions remove all x- extension properties [boolean]
3632+ -s, --security include security information [boolean]
3633+ -v, --verbose increase verbosity [boolean]
3634+ ```
3635+
3636+
3637+ or
3638+
3639+
3640+ ```javascript
3641+
3642+ const openapiExtractor = require('openapi-extract');
3643+
3644+ const options = {};
3645+
3646+ // options.path = '...';
3647+
3648+ // options.method = '...';
3649+
3650+ // options.operationid = ['...'];
3651+
3652+ const res = openapiExtractor.extract(obj, options);
3653+
3654+
3655+ const map = openapiExtractor.shard(obj, options);
3656+
3657+ ```
3658+
3659+
3660+ The `options` object takes the same values as the CLI, for these keys and default values:
3661+
3662+
3663+ * path = ''
3664+
3665+ * method = ''
3666+
3667+ * info = false
3668+
3669+ * openai = false
3670+
3671+ * removeDocs = false
3672+
3673+ * removeExamples = false
3674+
3675+ * removeExtensions = false
3676+
3677+ * server = false
3678+
3679+ * security = false
3680+
3681+ * operationid = []
3682+
3683+
3684+ ## OpenAI compliant mode
3685+
3686+
3687+ This option turns on the following rules:
3688+
3689+
3690+ 1. The `description` properties must have a maximum length of 300 characters
36063691webonix/swagger-docs-cfml: >
36073692 {
36083693 "message": "Rate limit exceeded",
0 commit comments