@@ -35,7 +35,7 @@ Once installed, you can use `penify-oapi-codegen` from the command line to gener
3535### Generate Code Examples
3636
3737``` bash
38- penify-oapi-codegen -s path/to/your/openapi/schema.yaml -l language -v variant -o path/to/output/code_example
38+ penify-oapi-codegen -i path/to/your/openapi/schema.json -l language -v variant -o path/to/output/schema_with_code.json
3939```
4040
4141### Options
@@ -44,59 +44,53 @@ penify-oapi-codegen -s path/to/your/openapi/schema.yaml -l language -v variant -
4444- ` -l, --language <language> ` : Programming language for the code example (optional).
4545- ` -v, --variant <variant> ` : Variant of the code generator for the specified language (optional).
4646- ` -o, --output <path> ` : Path to the output code example file (optional).
47+ - ` -s, ` : To show list of supported languages
4748
4849## Supported Code Generators
4950
5051The tool supports generating code examples for the following languages and variants:
5152
52- | Language | Variant |
53- | ---------------| ---------------|
54- | C | libcurl |
55- | C# | HttpClient |
56- | C# | RestSharp |
57- | cURL | cURL |
58- | Dart | http |
59- | Go | Native |
60- | HTTP | HTTP |
61- | Java | OkHttp |
62- | Java | Unirest |
63- | JavaScript | Fetch |
64- | JavaScript | jQuery |
65- | JavaScript | XHR |
66- | Kotlin | OkHttp |
67- | NodeJs | Axios |
68- | NodeJs | Native |
69- | NodeJs | Request |
70- | NodeJs | Unirest |
71- | Objective-C | NSURLSession |
72- | OCaml | Cohttp |
73- | PHP | cURL |
74- | PHP | Guzzle |
75- | PHP | pecl_http |
76- | PHP | HTTP_Request2 |
77- | PowerShell | RestMethod |
78- | Python | http.client |
79- | Python | Requests |
80- | R | httr |
81- | R | RCurl |
82- | Rust | Reqwest |
83- | Ruby | Net: HTTP |
84- | Shell | Httpie |
85- | Shell | wget |
86- | Swift | URLSession |
53+ | Language | Variant |
54+ | --------------- | ----------------|
55+ | csharp | RestSharp |
56+ | curl | cURL |
57+ | go | Native |
58+ | http | HTTP |
59+ | java | OkHttp |
60+ | java | Unirest |
61+ | javascript | Fetch |
62+ | javascript | jQuery |
63+ | javascript | XHR |
64+ | c | libcurl |
65+ | nodejs | Axios |
66+ | nodejs | Native |
67+ | nodejs | Request |
68+ | nodejs | Unirest |
69+ | objective-c | NSURLSession |
70+ | ocaml | Cohttp |
71+ | php | cURL |
72+ | php | HTTP_Request2 |
73+ | php | pecl_http |
74+ | powershell | RestMethod |
75+ | python | http.client |
76+ | python | Requests |
77+ | ruby | Net::HTTP |
78+ | shell | Httpie |
79+ | shell | wget |
80+ | swift | URLSession |
8781
8882## Examples
8983
9084### Example 1: Generate Python Requests Code Example
9185
9286``` bash
93- penify-oapi-codegen -s ./schemas/api.yaml -l Python -v Requests -o ./examples/python_requests_example.py
87+ penify-oapi-codegen -s ./schemas/api.json -l python -v Requests -o ./examples/schema_python_requests_example.json
9488```
9589
9690### Example 2: Generate JavaScript Fetch Code Example
9791
9892``` bash
99- penify-oapi-codegen -s ./schemas/api.yaml -l JavaScript -v Fetch -o ./examples/js_fetch_example.js
93+ penify-oapi-codegen -s ./schemas/api.json -l javascript -v Fetch -o ./examples/schema_js_fetch_example.json
10094```
10195
10296## Contributing
0 commit comments