New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[New Generator] Rust API client/server generator #6613

Merged
merged 43 commits into from Oct 19, 2017

Conversation

Projects
None yet
@BenjaminGill-Metaswitch
Contributor

BenjaminGill-Metaswitch commented Oct 3, 2017

PR checklist

  • Read the contribution guidelines.
  • Ran the shell script under ./bin/ to update Petstore sample so that CIs can verify the change. (For instance, only need to run ./bin/{LANG}-petstore.sh and ./bin/security/{LANG}-petstore.sh if updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates). Windows batch files can be found in .\bin\windows\.
  • Filed the PR against the correct branch: 3.0.0 branch for changes related to OpenAPI spec 3.0. Default: master.
  • Copied the technical committee to review the pull request if your PR is targeting a particular programming langauge.

Description of the PR

This is a reasonably fully featured Rust client/server generator, developed independently of the existing rust client generator. We (@Metaswitch) are currently using some generated code in production.

At a high level, a trait is created from the swagger file. Clients can use the trait, whilst servers must implement it.

Common code is in https://github.com/Metaswitch/swagger-rs/, which should get transferred to https://github.com/swagger-api/ when this PR is accepted.

Current known issues

There are currently a number of known issues/feature gaps, of which the most significant are below. Only the naming issue should block this PR.

  • rust2 is not a very informative name
  • Need to resolve conflicts with master
  • Currently uses hyper 0.10 - work underway to upgrade to hyper 0.11 (which adds full async support)
  • Documentation on how to use the generated code in a Rust project is lacking

mirw and others added some commits Aug 22, 2017

Produce warnings when unknown fields are present
We still accept unknown fields and discard them. However, to improve
diagnosability, we now write a warning log and return a `Warning`
header.

Note that this is server-only
Remove to_string call while parsing path parameters, which requires d…
…efinining a temporary var in a block because rust can't tell where a Cow reference gets dropped
Moved conversion from serde_xml_rs::Error to ApiError from swagger-rs…
… to client code until upstream PR is accepted
MMSUB-172 Don't set Content-Type when there's no body.
If we don't have a body we've serialized, then don't declare
any content type for the nonexistent body.

This is really important for 204 No Content responses, but it's
also morally important for all other non-bodied responses.

bruceadams and others added some commits Oct 6, 2017

Merge pull request #2 from bruceadams/cli-reserved-words-mappings
Support generate's "--reserved-words-mappings" option
Merge pull request #1 from bruceadams/dot-in-params
Support "." in parameter names
@BenjaminGill-Metaswitch

This comment has been minimized.

Show comment
Hide comment
@BenjaminGill-Metaswitch

BenjaminGill-Metaswitch Oct 11, 2017

Contributor

@wing328 (et. al.) - we've now got no merge conflicts. I've also pulled in a couple of bug fixes (thanks @bruceadams).

I think this means that the only outstanding blocking issue is the choice of name - you suggested that rust2 was not very descriptive.

I'm not sure I've yet got a better idea, but this PR could probably be reviewed in the interim.

Contributor

BenjaminGill-Metaswitch commented Oct 11, 2017

@wing328 (et. al.) - we've now got no merge conflicts. I've also pulled in a couple of bug fixes (thanks @bruceadams).

I think this means that the only outstanding blocking issue is the choice of name - you suggested that rust2 was not very descriptive.

I'm not sure I've yet got a better idea, but this PR could probably be reviewed in the interim.

@wing328

This comment has been minimized.

Show comment
Hide comment
@wing328

wing328 Oct 12, 2017

Contributor

I'll take another look by coming weekend.

Contributor

wing328 commented Oct 12, 2017

I'll take another look by coming weekend.

@wing328 wing328 added this to the v2.3.0 milestone Oct 12, 2017

@jaytiar

This comment has been minimized.

Show comment
Hide comment
@jaytiar

jaytiar Oct 12, 2017

@BenjaminGill-Metaswitch and I discussed ideas for a better name. Reflecting the fact that this version of the codegen supports both client and server (and is async) I suggested that rust-complete would be a better and suitable name. Views?

jaytiar commented Oct 12, 2017

@BenjaminGill-Metaswitch and I discussed ideas for a better name. Reflecting the fact that this version of the codegen supports both client and server (and is async) I suggested that rust-complete would be a better and suitable name. Views?

@wing328

This comment has been minimized.

Show comment
Hide comment
@wing328

wing328 Oct 12, 2017

Contributor

Just want to share with you that 'haskell-servant' is very similar to this Rust client/server generator in which haskell-servant generates both client and server code and servant is the server-side framework. Your generator can follow similar naming convention.

Contributor

wing328 commented Oct 12, 2017

Just want to share with you that 'haskell-servant' is very similar to this Rust client/server generator in which haskell-servant generates both client and server code and servant is the server-side framework. Your generator can follow similar naming convention.

@BenjaminGill-Metaswitch

This comment has been minimized.

Show comment
Hide comment
@BenjaminGill-Metaswitch

BenjaminGill-Metaswitch Oct 12, 2017

Contributor

Currently, we use hyper as the server-side framework (though we might consider switching over to something else [i.e. Rocket when it becomes stable] at a later date). The complication is that hyper also provides the client framework for both this generator and the existing rust generator.

Contributor

BenjaminGill-Metaswitch commented Oct 12, 2017

Currently, we use hyper as the server-side framework (though we might consider switching over to something else [i.e. Rocket when it becomes stable] at a later date). The complication is that hyper also provides the client framework for both this generator and the existing rust generator.

@wing328

This comment has been minimized.

Show comment
Hide comment
@wing328

wing328 Oct 12, 2017

Contributor

Have you evaluated the current rust client generator? How does it compare with the Rust API client produced by the generator in this PR? Can we merge them into one as both are using hyper?

Maybe not for this PR. My suggestion is to make this generator for Rust server only and we can name it as rust-server. For Rust client, we just keep one generator rust.

Contributor

wing328 commented Oct 12, 2017

Have you evaluated the current rust client generator? How does it compare with the Rust API client produced by the generator in this PR? Can we merge them into one as both are using hyper?

Maybe not for this PR. My suggestion is to make this generator for Rust server only and we can name it as rust-server. For Rust client, we just keep one generator rust.

@bruceadams

This comment has been minimized.

Show comment
Hide comment
@bruceadams

bruceadams Oct 12, 2017

As of about two weeks ago, the current rust generator produces Rust code that is hard to use and does not line up with other Rust libraries I have seen. The client generated from this pull request is much more Rust-typical.

bruceadams commented Oct 12, 2017

As of about two weeks ago, the current rust generator produces Rust code that is hard to use and does not line up with other Rust libraries I have seen. The client generated from this pull request is much more Rust-typical.

@wing328

This comment has been minimized.

Show comment
Hide comment
@wing328

wing328 Oct 13, 2017

Contributor

@bruceadams thanks for reviewing the Rust code.

I would suggest naming this generator "rust-server" after merging this PR (understood that the generator also outputs Rust API client) and then later we pick one of the Rust API clients to become the rust generator or consolidate them into one (and rust-server will only generate server-side code after that).

cc @frol @farcaller

Contributor

wing328 commented Oct 13, 2017

@bruceadams thanks for reviewing the Rust code.

I would suggest naming this generator "rust-server" after merging this PR (understood that the generator also outputs Rust API client) and then later we pick one of the Rust API clients to become the rust generator or consolidate them into one (and rust-server will only generate server-side code after that).

cc @frol @farcaller

wing328 added some commits Oct 18, 2017

@wing328

This comment has been minimized.

Show comment
Hide comment
@wing328

wing328 Oct 18, 2017

Contributor

UPDATE: Resolved the merge conflicts. Will merge it tomorrow morning and make some minor enhancements.

Contributor

wing328 commented Oct 18, 2017

UPDATE: Resolved the merge conflicts. Will merge it tomorrow morning and make some minor enhancements.

@wing328 wing328 merged commit 1d89ab6 into swagger-api:master Oct 19, 2017

4 checks passed

Shippable Run 5974 status is SUCCESS.
Details
ci/circleci Your tests passed on CircleCI!
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@wing328

This comment has been minimized.

Show comment
Hide comment
@wing328

wing328 Oct 19, 2017

Contributor

UPDATE: Renamed rust2 to rust-server via #6747

Contributor

wing328 commented Oct 19, 2017

UPDATE: Renamed rust2 to rust-server via #6747

@wing328 wing328 referenced this pull request Oct 19, 2017

Open

[Rust] Enhancements to Rust server generator #6756

1 of 6 tasks complete
@wing328

This comment has been minimized.

Show comment
Hide comment
@wing328

wing328 Oct 19, 2017

Contributor

Future enhancements tracked via #6756

Contributor

wing328 commented Oct 19, 2017

Future enhancements tracked via #6756

@wing328

This comment has been minimized.

Show comment
Hide comment
@wing328

wing328 Oct 19, 2017

Contributor

Tweet to promote the new generator: https://twitter.com/wing328/status/921009649440006144. Please help retweet.

Contributor

wing328 commented Oct 19, 2017

Tweet to promote the new generator: https://twitter.com/wing328/status/921009649440006144. Please help retweet.

tzimisce012 pushed a commit to tzimisce012/swagger-codegen that referenced this pull request Oct 23, 2017

Daniel Ochoa Rodríguez
Baikal14 (#1)
* [Java] fix bug to only remove "CustomInstantDeserializer" for Play v2.5 (#6444)

* fix bug to only remove CustomInstantDeserializer for play25

* revise logic

* fix logic for CustomInstantDeserializer.java

* [Swift3/Swift4] update all cocoapods for swift3/swift4 (#6441)

* [Swift] update all cocoapods for swift3/swift4

* fix subspec specification

* [Java] Handle Long in enum correctly (#6342)

Resolves #6338

* [All generators] Supports of hyphen-case to camelCase (#6399)

* Supports of hyphen-case to camelCase

* Add unit tests for the new section in the camelize function.

* [ANDROID][volley] Handle UnsupportedEncodingException in invokeAPI (#6436)

* [ANDROID][volley] Handle UnsupportedEncodingException in invokeAPI (Issue #6432)
The constructor of StringEntity can throw UnsupportedEncodingException, which is not catch nor thrown by createRequest method.
Therefore the build of android client fails with:

ApiInvoker.java:448: error: unreported exception UnsupportedEncodingException; must be caught or declared to be thrown

This commit adds a try ... catch on UnsupportedEncodingException in invokeAPI methods and declare this exception to be thrown in createRequest

* [ANDROID][volley] Handle UnsupportedEncodingException in invokeAPI (Issue #6432)
The constructor of StringEntity can throw UnsupportedEncodingException, which is not catch nor thrown by createRequest method.
Therefore the build of android client fails with:

ApiInvoker.java:448: error: unreported exception UnsupportedEncodingException; must be caught or declared to be thrown

This commit adds a try ... catch on UnsupportedEncodingException in invokeAPI methods and declare this exception to be thrown in createRequest

* [ANDROID][Volley] Handle UnsupportedEncodingException (Issue #6432)
Throw more precise ApiException

* [haskell-http-client] update readme; improve lens generation; fix dateFormat (#6448)

* point readme links to canonical locations

* use lenses for non-required model fields, instead of traversals

* fix .gitignore generation

* fix dateFormat cli option bug

* add jfastnacht to php tech comm

* Genesys acquired Interactive Intelligence (#6453)

See http://www.genesys.com/about/newsroom/news/genesys-completes-acquisition-of-interactive-intelligence

* [haskell-http-client] update documentation; refactoring; add 'strictFields' cli option (#6458)

* update readme; remove unused DeriveAnyClass extension

* refactor request/param utility functions

* add strictFields cli option

* add CONTRIBUTING.md

* add note to deprecate swift generator

* [C#] Enabled inheritance to prevent property duplication (#6335)

* Issue#3829. [CSharp] Enabled inheritance to prevent property duplication when using allOf and discriminator

* tabs removed

* Petstore sample updated

* update c# petstore samples

* add presentation by Jesse Collis

* add square blog post by roykachouh, retrofit post

* fix NPE in get swagger type (#6462)

* add R to the list of supported languages

* add more links to presentations, blog posts, etc

* add https://pycon.jp/2017/ja/ presentation

* add more blog posts

* [Python][Flask] Upgraded connxion to 1.1.15 (now supports multi collection format arrays) (#6463)

* [Python][Flask] Upgraded connxion to 1.1.15 (now supports multi collection format arrays)

* Was modified by ./bin/python-petstore.sh

* [ObjC] fix NPE when getting swagger type (#6465)

* fix npe in swagger type (objc)

* remove trailing spaces

* Better logic to handle tags with special characters (#6466)

* better logic to handle tag with special characters

* update test cases

* comment out swift test cases

* restore the swift tests

* fix link to fehguy twitter account

* Handle when response is a file URL. (#6469)

This is the equivalent change in the swift4 module which was made in the swift3 module in this PR:

swagger-api#6274

This updates AlamofireImplementations.mustache to handle when the response is an URL. It also makes changes in the generated sample code for:

* default configuration (no promisekit or rxswift)
* promisekit
* rxswift

Also, in order to build, the generated code needed to be updated with the change in CodableHelper which changes dataDecodingStrategy to ".base64" from its previous definition in earlier Xcode 9 betas.
*

* Support object schemas with only additionalProperties. (#6492)

Previously, we had implemented the Codable protocol by simply claiming conformance, and making sure that each of our internal classes also implemented the Codable protocol. So our model classes looked like:

class MyModel: Codable {
   var propInt: Int
   var propString: String
}

class MyOtherModel: Codable {
   var propModel: MyModel
}

Previously, our additionalProperties implementation would have meant an object schema with an additionalProperties of Int type would have looked like:

class MyModelWithAdditionalProperties: Codable {
   var additionalProperties: [String: Int]
}

But the default implementation of Codable would have serialized MyModelWithAdditionalProperties like this:

{
  "additionalProperties": {
    "myInt1": 1,
    "myInt2": 2,
    "myInt3": 3
  }
}

The default implementation would put the additionalProperties in its own dictionary (which would be incorrect), as opposed to the desired serialization of:

{
  "myInt1": 1,
  "myInt2": 2,
  "myInt3": 3
}

So therefore, the only way to support this was to do our own implementation of the Codable protocol. The Codable protocol is actually two protocols: Encodable and Decodable.

So therefore, this change generates implementations of Encodable and Decodable for each generated model class. So the new generated classes look like:

class MyModel: Codable {
   var propInt: Int
   var propString: String

   // Encodable protocol methods

   public func encode(to encoder: Encoder) throws {

        var container = encoder.container(keyedBy: String.self)

        try container.encode(propInt, forKey: "propInt")
        try container.encode(propString, forKey: "propString")
    }

    // Decodable protocol methods

    public required init(from decoder: Decoder) throws {
        let container = try decoder.container(keyedBy: String.self)

        propInt = try container.decode(Int.self, forKey: "propInt")
        propString = try container.decode(String.self, forKey: "propString")
    }

}

class MyOtherModel: Codable {
   var propModel: MyModel

   // Encodable protocol methods

   public func encode(to encoder: Encoder) throws {

        var container = encoder.container(keyedBy: String.self)

        try container.encode(propModel, forKey: "propModel")
    }

    // Decodable protocol methods

    public required init(from decoder: Decoder) throws {
        let container = try decoder.container(keyedBy: String.self)

        propModel = try container.decode(MyModel.self, forKey: "propModel")
    }

}

* Add support for reserved-words-mappings to cpprest (#6501)

* Also handles automatic escaping for reserved words, i.e.
  by default, no need to provide a mapping.
Fix #6498

* [haskell-http-client] use katip logger, default strict (#6478)

* change strictFields cli option default to True;

* use katip logging; add cli-option for monad-logger

* fix date parsing

* remove package.yaml

* [Python] Add configuration.{connection_pool_maxsize, assert_hostname} (#6508)

* Backport kubernetes client features:

- assert_hostname
- connection_pool_maxsize
- cleanups

* Update petstore sample

* [QT5][CPP] Fixing issue with maps in models (#6479)

* [QT5][CPP] Fixing issue with maps in models

- Adjusted init function to init map correctly
- Adjusted cleanup function to cleanup maps correctly

* Fixed formatting for samples

* Eliminate all Java compilation warnings for swift4 codegen module (#6467)

* [6313] Add imports to perl objects. (#6500)

* update perl petstore sample

* [PHP] Fix #6474: Bug with 'format: date' when using --model-name-prefix (#6510)

* Add test case which repeats the issue #6474

* Add "date" to type mapping

* Update samples

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

* [Java] Added Play! WS filters support for retrofit2 client  (#6499)

* added play! ws filters support

* samples updated

* Fix abcsum with abcsun

* various readme update

* add https://www.elastic.co/ to list of co using sw

* Fixing conversion when it's an item of a collection + add missing isUuid in objects (#6473)

* Add Jenkins World 2017 talk. (#6542)

* update elasticsearch to elastic

* produce correct enum for jaxrs resteasy eap (#6489)

* Add link to Gradle Swagger Generator Plugin (#6481)

* Zend Expressive fix and upgrade to version 2 (#6461)

* upgraded zend-expressive from version 1 to 2

* Changed error handler for compatibility with Zend Expressive 2

* generated newest sample files for Petstore ze-ph

* removed ErrorMiddleware because it is never been used anymore. Regenerated samples

* removed ErrorMiddleware Template from Codegen

* remove ErrorMiddleware from petstore sample

* Fixed some code styles

* regenerated ze-ph samples with corrected code styles

* added new line at the end of the file

* Propsed fix for the ApiClient runtime crash (#6523)

* update cpprest petstore samples

* [TypeScript][Angular] Better support for "Accept", "Content-Type" (#6454)

* add consumes and produces as corresponding headers if present

* add check for empty array
fix copy/paste error

* fix styling

* add isJsonMime
filter produces- and consumes-Arrays for json-mime items

* update ts angular v2, v4 petstore samples

* [Typescript-jQuery] Fix for issue #6505 (#6541)

* Fix that prevented the default version to generate the model files

* Add generated samples

* update ts jquery petstore samples

* [typescript-angular] apply encodeURIComponent to path-parameter (#6525)

* #6524: [typescript-angular] apply encodeURIComponent to path-parameter

* #6524: [typescript-angular2] update samples

* #6524: [typescript-angularjs] update samples

* [PHP] Improve Model template (#6460)

* Update samples

./bin/php-petstore.sh

* Remove unnecessary implements entry

ModelInterface, ArrayAccess are already implemented in parent

* Remove field `container` which is already defined in parent

* Change snake case to lower camel case

- invalid_properties
- allowed_values

* Improve doc commenct style

* Improve description length

* Improve length

* Doc comment short description must start with a capital letter

* Add a line between @param and @return

* Delete an additinal blank line at end of doc comment

* Udpate petstore-security-test

* [Java][RESTEasy] fix resteasy dependency issue in pom.xml (#6556)

* fix resteasy dependency issue

* add java resteasy petstore to circleci test

* fix #6353 (#6514)

* [PHP] Improve Api template (#6507)

* Improve spacing in doc comment

* Improve grouping of parameter tags

* Improve line length

* Fix undefined variable $_tempBody

* Improve indent

* [Scala] Decommission "async-scala" generator (#6552)

* remove async-scala generator

* remove async-scala related scripts

* add ackintosh to php tech committee

* use parameter name as description if not defined (#6557)

* add scala test, rearrange test order

* Bugfix: Handle all different types of security (#6528)

The only special handling was for security definition type `apiKey`
in `query`. All the other security configurations should result in the
same generated code.
Moves the handling of the special query parameters outside of the
`parameters without specific cardinality` section.
To cover the scenario where `elif` was being used, simply leverage the
builtin `continue` statement to stop processing the specific query
parameter and continue to the next available query parameter, if any.

Manually test with multiple different combinations.

Resolves: #6526

* [Bash] Add test setting for Bash client (#6558)

* add pom.xml and travis.yml for bash

* create travis.yml.bak, test .travis.yml.bash

* restore travis.yml

* Add class prefix to tag with numbers (#6561)

* add class prefix to tag with numbers, update java to default tag name

* update codegen test

* add encodeURIComponent to encode path parameters (#6551)

* add link to netflix blog

* add new item to copy technical committee in PR

* revise wording for PR template

* [Scala] Add support for PATCH via X-HTTP-Method-Override (#6539)

* Added support for http PATCH to the scala client using X-HTTP-Method-Override header

* Update Petstore sample

* [Java] Play! framework + retrofit2 client exception converter, bug fixes (#6543)

* added exception converter

* underscore removal fix

* samples updated

* added test

* test whitespace

* [python] Add default Configuration (#6554)

* Add default configuration

* Fix assert_hostname bug in rest.py

* Update petstore sample

* add "npm run build" to ts angular

* Bugfix: Resolve lint errors for generated client (#6563)

Updates the bash client template to allow the generated client code
to be free of lint errors.

Resolves: #6562

* Fix some bugs for the R client (#6535)

* * Fix bugs in api.mustache, model.mustache, mostly bracket errors or small typos
* Added section about installation in README.mustace
TODO: fix tests in testthat
TODO: fix bug in description.mustace regarding package name

* Updates to sample for R client caused by running ./bin/r-petstore.sh (or .\bin\windows\r-petstore.bat)

* Add R specific files to .gitignore

* [R] add additional files generated by the petstore sample. (see #6520)

* add SAP blog post by Radu Simen

* add links to https://shinesolutions.com/

* update swift link, add kotlin, powershell

* [Elixir] Add Elixir Petstore sample to Shippable CI (#6575)

* add elixir petstore to shippable ci

* use oracle sdk

* [Elixir] Improve Elixir client (#6550)

* Fix dependencies and generate model classes

* Better elixir client generation.

Responses are parsed and serialized by Poison into the model structs.
Use shared helper functions to generate the request.
Extract client connection configuration from api calls.

Elixir client can sanitize the operationId

Correctly output the model variables. Fix typos

Fix path replacement when there are multiple replacements

Cannot separate globally shared parameters from operations

Error handling for the tesla response

update templates

Can generate clients that compile

Can make requests - parse optional params, build query

Add oauth to connection. Fix connection directory

Add basic auth helper for creating a connection

Fix map types. Fix guard clauses for creaing connections

Add licenceInfo template. Parse config for moduleName via standard invokerPackage option

Can provide and inject a license header into all source files

fix location of connection.ex

Move shared code into reusable modules

Elixir filenames should be underscored

Fix visibility of helper functions

Parse the packageName from config options

Handle date and datetime fields with DateTime.from_iso8601

Fix indentation

Update documentation, add typespecs

Generate a standard elixir .gitignore

typespec is calculated recursively in java

Use the JSON middleware and using Poison.Decoder.decode on already parsed structs

move decoded struct into java

Fix handling of non-json responses

Switch basic auth to use the provided Tesla.Middleware.BasicAuth

Update README template to include the appDescription

Update sample elixir client

remove junk client models that don't belong with petstore

Only implement Poison.Decoder protocol if needed

Update samples with skipped Poison.Deocder impl

* Handle multipart file uploads

Handle building form params in the body

Files are handled as strings for input

* Requests with no defined return type will return the Tesla.Env response

* Run the bin/elixir-petstore.sh

* Use valid JS RegEx (#6584)

* fix elixir model naming

* Feature: Adds doc generation (#6570)

Reference #2359

* fix JS help text

* Bugfix: Path replacement regex not working (#6580)

A previous change to make the regex a variable to allow proper linting
resulted in the regexp not having access to the value associated with
the variable and the path variable not being replaced.

Moves the regexp variable inside the for loop to allow the value to be
used and the path variable to be replaced with the provided value.

* Swift3: non dictionary body type (#6531)

* Adding support for non dictionary body types.

* Adding test for rest of the swift3 types

* Cleaning up implementation of makeRequest and adding better error handling.

* Adding ClientError for error produced before request is sent.

* Changing how encoding of body data is handled.

* Cleaning up code that was modified.

* add jvelilla to eiffel tech committee

* add kenjones-cisco to bash tech comm

* [CPPREST] Fixed multipart files upload implementation (#6518)

* [Scala] format the Scala code style templete (#6532)

* The templete of scala code style refactor

* more reformat

* more reformat

* generate petstore client

* update tech comm, fix broken link to 2.0.17

* add cbornet to python tech committee

* Add optional support for HttpClient (#6295)

* fix compilation error in eclipse

by updating package declarations in moved files
(eclipse validates that package and folder names match)

* permit specifying the full angular version

simplifying the templates by moving trivial case splits to the model

* remove dead code

this method is never called ...

* support HttpClient in addition to Http, clean up generated code

Fixes #6080

* added new sample, and regenerated existing samples

* updated samples

this time with the freshly build generator ...

* improve formatting

* updated samples

* fix compilation error in generated code

the overload for blobs does not have a type parameter

* added the first test for the utils package

* fix extra trainling commas in function argument lists

* regenerated samples

* fix comma in method without parameters

* use String() to convert num, update TS angular samples

* add haskell to shippable ci (#6600)

* [haskell-http-client] fixes for fake-endpoints (#6597)

* fix compile errors / sanitization for petstore-with-fake-endpoints-models-for-testing.yaml
* correct mimetype logic
* add makefile

* Pre-calculate type aliases before processing models (#6559)

A type alias in this context is where a model is simply another name for a
primitive type, such as `MyString` in the following model definitions:

    MyList:
      type: array
      items:
        $ref: '#/definitions/MyString'
    MyString:
      type: string

It is valid to use a type alias as a property in another object or array model,
even if the object/array is defined before the alias is, as in the example
above. However, the current alias logic only looks "back" in list of previously
defined models, meaning that `MyList` would not know that `MyString` is an
alias. This change fixes the incorrect behavior by pre-calculating the list of
aliases before any models are processed. It also changes the test endpoint to
verify the correct behavior even when an object is defined before an alias it
uses.

* [NancyFx] provide option to override package context (#6593)

* Retrofit2: Return ResponseBody if response if file.

Until now
--------------------
If a swagger endpoint returned a file (e.g. an image), then the Retrofit2
template has choosen the return type java.io.File. However, retrofit cannot
deal with this and throws a com.google.gson.stream.MalformedJsonException.

New:
-------------------
If a swagger endpoint returns a file, then the corresponding Retrofit2 endpoint
will return a okhttp3.ResponseBody which can be used to retrieve the file.

* Add the option packageContext for nancyFx which allows a better adjustment of the namespace.

* run nancyfx-petstore-server.bat

* Fix for self-referential imports in typescript-angular client (#6450)

* cache stack in shippable ci

* cache elixir deps

* add links to blog posts in techium.jp

* add partial header to haskell http client (#6606)

* [nancyfx] fix interface prefix (#6595)

* Retrofit2: Return ResponseBody if response if file.

Until now
--------------------
If a swagger endpoint returned a file (e.g. an image), then the Retrofit2
template has choosen the return type java.io.File. However, retrofit cannot
deal with this and throws a com.google.gson.stream.MalformedJsonException.

New:
-------------------
If a swagger endpoint returns a file, then the corresponding Retrofit2 endpoint
will return a okhttp3.ResponseBody which can be used to retrieve the file.

* fix Interface Prefix

* CsharpDotNet2Client - Use clientPackage in additionalProperties (#6581)

* CsharpDotNet2Client - Use clientPackage in additionalProperties if provided

* Give execution rights for csharp-dotnet2-petstore.sh

* Fix generation of C#.net2 apiPackage, modelPackage, clientPackage

* Fix modelPackage property missing when generating models

* Initialize clientPackage in constructor

* add link to ntt presentation

* rename silex-PHP to php-silex (#6612)

* rename CsharpDotNet2 to csharp-dotnet2 (#6611)

* add new language "ada"

* [Ada] Adding Ada support for client code generator (#6602)

* Ada language support (generic generator)

Implement the AbstractAdaCodegen class with the Ada keywords and global
behavior for Ada language

* Ada language support (main generator)

Implement the AdaCodegen class for the Ada client and server code generator
Initial implementation based on a mix from CppRestClientCodegen, NodeJSServerCodegen

* Ada language support: register the AdaCodegen generator class

* Ada language license template

* Ada language model templates (spec and body)

* Ada language client spec and body templates

* Ada language server spec and body templates

* Fix escaping Ada keywords for parameter name

* Generate GNAT project and update type mappings
- Use 'p_' as escape prefix for parameter names because identifiers are not allowed to start with '_'
- Add GNAT project file generation
- Update the type mappings to use the Swagger package types

* Fix generation of operations with no parameters

* Fix instantiation of Ada.Containers.Vectors package in generated model files

* New template for the GNAT project file generation

* Fix datatype generation for Ada language
- Override the getTypeDeclaration function to specify the datatype
- Fix definition of language predefined types

* Add a Serialize procedure declaration for the Ada model generation

* Add a Serialize procedure for the Ada template model generation

* Fix operation name and parameter name for Ada
- Declare and implement toAdaIdentifier function to verify and turn some identifier
  to Ada identifier following Ada style
- Override toOperationId and use toAdaIdentifier for generation of operation name
- Update toParamName to use toAdaIdentifier

* Media type support for Ada code generator
- Implement postProcessMediaTypes function to add a 'adaMediaType' member
  to each media type and map it to some Ada enumeration
- Post process the 'produces' and 'consumes' media type of an operation

* Use x-has-notes extension to avoid emitting notes when they are empty

* First generation for Ada client operation body

* Add a x-has-uniq-produces and x-has-uniq-consumes to media types
to indicate that the list contains only one item, this is necessary
for Ada generator for generation of arrays with one item only

* Add a postProcessParameter for Ada code generator to emit a x-is-model-type attribute

* Update Ada client body template for the serialization of data

* Fix postProcessParameter in Ada code generator to take into account file parameters

* Update the Ada client body to support form parameters

* Fix type name used for mapped types in the Ada generator

* Declare a Deserialize procedure for the Ada generated model

* Override the fromOperation for Ada client code generator
- Emit a x-codegen-response extension with the response description type
- Emit a x-id-model-type extension for each type property

* Update the Ada client package spec template to declare the result type

* Add support to extract response and return result in Ada client code

* Fix Ada postProcessModels to handle container properties and emit a correct x-is-model-type attribute

* Add support for Deserialize procedure in the Ada model generator

* Fix indentation of generated Ada client body package

* Add projectName option to configure the GNAT project name

* Update the GNAT project name for the Ada code generator

* Cleanup implementation and remove unused code

* Cleanup implementation and remove unused code

* Fix javadoc errors

* Use 'ada' for the language name to follow swagger-codegen convention
Add (beta) to the help description
Fix a NPE that occurs with incomplete yaml descriptions

* Typo error fix (#6620)

* [R] Added ApiClient and fixed other issues (#6571)

* Added namespace mustache to be generated

* Fixed syntax issues with package generation

* Added Response and Element mustache templates

* Added ApiClient

* Fix: Only required parameters needed for api operations

* Added documentation generated code

* Regenerated petstore samples

* Fixed url paths for operations

* Fixed based on comments in issues #6520

* Regenerated petstore samples

* add link to MS machine learning server

* Note precisely which clients and servers can be used with Haskell. (#6625)

* [Elixir] Improve Elixir Client about primitive type spec (#6623)

Fix following dialyzer warnings in the sample:

```
:0: Unknown type 'Elixir.Float':t/0
:0: Unknown type 'Elixir.Integer':t/0
```

* fix inconsistent java naming (#6624)

* [PHP] Fix: Type object not handled properly in setParameterExampleValue (#6619)

* Add test which reproduce the warning #5338

swagger-api#5338 (comment)
`[main] WARN io.swagger.codegen.languages.PhpClientCodegen - Type object not handled properly in setParameterExampleValue`

* Fix Type object not handled properly in setParameterExampleValue

* Update samples

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

* [GO CLIENT] Fix issue with generating code for API key  (#6630)

* [GO CLIENT] Fix Go security query parameter generation by using correct string literal and using the Add method.

* Add generated files.

* [objc] Let the developer specify the timezone to be used for date serialisation (#6628)

* [objc] Update deployment target to 8.0

Updates the test project deployment target to 8.0, as that's the lowest
supported by the latest XCode.

* [objc] Update petstore tests based on current master

Makes sure the tests are based on the latest version of master.

* [objc] Allow specifying the serialization timezone

Now it's possible to specify the timezone used for serializing dates

* [haskell-http-client] add support for auth methods (#6622)

* add support for auth methods

* use newtypes for required params

* fix duplicate operationId issues

* prevent aliasing of vendorextension references in fromOperation

* add --fast to stack ci build

* [Scala] Properly handle csv collectionFormat (#6540)

* Add support for lists of path parameters (eg instances), and default params for optional case classes

* Update Petstore sample

* Revert defaulting of case class fields to None

* Update Petstore sample

* represent swagger enums as union of literal types (#6233)

* represent swagger enums as union of literal types

enabling their easy use in angular templates, structural subtyping
among enums (in particular, different instances of the same enum
are now mutually assignable), improving type safety by preventing
incorrect widening, and permitting numeric enum values
(albeit without descriptive names)

Fixes #6206, #5146, #3500

* update samples

* restore blank lines at end of file

* fix typo

* add ada style guide

* [Ada] Adding Ada client samples (#6634)

* Add Ada client petstore samples
- Add script to generate Ada client support with swagger-codegen
- Add files to build the Ada sample
- Add main program to use the generated client samples API
  and connect to the server to perform some operations

* Add some description for the samples

* Update the documentation to explain how to build, how to use the generated Ada client code

* Issue 5431 Support jaxrs client api interfaces (#6412)

* Adds the ability to create code for an interface-based jaxrs client.

* Adds shell script and sample files for jaxrs-spec-interface

* rebase into adds shell

* Fixes bug in creation of Produces/Consumes in method annotation. Allows for instance "application/json; charset=utf-8"

* Fixes generated pom.xml

* Generate pom.xml by default

* Prettier output from api.mustache

* Fixes bug in mediatype, allowing charset-specification in swagger.yaml.

* Merges generation of interface-based jaxrs client/api into jaxrs-spec.

* Moves jaxrs-spec server interface to match location of jaxrs-spec server

* Makes Generated-annotation in genereated classes slightly prettier.

* [JavaScript] Fix licenseNames (#6605)

* [JavaScript] Fix licenseName in package.mustache

* Fix invalid SPDX license expression in resources/2_0

* Update JavaScript samples

* remove unused JS files

* #3904 Inheritance support java client retrofit gson (#4729)

* merge with master

* remove zoo specific artifact names

* fix duplicate doublequote

* #3904 add samples for retrofit2

* #3904 clean json field retrieval

* #3904 allow non-abstract parent class

* Fix class path for DeferredResult (#6452)

* fix NPE reported in #6519 (#6635)

* fix underscore to handle spaces (#6637)

* add link to ada's article

* use japanese name of taxpon

* Fix for regression in issue: swagger-api#6472 (#6480)

* add java version to pom in resteasy eap java8

* update java server samples

* Updated feign library dependency to io.github.openfeign (#6652)

Changed groupId from “com.netflix.feign” to “io.github.openfeign” from
gradle and sbt mustache templates.

* Add Serializable import to JaxRS-spec models if serializableModel is set (#6651)

* Swift4: Fix inline enum issue (#6640)

* Add addiitional files from upstream

* Remove mis-added files

* Fix compilation issue with Swift4 inline enums.

This change fixes this issue: swagger-api#6607

The problem was that I was using "datatype" instead of "datatypeWithEnum" in the model.mustache file.

When you have a the following model property:

"myInlineStringEnum": {
  "type": "string",
  "enum": [
    "inlineStringEnumValue1",
    "inlineStringEnumValue2",
    "inlineStringEnumValue3"
  ]
}

Then we were generating:

public enum MyInlineStringEnum: String, Codable {
  case inlinestringenumvalue1 = "inlineStringEnumValue1"
  case inlinestringenumvalue2 = "inlineStringEnumValue2"
  case inlinestringenumvalue3 = "inlineStringEnumValue3"
}

However, when we decode this, we were using type of the enum ("datatype") rather than the enum type itself ("datatypeWithEnum"). So we were generating:

myInlineStringEnum = try container.decodeIfPresent(String.self, forKey: "myInlineStringEnum")

rather than:

myInlineStringEnum = try container.decodeIfPresent(MyInlineStringEnum.self, forKey: "myInlineStringEnum")

* [angular-typescript] fix using form data (#6574)

* #6457: fix sending form params

* #6457: fix sending form params using files

* #6457: fix sending form params with files for angular 4.3

* #6457: generate samples

* #6457: [typescript-angular] fix form data submission in IE/Edge

* re-apply [typescript-angular] add customized encoder to use '+' char in query parameter #6306 (#6334)

* adapt for HttpClient: [typescript-angular] add customized encoder to use '+' char in query parameter #6306 (#6334)

* generate samples

* #6457: fix url parameter encoder imports for angular <4.3

* #6457: generate samples

* [haskell-http-client] bug fixes; path & newtype generation issues (#6638)

* fix path generation/param-substitution issues

* fix newtype de-duplication issues

* refactoring only

* correct version in comments

* prevent duplicate MimeTypes

* sort parameter newtypes

* comment out swift test due to build image changes

* revise wordings for powershell generator

* Update README.md (#6656)

Add my slide to README.md

* Updated api client, Required parameters {{#required}} .. {{/required}}, are mapped to Eiffel (#6653)

Void Safety Rules, optional parameters are translated to detachable TYPE.
Validation Rules are mapped to preconditions, at the moment maximun and minimun
validation has been added.
Improved API_CLIENT.parameter_to_tuple feature to accept a LIST [ANY] instead of LIST [STRING_32].
Improved model template to generate the model output.

* [kotlin] Fix syntax errors on localVariableHeader in api.mustache (#6660)

* Swift4: Add additional initializer for initializing model object with properties. (#6642)

* Add addiitional files from upstream

* Remove mis-added files

* Add additional swift4 initializer for initializing model object with properties.

This change fixes this issue: swagger-api#6641

It adds an additional initializer which allows model objects to be initialized using the properties. For exxample, if we had this model:

    "ErrorInfo": {
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "format": "int32"
        },
        "message": {
          "type": "string"
        },
        "details": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "description": "Example Error object"
    },

This we generate an initializer for this model object like this:

    public init(code: Int?, message: String?, details: [String]?) {
        self.code = code
        self.message = message
        self.details = details
    }

* Add hasVars checks around initializers and re-run all scripts to re-generate

* [PHP][Symfony] Generate valid PHP code (#6578)

Fixes #5985

We were experiencing syntax issues when generating the Petstore example. See some of the examples below:

StoreApiInterface.php
namespace Swagger\Server\Api;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use Swagger\Server\Model\Order;
**use maparray&lt;string,int&gt;;**
use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;

UserApiInterface.php
public function createUsersWithArrayInput(**User[]** $body);
public function createUsersWithListInput(User[] $body);
As far as I know, it is not possible to use array of objects in this way.

PetApiInterface.php
namespace Swagger\Server\Api;

use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use Swagger\Server\Model\Pet;
use Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException;
use Swagger\Server\Model\ApiResponse;
**use string[];**
use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;

public function findPetsByStatus(string[] $status);
public function findPetsByTags(string[] $tags);

* add Edubits to swift tech comm

* add back petstore test (#6663)

* add jaz-ah to swift, android tech committee

* golang: trailing whitespace fails gofmt (#6669)

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>

* update go petstore samples

* - Removed unnecessary line in in Restbed Codegen Constructor (#6675)

- Updated samples

* Included Open Systems International in the list of companies using Swagger Codegen (#6692)

* Add operationId as nickname to @ApiOperation (#6688)

* Add operationId as nickname to @ApiOperation

* Refresh samples after adding nicknames to @ApiOperation

* Swagger eiffel:fix (#6674)

* Updated api client, Required parameters {{#required}} .. {{/required}}, are mapped to Eiffel
Void Safety Rules, optional parameters are translated to detachable TYPE.
Validation Rules are mapped to preconditions, at the moment maximun and minimun
validation has been added.
Improved API_CLIENT.parameter_to_tuple feature to accept a LIST [ANY] instead of LIST [STRING_32].
Improved model template to generate the model output.

* Updated API_CLIENT.parameter_to_string feature, missing STRING representation.

* Updating sample using the latest modifications.

* [kotlin] Fix causing NoClassDefFoundError at runtime on Android device (#6661)

* Fix causing NoClassDefFoundError at runtime on Android device.

* Add samples modified by bin/kotlin-client-petstore.sh

* Add enum support for flask (#6684)

* update python flask petstore samples

* There was no validation when a required field was null, creating crash and null pointer exception further down the line in the business code. Now, it throws a InvalidArgumentException. (#6673)

* Added support for enums in Dart. (#6516)

* Added support for enums in Dart.

* Pick non-private names for enum values.

The _ prefix denotes a private member in Dart, so avoid generating enum values starting with this character.

* Properly encode enum values into query paramters.

* Various cleanups.

* Add support for x-enum-values extension.
Use class instead of enum for better ergonomy.
Better generated enum names.

* Fixed test.

* Support enum descriptions.

* Adding a new Scala client codegen (#6572)

* Adding a Scalaz codegen client

* Fixing imports and removing commented code

* Adding the bash file and updating the Pet store samples for Scalaz.

* Finalizing Scalaz generation so that it works for the Petstore.yaml

* Removing some unnecessary files and comments

* Removing some files that were accidentally generated for the wrong Scala

* add tbrown1979 as template creator for scalaz

* add scalaz to cirleci

* add beta to scalaz generator

* Add http://www.nttdata.com (#6713)

* [PHP] Fix #5338: InvalidArgumentException (#6685)

* Add endpoint definition which reproduces #5338 bug

* Update samples

* Add test case which reproduces #5338 bug

* Fix "InvalidArgumentException: Invalid resource type: object"

* Update samples

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

* [Elixir Client]Improve elixir client typings (#6665)

* [Elixir Client] Improve primitive typings

* [Elixir Client] Add type to models

Fix following dialyzer warnings in the sample:

```
:0: Unknown type 'Elixir.SwaggerPetstore.Model.ApiResponse':t/0
:0: Unknown type 'Elixir.SwaggerPetstore.Model.Client':t/0
:0: Unknown type 'Elixir.SwaggerPetstore.Model.Order':t/0
:0: Unknown type 'Elixir.SwaggerPetstore.Model.OuterBoolean':t/0
:0: Unknown type 'Elixir.SwaggerPetstore.Model.OuterComposite':t/0
:0: Unknown type 'Elixir.SwaggerPetstore.Model.OuterNumber':t/0
:0: Unknown type 'Elixir.SwaggerPetstore.Model.OuterString':t/0
:0: Unknown type 'Elixir.SwaggerPetstore.Model.Pet':t/0
:0: Unknown type 'Elixir.SwaggerPetstore.Model.User':t/0
```

* revise go header, minor formatting fix (#6695)

* JAXRS-SPEC: fix container return type (#6659)

* JAXRS-SPEC: fix container return type

* Run
./bin/jaxrs-spec-petstore-server.sh
./bin/jaxrs-spec-petstore-server-interface.sh

* add jaxrs-spec-interface to circle ci

* [C++] Sanitize operation ids. (#6664)

* [C++] Sanitize operation ids.

* [C++] Handle reserved words in `toOperationId`.

* [C++] Re-order reserved words alphabetically.

* [C++] Add missing reserved words.

* ContentType selection fix for csharp. (#6633)

* ContentType selection fix for csharp.
Updated to reflect java implementation. Previously any request body of type string was having the content type overridden to 'application/json'.  This prevented custom json ContentTypes

* updated the petshop codegen for C#

* Fixed content type selection test for csharp

* Replaced tabs with 4 spaces

* Removed trailing space / string comparison

* Prefix local vars to prevent conflict with params (#6717)

* Prefix local vars to prevent conflict with params

Fixes #6698

* Update test snapshots

* update all petstore security samples

* add resteasy-all shell script

* new files genreated by security shell scripts

* [haskell-http-client] handle Alias models + refactoring. (#6712)

* handle Alias models with newtypes

* add inlineConsumesContentTypes cli option

* generate swagger.yaml instead of swagger.json

* check for/validate unhandled authMethods

* refactoring

* Fix spring api operation annotation (#6700)

* * Fix apioperation annotation using generics in class reference for spring server generation

* * Regenerate classes for new spring template

* [Java][JAX-RS-CXF] Add JsonProperty to POJO (#6710)

* Included Open Systems International in the list of companies using Swagger Codegen

* Force Jackson to use the real names of the properties of the Data type defined in the YAML

* Update of the Petstore CXF server sample

* Update of the Petstore CXF client sample

* Update of the Petstore CXF server annotated base path sample

* Update of the Petstore CXF server non spring application sample

* Changed {{name}} for {{baseName}} following the correction posted by @wing328

* Update of the Petstore CXF server sample

* [New Generator] Rust API client/server generator (#6613)

* Rust API client/server generator

* `Future::boxed()` has been deprecated - replace with `Box::new(...)`

* rebasing to rust

* MMMLS211 use empty vec over none

* MMMLS211 rebuild after merge from rust

* MMMLS211 YAML array examples not wrapped in Some()

* MMMLS211 Array parameters bad mustache fix

* MMMLS211 don't parse map containers

* MMMLS211 Tidy container types

* MMMLS-211 rebuild example

* MMMLS211 mvn rebuild

* Percent-decode parameters contained in the path

* Produce warnings when unknown fields are present

We still accept unknown fields and discard them. However, to improve
diagnosability, we now write a warning log and return a `Warning`
header.

Note that this is server-only

* Markup

* MMMLS211: Make optional arrays Options again

* 211 markups

* Temporary attempt at tweaking Cow ownership tweak while merging changes from rust branch

* Remove to_string call while parsing path parameters, which requires definining a temporary var in a block because rust can't tell where a Cow reference gets dropped

* Fix rustfmt to the correct version

* Fix rustfmt to the correct version

* Add more response information to ApiError in client

* Re-add missing brace

* Code review markups

* Allow converting out of wrapper types

* Store arrays in new-types too

* Use a new hyper_client every request

* Add vec-like traits to array types

* Xml support - new branch

* Moved conversion from serde_xml_rs::Error to ApiError from swagger-rs to client code until upstream PR is accepted

* MMSUB-172 Don't set Content-Type when there's no body.

If we don't have a body we've serialized, then don't declare
any content type for the nonexistent body.

This is really important for 204 No Content responses, but it's
also morally important for all other non-bodied responses.

* MMSUB-172 Move to swagger 0.6.

* Manually implement debug for the client

* Allow `Context` to be bound to `Api`, and not passed on every function call

* Support "." in parameter names

* Support generate's "--reserved-words-mappings" option

* Support "." in parameter names

* Support generate's "--reserved-words-mappings" option

* bug fixes (#6743)

* [Rust] rename rust2 to rust-server (#6747)

* rename rust2 to rust-server

* update rust-server batch file to use petstore test spec

* Bugfix/6750 name clash between npm request and parameter called request (#6753)

* rename request to $request

* update examples files

* rename $request to localVarRequest

* rename oder variables to localVar...

* revert changes to fakes yaml (#6758)

* revert changes to fakes yaml

the yaml currently includes invalid definitions that do not exist: ('#/definitions/xmlObject').
revert to known good yaml state.

* update template creators

* [JavaScript] Handle custom request.agent (#6737)

* Handle custom request.agent

* better semantic

* update JS petstore samples

* update ruby petstore samples

* Fixed link to open issues (correct label is 'help wanted') (#6779)

* remove unused files from Ruby petstore client

* [Java][JAXRS-CXF] Improve API documentation in the CXF Server stub and Client generation (#6708)

* Inclusion of API documentation in CXF Server stub generation

* Inclusion of API documentation in CXF client generation

* Update of the Petstore CXF server sample

* Update of the Petstore CXF client sample

* Update of the Petstore CXF server annotated base path sample

* Update of the Petstore CXF server non spring application sample

* Changed {{{appDescription}}} to {{appDescription}} to use the HTML-escaped value in handling special characters like <, > in the description following the correction made by @wing328

* Update of the Petstore CXF samples

* Add Metaswitch to list of companies (#6773)

* Update README.md (#6783)

Add my company to `Companies/Projects using Swagger Codegen`

* Fixed Python client docstrings (#6780)

* Updated api_client and configuration docstrings

ApiClient: Removed host param, added configuration and cookie param

Configuration: Docstrings are only read from the @property decorated
function, not the setter, moved the more descriptive docstrings from the
setters to property functions

* Ran bin/python-petstore.sh

* [TypeScript-Angular] Path URI Encoding Update (#6769)

* Replaced the method for updating path to prep for URL encoding.
The new method will switch TypeScript-Angular variables from snake_case to camelCase in the URL generation.

Imported StringBuffer, Matcher, and Pattern, since the new solution needs them.
Some extra whitespace on blank lines was removed.

* Since these were not up to date with the current master, I ran them and am commiting them here.
This way, the changes are shown here instead of after future commits.

* Simplified the code for the path conversion A LOT.
New version is much simpler to follow, and very efficient - only one iteration through the length of the string.
Removed regex Matcher and Pattern classes, since they weren't needed anymore.

*  [PHP][Symfony] Enhancements (#6615)

* Removed commented code

* Input validation is now supported as strict JSON validation

* [PHP][Symfony] Improve the implementation
Closes #6614

* Generated code is tested to assure it compiles and updated README to dynamically load dependencies via composer

* Updated shell script because shippable tests were failing

* Allow using help command with run-in-docker.sh (#6706)

* Change version

* Add baikal repositories
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment