From a2f8a922065eaee9e8a22c27f095c030a75fc981 Mon Sep 17 00:00:00 2001 From: sumansaurabh Date: Sun, 9 Jun 2024 11:02:40 +0530 Subject: [PATCH] chore: Update penify-oapi-codegen package name, improve command-line argument handling, and generate sample code for all languages and variants in OpenAPIHelper --- README.md | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 47e03a8..adbcd2d 100644 --- a/README.md +++ b/README.md @@ -34,13 +34,29 @@ Once installed, you can use `penify-oapi-codegen` from the command line to gener ### Generate Code Examples +#### For all supported languages + +It will generate OpenAPI schema for all possible language and variant. + +```bash +penify-oapi-codegen -i path/to/your/openapi/schema.json -o path/to/output/schema_with_code.json +``` + +#### For Specific Language and Variant + ```bash penify-oapi-codegen -i path/to/your/openapi/schema.json -l language -v variant -o path/to/output/schema_with_code.json ``` +#### Get all supported languages + +```bash +penify-oapi-codegen -s +``` + ### Options -- `-s, --source `: Path to the OpenAPI schema file (required). +- `-i, --input `: Path to the OpenAPI schema file (required). - `-l, --language `: Programming language for the code example (optional). - `-v, --variant `: Variant of the code generator for the specified language (optional). - `-o, --output `: Path to the output code example file (optional).