@@ -236,7 +236,7 @@ To install, run `brew install swagger-codegen`
236
236
237
237
Here is an example usage:
238
238
``` sh
239
- swagger-codegen generate -i http ://petstore.swagger.io/v2/swagger.json -l ruby -o /tmp/test/
239
+ swagger-codegen generate -i https ://petstore.swagger.io/v2/swagger.json -l ruby -o /tmp/test/
240
240
```
241
241
242
242
### Docker
@@ -301,7 +301,7 @@ sleep 5
301
301
GEN_IP=$( docker inspect --format ' {{.NetworkSettings.IPAddress}}' $CID )
302
302
# Execute an HTTP request and store the download link
303
303
RESULT=$( curl -X POST --header ' Content-Type: application/json' --header ' Accept: application/json' -d ' {
304
- "swaggerUrl": "http ://petstore.swagger.io/v2/swagger.json"
304
+ "swaggerUrl": "https ://petstore.swagger.io/v2/swagger.json"
305
305
}' ' http://localhost:8188/api/gen/clients/javascript' | jq ' .link' | tr -d ' "' )
306
306
# Download the generated zip and redirect to a file
307
307
curl $RESULT > result.zip
@@ -321,7 +321,7 @@ Example:
321
321
322
322
``` sh
323
323
docker run --rm -v ${PWD} :/local swaggerapi/swagger-codegen-cli generate \
324
- -i http ://petstore.swagger.io/v2/swagger.json \
324
+ -i https ://petstore.swagger.io/v2/swagger.json \
325
325
-l go \
326
326
-o /local/out/go
327
327
```
@@ -332,17 +332,17 @@ The generated code will be located under `./out/go` in the current directory.
332
332
333
333
## Getting Started
334
334
335
- To generate a PHP client for http ://petstore.swagger.io/v2/swagger.json , please run the following
335
+ To generate a PHP client for https ://petstore.swagger.io/v2/swagger.json , please run the following
336
336
``` sh
337
337
git clone https://github.com/swagger-api/swagger-codegen
338
338
cd swagger-codegen
339
339
mvn clean package
340
340
java -jar modules/swagger-codegen-cli/target/swagger-codegen-cli.jar generate \
341
- -i http ://petstore.swagger.io/v2/swagger.json \
341
+ -i https ://petstore.swagger.io/v2/swagger.json \
342
342
-l php \
343
343
-o /var/tmp/php_api_client
344
344
```
345
- (if you're on Windows, replace the last command with ` java -jar modules\swagger-codegen-cli\target\swagger-codegen-cli.jar generate -i http ://petstore.swagger.io/v2/swagger.json -l php -o c:\temp\php_api_client ` )
345
+ (if you're on Windows, replace the last command with ` java -jar modules\swagger-codegen-cli\target\swagger-codegen-cli.jar generate -i https ://petstore.swagger.io/v2/swagger.json -l php -o c:\temp\php_api_client ` )
346
346
347
347
You can also download the JAR (latest release) directly from [ maven.org] ( https://repo1.maven.org/maven2/io/swagger/swagger-codegen-cli/2.4.15/swagger-codegen-cli-2.4.15.jar )
348
348
@@ -353,7 +353,7 @@ To get a list of PHP specified options (which can be passed to the generator wit
353
353
## Generators
354
354
355
355
### To generate a sample client library
356
- You can build a client against the swagger sample [ petstore] ( http ://petstore.swagger.io) API as follows:
356
+ You can build a client against the swagger sample [ petstore] ( https ://petstore.swagger.io) API as follows:
357
357
358
358
``` sh
359
359
./bin/java-petstore.sh
@@ -365,7 +365,7 @@ This will run the generator with this command:
365
365
366
366
``` sh
367
367
java -jar modules/swagger-codegen-cli/target/swagger-codegen-cli.jar generate \
368
- -i http ://petstore.swagger.io/v2/swagger.json \
368
+ -i https ://petstore.swagger.io/v2/swagger.json \
369
369
-l java \
370
370
-o samples/client/petstore/java
371
371
```
@@ -463,7 +463,7 @@ Note the `myClientCodegen` is an option now, and you can use the usual arguments
463
463
``` sh
464
464
java -cp output/myLibrary/target/myClientCodegen-swagger-codegen-1.0.0.jar:modules/swagger-codegen-cli/target/swagger-codegen-cli.jar \
465
465
io.swagger.codegen.SwaggerCodegen generate -l myClientCodegen\
466
- -i http ://petstore.swagger.io/v2/swagger.json \
466
+ -i https ://petstore.swagger.io/v2/swagger.json \
467
467
-o myClient
468
468
```
469
469
@@ -595,7 +595,7 @@ Each of these files creates reasonable defaults so you can get running quickly.
595
595
596
596
``` sh
597
597
java -jar modules/swagger-codegen-cli/target/swagger-codegen-cli.jar generate \
598
- -i http ://petstore.swagger.io/v2/swagger.json \
598
+ -i https ://petstore.swagger.io/v2/swagger.json \
599
599
-l java \
600
600
-o samples/client/petstore/java \
601
601
-c path/to/config.json
699
699
700
700
You have options. The easiest is to use our [ online validator] ( https://github.com/swagger-api/validator-badge ) which not only will let you validate your spec, but with the debug flag, you can see what's wrong with your spec. For example:
701
701
702
- http://online.swagger.io/validator/debug?url=http ://petstore.swagger.io/v2/swagger.json
702
+ http://online.swagger.io/validator/debug?url=https ://petstore.swagger.io/v2/swagger.json
703
703
704
704
### Generating dynamic html api documentation
705
705
@@ -775,15 +775,15 @@ One can also generate API client or server using the online generators (https://
775
775
776
776
For example, to generate Ruby API client, simply send the following HTTP request using curl:
777
777
``` sh
778
- curl -X POST -H " content-type:application/json" -d ' {"swaggerUrl":"http ://petstore.swagger.io/v2/swagger.json"}' https://generator.swagger.io/api/gen/clients/ruby
778
+ curl -X POST -H " content-type:application/json" -d ' {"swaggerUrl":"https ://petstore.swagger.io/v2/swagger.json"}' https://generator.swagger.io/api/gen/clients/ruby
779
779
```
780
780
Then you will receive a JSON response with the URL to download the zipped code.
781
781
782
782
To customize the SDK, you can ` POST ` to ` https://generator.swagger.io/gen/clients/{language} ` with the following HTTP body:
783
783
``` json
784
784
{
785
785
"options" : {},
786
- "swaggerUrl" : " http ://petstore.swagger.io/v2/swagger.json"
786
+ "swaggerUrl" : " https ://petstore.swagger.io/v2/swagger.json"
787
787
}
788
788
```
789
789
in which the ` options ` for a language can be obtained by submitting a ` GET ` request to ` https://generator.swagger.io/api/gen/clients/{language} ` :
@@ -817,12 +817,12 @@ To set package name to `pet_store`, the HTTP body of the request is as follows:
817
817
"options" : {
818
818
"packageName" : " pet_store"
819
819
},
820
- "swaggerUrl" : " http ://petstore.swagger.io/v2/swagger.json"
820
+ "swaggerUrl" : " https ://petstore.swagger.io/v2/swagger.json"
821
821
}
822
822
```
823
823
and here is the curl command:
824
824
``` sh
825
- curl -H " Content-type: application/json" -X POST -d ' {"options": {"packageName": "pet_store"},"swaggerUrl": "http ://petstore.swagger.io/v2/swagger.json"}' https://generator.swagger.io/api/gen/clients/python
825
+ curl -H " Content-type: application/json" -X POST -d ' {"options": {"packageName": "pet_store"},"swaggerUrl": "https ://petstore.swagger.io/v2/swagger.json"}' https://generator.swagger.io/api/gen/clients/python
826
826
```
827
827
828
828
Instead of using ` swaggerUrl ` with an URL to the OpenAPI/Swagger spec, one can include the spec in the JSON payload with ` spec ` , e.g.
0 commit comments