From b83b23337c09f053bf470bf4b41615353b1f3eae Mon Sep 17 00:00:00 2001 From: Kanad Gupta Date: Wed, 11 Dec 2024 18:28:11 -0600 Subject: [PATCH 1/2] fix: openapi arg doc enhancements, refactors (#1122) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## ๐Ÿงฐ Changes cherry picks a few refactors from https://github.com/readmeio/rdme/pull/1116 to minimize that diff and bring these changes to the v9 channel ## ๐Ÿงฌ QA & Testing do tests still pass? --- documentation/commands/openapi.md | 15 +++++++++----- src/commands/openapi/convert.ts | 6 +++--- src/commands/openapi/index.ts | 6 +++--- src/commands/openapi/inspect.ts | 6 +++--- src/commands/openapi/reduce.ts | 6 +++--- src/commands/openapi/validate.ts | 5 ++--- src/lib/flags.ts | 7 ++++++- src/lib/logger.ts | 3 +-- src/lib/readmeAPIFetch.ts | 33 +++++++++++++++++++------------ 9 files changed, 51 insertions(+), 36 deletions(-) diff --git a/documentation/commands/openapi.md b/documentation/commands/openapi.md index 0eb4fdcc1..8a8a4cb8b 100644 --- a/documentation/commands/openapi.md +++ b/documentation/commands/openapi.md @@ -19,7 +19,8 @@ USAGE [--workingDirectory ] [--github] [--dryRun] [--useSpecVersion] [--raw] [--create | --update] ARGUMENTS - SPEC A file/URL to your API definition + SPEC A path to your API definition โ€” either a local file path or a URL. If your working directory and all + subdirectories contain a single OpenAPI file, you can omit the path. FLAGS --create Bypasses the create/update prompt and creates a new API definition in ReadMe. @@ -121,7 +122,8 @@ USAGE $ rdme openapi convert [SPEC] [--out ] [--title ] [--workingDirectory ] ARGUMENTS - SPEC A file/URL to your API definition + SPEC A path to your API definition โ€” either a local file path or a URL. If your working directory and all + subdirectories contain a single OpenAPI file, you can omit the path. FLAGS --out= Output file path to write converted file to @@ -158,7 +160,8 @@ USAGE dme...] [--workingDirectory ] ARGUMENTS - SPEC A file/URL to your API definition + SPEC A path to your API definition โ€” either a local file path or a URL. If your working directory and all + subdirectories contain a single OpenAPI file, you can omit the path. FLAGS --feature=