@@ -676,6 +676,52 @@ curl -X POST -H "content-type:application/json" -d '{"swaggerUrl":"http://petsto
676
676
```
677
677
Then you will receieve a JSON response with the URL to download the zipped code.
678
678
679
+ To customize the SDK, you can ` POST ` to ` https://generator.swagger.io/gen/clients/{language} ` with the following HTTP body:
680
+ ```
681
+ {
682
+ "options": {},
683
+ "swaggerUrl": "http://petstore.swagger.io/v2/swagger.json"
684
+ }
685
+ ```
686
+ in which the ` options ` for a language can be obtained by submitting a ` GET ` request to ` https://generator.swagger.io/api/gen/clients/{language} ` :
687
+
688
+ For example, ` curl https://generator.swagger.io/api/gen/clients/python ` returns
689
+ ```
690
+ {
691
+ "packageName":{
692
+ "opt":"packageName",
693
+ "description":"python package name (convention: snake_case).",
694
+ "type":"string",
695
+ "default":"swagger_client"
696
+ },
697
+ "packageVersion":{
698
+ "opt":"packageVersion",
699
+ "description":"python package version.",
700
+ "type":"string",
701
+ "default":"1.0.0"
702
+ },
703
+ "sortParamsByRequiredFlag":{
704
+ "opt":"sortParamsByRequiredFlag",
705
+ "description":"Sort method arguments to place required parameters before optional parameters.",
706
+ "type":"boolean",
707
+ "default":"true"
708
+ }
709
+ }
710
+ ```
711
+ To set package name to ` pet_store ` , the HTTP body of the request is as follows:
712
+ ```
713
+ {
714
+ "options": {
715
+ "packageName": "pet_store"
716
+ },
717
+ "swaggerUrl": "http://petstore.swagger.io/v2/swagger.json"
718
+ }
719
+ ```
720
+ and here is the curl command:
721
+ ```
722
+ 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
723
+ ```
724
+
679
725
Guidelines for Contribution
680
726
---------------------------
681
727
0 commit comments