diff --git a/samples/README.html b/samples/README.html new file mode 100644 index 00000000..0eeb3724 --- /dev/null +++ b/samples/README.html @@ -0,0 +1,188 @@ + + + + + + + + + + Compared to other libraries + + +
+ +
I've used the standard petshop examples from OpenAPI:
+ +
+
And used the following generators with their default options:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
openapi-typscript-codegenaureliainversifyangularfetchjquerynode
Supports OpenApi v2 specification
Supports OpenApi v3 specification
Supports authentication
Strongly typed models
Strongly typed enums
Models and services exported as individual files
Index file that exports all services and models
Service returns typed result
Service supports sending and receiving binary content
Models and services contain inline documentation
Framework agnostic
Generated size (typescript)30Kb30Kb30Kb30Kb30Kb30Kb30Kb
Build size (javascript)30Kb30Kb30Kb30Kb30Kb30Kb30Kb
+
+ + diff --git a/samples/README.md b/samples/README.md deleted file mode 100644 index c99a7bfe..00000000 --- a/samples/README.md +++ /dev/null @@ -1,149 +0,0 @@ -# Compare to other libraries - -Depending on which generator you use, you will see different output. For instance: -Different ways of generating models, services, level of quality, HTTP client, etc. -I've compiled a list below with the results per area and how they compare -against the openapi-typescript-codegen. - -I've used the standard petshop examples from OpenAPI: -- https://petstore3.swagger.io/api/v3/openapi.json -- https://petstore.swagger.io/v2/swagger.json - -And used the following generators with their default options: - -- typescript-aurelia -- typescript-angular -- typescript-inversify -- typescript-angular -- typescript-fetch -- typescript-jquery -- typescript-node - -#Results - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
openapi-typscript-codegenaureliainversifyangularfetchjquerynode
Supports OpenApi v2 specification
Supports OpenApi v3 specification
Supports authentication
Bearer token
Bearer token
Bearer token
Bearer token
Bearer token
Bearer token
Strongly typed models
Using classes instead of simple interfaces
Strongly typed enums
No enum is exported
Odd cast to <any>
Odd cast to <any>
Odd cast to <any>
Odd cast to <any>
Models and services exported as individual files
All models inside one file
All models and services inside one file
All models and services inside one file
Index file that exports all services and models
Service returns typed result
Service supports sending and receiving binary content
Passing file as application/octet-stream
Passing file as application/octet-stream
Models and services contain inline documentation
Framework agnostic
No, using aurelia
No, using inversify and rxjs
No, using angular
But depends on portable-fetch
No, using jquery
No, can only be used with NodeJS http
diff --git a/samples/codegen.sh b/samples/codegen.sh index f3594304..35b48f9b 100755 --- a/samples/codegen.sh +++ b/samples/codegen.sh @@ -15,3 +15,5 @@ java -jar ./swagger-codegen-cli-v3.jar generate -i v3/spec.json -l typescript-fe node ../bin/index.js --input v2/spec.json --output examples/v2/openapi-typescript-codegen/ node ../bin/index.js --input v3/spec.json --output examples/v3/openapi-typescript-codegen/ + +cd examples && find . -type f ! -iname "*.ts" -delete