Commit Graph

10 Commits

Author SHA1 Message Date
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
Ben Mordue
0d82971b0c Use maven batch-mode (#70) 2018-05-16 21:39:52 +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
Jim Schubert
2c9f98ce38 [csharp] clean boolean additional properties 6784 (#6899)
* [csharp] Convert "false" properties to booleans

It appears as though "false" strings in additionalProperties are no
longer treated as false booleans. This may be an issue elsewhere, but a
simple fix is to always explicitly set the boolean value in a generator
class back to the additionalProperties map to convert boolean Strings to
boolean Objects.

* [nancyfx] Clean up async default option handling

* [nancyfx] Include asyncServer=false in sample script

* [csharp] Regenerate samples

* [csharp] Resolve .net 4 generation issues

Some functionality is missing from .NET 4.0, such as IReadonlyDictionary
and Type.GetTypeInfo().

This commit resolves compilation of generated .NET 4.0 code, requiring
no conditional versioning of Newtonsoft.Json.

* [csharp] Regenerate .net 4.0 sample

* [csharp] Resolve .NET 4.0 sample compile

Sample build.sh wasn't accounting for targeting different FCL correctly.
That is, when passing "net40" to the -sdk option, it would use the
default -sdk:4 and -langversion:6. These don't necessarily match with
what is installed on a machine with only .NET 4.0 (which is our targeted
use case here).

To resolve, we need to define another version-specific value for passing
to the mcs -sdk option (see man mcs for details).

This option currently isn't overridable in the client codegen class.
Also, langversion is set specifically to the version of C# available to
the targeted SDK version. If there is need, we may extend this to
something like:

langversion=${MCS_LANG_VERSION:-6}

To allow users to run as:

   env MCS_LANG_VERSION=5 sh build.sh

I haven't done this because I doubt there's much of a use case via this
script. I'm assuming most consumers will build via IDE or MSBuild.

* [csharp] Revert bin/csharp-petstore.sh to 3.5

* [csharp] Regenerate .NET 3.5 sample

* [csharp] Resolve nuget issue with existing files

* [csharp] Update -all.sh, regenerate samples
2017-11-15 22:36:37 +08:00
Paŭlo Ebermann
9dfbe7ef85 [nancyfx] Issue #5196: make package GUID nonrandom for nancyfx samples (#5209)
* Add packageGuid parameter to NancyFxServerCodegen.

* Use packageGuid parameter for nancyfx petstore samples.
2017-03-27 13:19:13 +08:00
Jim Schubert
663b471d1a [nancyfx/csharp] Customize interface prefix (#4557)
Per #4486, this allows user to specify the use of a standard or custom
prefix for interfaces. For C# based languages, this follows Microsoft's
Framework Design Guidelines and uses an I- prefix. However, to avoid
breaking changes with existing nancyfx generated code, the default is
unset.

The option supports true, false, or a custom prefix.
2017-01-15 23:35:43 +08:00
wing328
30c2503f9f [C#][NancyFX] Better "Add" for Dictionary and using {{packageName}} for NancyFX (#3449)
* use square bucket for C# dictionary

* use packageName for nancyfx generator, update info to debug for log

* use packageName for nancyfx generator, update info to debug for log
2016-07-26 14:10:48 +08:00