Commit Graph

36 Commits

Author SHA1 Message Date
Yuriy Belenko
e605882451 [PHP] Add gitignore to AbstractPhpCodegen (#765)
* [PHP] Remove PHP related rules from root gitignore

After conversation with @ackintosh we've agreed that every PHP codegen
should create it's own `.gitignore`. Client libraries(SDKs) should ignore
`composer.lock` file while server stubs better do opposite.

* [PHP] Set .gitignore as default supporting file

* [PHP] Add default gitignore to Client SDK

* [PHP] Add default gitignore to Laravel

* [PHP] Add default gitignore to Lumen

* [PHP] Add default gitignore to Silex

Seems like issue #663 and pull request #681 missed this security script,
I've changed output path in bin/security/silex-petstore-server.sh.

* [PHP] Update Slim

* [PHP] Add default gitignore to Symfony

I've copied few old rules from root gitignore to local one. These rules
should be reviewed by original SymfonyCodegen authors.

* [PHP] Add default gitignore to Zend

* [PHP] Refresh Openapi3 client samples

* [PHP] Add refs to .gitignore templates collection
2018-08-20 12:16:01 +08:00
Akihito Nakano
26e70fe642 [Ruby] Rename files/folders (#534)
* Rename templateDir: rails5 -> ruby-on-rails-server

* Rename script: rails5-petstore-server.sh -> ruby-on-rails-server-petstore.sh

* Rename sample folder: rails5 -> ruby-on-rails

* Rename script(openapi3): rails5-petstore-server.sh -> ruby-on-rails-server-petstore.sh

* Update ruby-on-rails-server-petstore.sh

* Rename templateDir: sinatra -> ruby-sinatra-server

* Rename script: sinatra-petstore-server.sh -> ruby-sinatra-server-petstore.sh

* Rename sample folder: sinatra -> ruby-sinatra

* Update script

* Rename templateDir: ruby -> ruby-client

* Rename script: ruby-petstore.sh -> ruby-client-petstore.sh

* Update scripts

* Update samples

- bin/ruby-sinatra-server-petstore.sh
- bin/ruby-on-rails-server-petstore.sh
- bin/ruby-client-petstore.sh
- bin/security/ruby-client-petstore.sh
2018-07-13 22:28:17 +08:00
Yuriy Belenko
412923ab5f [Slim] Refactoring (#402)
* [Slim] Cleanup samples. composer.lock excluded from .gitignore

composer.lcok should be commited to SVN. Official recommendation https://getcomposer.org/doc/01-basic-usage.md#commit-your-composer-lock-file-to-version-control

* [Slim] Refactor. Extend AbstractPhpCodegen class

* [Slim] Adjust the names (script, sample folder, generator) to lang option
2018-07-02 00:16:55 +08:00
Akihito Nakano
e23b2f6fcc [Scala][client] Rename script, sample folder, template dir (#334)
* Rename scripts akka-scala-petstore.sh -> scala-akka-petstore.sh

* Rename sample folder: akka-scala -> scala-akka

* Rename templateDir: akka-scala -> scala-akka-client

* Rename scripts: scala-petstore.sh -> scala-httpclient-petstore.sh

* Rename sample folder: scala -> scala-httpclient

* Rename templateDir: scala -> scala-httpclient

* update circle pom.xml for new scala path

* remove duplicated scala test
2018-06-21 17:28:58 +08:00
Akihito Nakano
75171b4672
[C++] Rename template dir (#332)
* Rename templateDir: pistache-server -> cpp-pistache-server

* Rename templateDir: qt5cpp -> cpp-qt5-client

* Rename templateDir: restbed -> cpp-restbed-server

* Rename templateDir: cpprest -> cpp-rest-sdk-client

* Rename templateDir: tizen -> cpp-tizen-client

* Update scripts
2018-06-17 19:56:56 +09:00
Akihito Nakano
cf657f1c7b [C++] Adjust the names (script, sample folder, generator) to lang option (#220)
* Rename script: qt5-petstore.sh -> cpp-qt5-petstore.sh

* Rename sample folder: qt5cpp -> cpp-qt5

* Rename script: cpprest-petstore.sh -> cpp-restsdk-petstore.sh

* Rename sample folder: cpprest -> cpp-restsdk

* Rename generator: CppRestClientCodegen -> CppRestSdkClientCodegen

* Rename script: tizen-petstore.sh -> cpp-tizen-petstore.sh

* Rename sample folder: tizen -> cpp-tizen

* Rename script(security): qt5cpp-petstore.sh -> cpp-qt5-petstore.sh

* Rename sample folder(security): qt5cpp -> cpp-qt5

* Rename script(windows): qt5cpp-petstore.bat -> cpp-qt5-petstore.bat

* Change sample folder

* Rename script(windows): cpprest-petstore.bat -> cpp-restsdk-petstore.bat

* Change sample folder

* Rename script(windows): tizen-petstore.bat -> cpp-tizen-petstore.bat

* Change sample folder

* Change output folder: tizen -> cpp-tizen

* Rename the scripts under bin/openapi3

cpp-restsdk is not exist under bin/openapi3

* Change sample folder
2018-06-07 16:55:43 +08:00
Jim Schubert
27426f7b52 Cli generator name option, replaces 'language' options in CLI and Maven Plugin (#57) 2018-05-23 05:41:19 +02:00
Jim Schubert
8df3e54873 Move bash argv opt to end of ags line in scripts (#124)
The $@ option in bash doesn't make sense to come before `generate`
because the only option we can pass before generate cli usage is `help`.

System properties can be passed via JAVA_OPTS, so there's not really a
need for any intermediaries in the command line construction.

Having $@ at the end of the arguments list allows maintainers and users
inspecting options to quickly pass new options to a script. For example,

```
./bin/aspnetcore-petstore.sh --additional-properties sourceFolder=asdf
```

For command line arguments that may appear more than once in the
arguments list, this change doesn't provide any rules about overwriting
values that may exist (hard-coded) in the script. That is, in the
example above, if aspnetcore-petstore.sh already includes the
sourceFolder set to a different value, the "winning" value is up to the
options parser and openapi-generator-cli implementation.
2018-05-22 15:18:52 +08:00
Jérémie Bresson
2ee05e12d2 Fixes in security examples (#396)
* Regenerate "samples/client/petstore-security-test/java/okhttp-gson/"

* Use correct jar

* Fix sh scripts

* Fix path: modules/swagger-codegen => modules/openapi-generator/
2018-05-09 18:13:30 +08:00
Akihito Nakano
872dd546f4 Update php related samples (#375)
* Update php client (OAS3)

bin/openapi3/php-petstore.sh

* Update symfony server (OAS2)

bin/php-symfony-petstore.sh

* Lumen: remove 'swagger'

* Update lumen server (OAS2)

* Update php client (security): deleted 'SwaggerClient-php' folder

* Update TEST_DIR

* Update php client tests (OAS3)

bin/openapi3/php-petstore.sh

* Update php client (OAS2)

bin/php-petstore.sh

* Fix

* Fix lumen -> php-lumen

* Update lumen server (security)

* Delete moved files

currently it will generate into under 'lib' folder.

* Fix slim -> php-slim

* Update slim server (security)

bin/security/slim-petstore-server.sh

* Fix

* Update dot files
2018-05-09 10:34:19 +08:00
Jérémie Bresson
019b0dca1c
Add echo line at the beginning of each sh script (#202) 2018-04-23 09:58:45 +02:00
Jeremie Bresson
53597764c3 Add OpenAPI spec 3.0 support (beta)
Co-authored-by: Akihito Nakano <sora.akatsuki@gmail.com>
Co-authored-by: Jeremie Bresson <dev@jmini.fr>
Co-authored-by: Jim Schubert <james.schubert@gmail.com>
Co-authored-by: Martin Delille <martin@phonations.com>
Co-authored-by: Tomasz Prus <tomasz.prus@gmail.com>
Co-authored-by: William Cheng <wing328hk@gmail.com>
2018-04-17 09:19:10 +02:00
wing328
4cfbc118e8 renaming for openapi-generator 2018-03-13 14:41:23 +08:00
Akihito Nakano
0adbf7e51f [PHP] Improve: update sample tests automatically (#7717)
* Improve: update sample tests automatically

* security test

* Update sample

- bin/php-petstore.sh
- bin/security/php-petstore.sh

The security test has not been updated for a while.
2018-03-08 21:56:48 +08:00
wing328
c783ec1d41 update all petstore security samples 2017-10-18 10:10:44 +08:00
manuc66
a41e8bed97 [csharp] Support inheritance instead of duplicating parent properties in derived classes (#5922)
* [csharp] Explicitly set supportsInheritance

* [csharp] set supportsInheritance for client

This includes supportsInheritance only for the client codegen at the
moment, because setting in AbstractCSharpCodegen would require the
change to be tested in all derived generators, possibly including
similar template changes to this commit's.

* include nice improvement of https://github.com/jimschubert/swagger-codegen/tree/csharp/3829 and leverage https://github.com/manuc66/JsonSubTypes for subtype deserialization

* remove duplicate base validations

* remove useless tests

* restore documentation for properties coming from parent

* launch bin/security/csharp-petstore.sh

* it's impossible to call an explicitly implemented interface-method on the base class
(https://stackoverflow.com/questions/5976216/how-to-call-an-explicitly-implemented-interface-method-on-the-base-class)

* restore portion of code that was lost

* regenerate more

* fix missing using

* take the multi .net compatible revision

* keep generated model simple when no hierarchy involved

* regenerate with:
- bin/csharp-petstore-all.sh && bin/security/csharp-petstore.sh
- bin/csharp-dotnet2-petstore.sh && bin/csharp-petstore.sh && bin/csharp-petstore-netcore-project.sh && bin/csharp-petstore-net-standard.sh && bin/csharp-property-changed-petstore.sh

* fix sln indentation and the missing windows runner for dotnet2

* fix inheritance GetHashCode and Equals

* override instead of hiding the base method
+ fix the csharp-property-changed-petstore.bat

* By default the value of the discriminator property must be the name of the current schema

* Add test for subtype deserialisation from parent type

* add missing '.bat' and use the 'call' template from javascript-petstore-all.bat

add missing file to trigger it on windows

* fix default value bug

* cleanup copyright information

* formatting after merge

* fix merge

* applying bin/csharp-petstore-all.sh

* applying bin/security/csharp-petstore.sh
2017-09-06 17:22:20 +08:00
Isman Usoh
3ecc374682 [Typescript-Fetch] Support additionalproperties, Enum, Auth and more. (#6130)
* Support additionalproperties and more.
- Upgrade to TypeScript 2
- Use type definition from npm instead of typings, typings is deprecation
- Use Enum instead of String Literal Types
- Use typescript es6 lib for target es5
- Support additionalproperties
- Support JSDoc
- Add snapshot and npmRepository option
- Update typescript-fetch run script for linux
- Create typescript-fetch run script for windows

* Update and fix
- Fix circle run script
- Fix duplicate query parameter

* Rename typescript-fetch folder to lowercase

* Fix for review and update new line end of file

* Fix end of file

* rename script to {lang}-petstore-all.sh and fix test

* Fix override query string
https://stackoverflow.com/a/7517673/1077943
2017-08-25 23:26:32 +08:00
wing328
ddf9db3148 fix window batch scripts after ts angular generator rename 2017-07-14 17:45:56 +08:00
Paŭlo Ebermann
ec448a6167 [CLI] #5147: make -D work like system properties (#5191)
* Issue #5147: allow empty values for properties.

* Issue #5147: Allow multiple `-D` options.

* Issue #5147: take advantage (and demonstrate) the new usage of -D.

* Issue #5147: also update windows script and security ones.
2017-06-16 17:29:44 +08:00
Takuro Wada
11baad6e4b [TypeScript-jquery] set default return type as any (#5630)
* [TypeScript-jquery] fix bug of empty returnType appearing if returnType is not provided

* chore: add security sample for typescript-jquery
2017-05-14 11:36:09 +08:00
sabras75
00651dd340 Fix#5463 - [QT5CPP] missing SWGUUID when generating client based on swager.yaml containing a string with format 'uuid' (#5472)
* Add support to UUID type

* Simplify and use a simple QString instead of a QUuid.
Work for using a QUuid is way larger than supporting QString (imply modifying multiple c++ templates).
Current needs are fullfill with the use of a simple QString, so I let the use of QUuid for future enhancement.

* - add windows executable for generating qt5 security samples
- update sample clients
PS : some modifications on the samples are not related to the patch I applied. Were the samples up-to-date ?
2017-04-25 20:54:05 +08:00
Paŭlo Ebermann
8bd67c9f7f Fix template directory used by samples script. (#5284) 2017-04-04 14:47:22 +08:00
Paŭlo Ebermann
eb3565b6c0 [C#] Fix guid for C# security samples (#5283)
* Issue #5196: also fix the packageGuid for the C# security samples.

* Update C# security samples.
2017-04-04 14:38:47 +08:00
wing328
394840e352 Add more security samples (#3344)
* add line break test to petstore-security-test.yaml

* add objc/swift security testing

* add go,scala,qt5cpp for security test

* add security test for typescript

* fix go security issue, fix consumes,produces line break
2016-07-12 19:51:28 +08:00
wing328
9ee10e2397 Merge pull request #3249 from wing328/csharp_security_fix
[C#] better code injection handling for C# API client
2016-06-29 23:59:24 +08:00
wing328
cb53ea114a Merge pull request #3246 from wing328/security_fix_javascript_closure
[Javascript][Closure] better code injection handling for Javascript (closure)API client
2016-06-29 23:25:04 +08:00
wing328
d79274d548 better code injection handling for c# 2016-06-29 22:52:12 +08:00
wing328
f89333c8c3 better code injection handling for javascript closure client 2016-06-29 22:07:14 +08:00
wing328
aec2f4e27c better code injection handling for js 2016-06-29 21:18:35 +08:00
wing328
77c4164b3c better code injection handling for java 2016-06-29 02:00:43 +08:00
wing328
07a852fe78 Merge pull request #3231 from wing328/security_fix_ruby
[Ruby] better code injection handling for Ruby API client
2016-06-28 20:09:55 +08:00
wing328
37e1de6d72 Merge pull request #3230 from wing328/security_fix_python
[Python] better code injection handling for Python
2016-06-28 20:09:40 +08:00
wing328
9e216c0ca2 better code injection handling for ruby 2016-06-28 17:36:00 +08:00
wing328
3a41da42f0 better code injection handling for python 2016-06-28 17:07:50 +08:00
wing328
02864ed31a better code injectino handling for perl client 2016-06-28 16:37:33 +08:00
wing328
ec2abe78e3 apply security fix to php lumne, silex, slim 2016-06-28 12:21:41 +08:00