Skip to content

Conversation

@Manny651
Copy link

@Manny651 Manny651 commented Dec 7, 2017

Mainly to get swagger-api#6851

konopski and others added 30 commits October 8, 2017 18:25
…er-api#4729)

* merge with master

* remove zoo specific artifact names

* fix duplicate doublequote

* swagger-api#3904 add samples for retrofit2

* swagger-api#3904 clean json field retrieval

* swagger-api#3904 allow non-abstract parent class
…6652)

Changed groupId from “com.netflix.feign” to “io.github.openfeign” from
gradle and sbt mustache templates.
* 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")
* swagger-api#6457: fix sending form params

* swagger-api#6457: fix sending form params using files

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

* swagger-api#6457: generate samples

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

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

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

* generate samples

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

* swagger-api#6457: generate samples
…agger-api#6638)

* fix path generation/param-substitution issues

* fix newtype de-duplication issues

* refactoring only

* correct version in comments

* prevent duplicate MimeTypes

* sort parameter newtypes
Add my slide to README.md
…}, are mapped to Eiffel (swagger-api#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.
… properties. (swagger-api#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
Fixes swagger-api#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);
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
* Add operationId as nickname to @apioperation

* Refresh samples after adding nicknames to @apioperation
gmarz and others added 29 commits November 27, 2017 17:06
* Add sensible defaults for not required params in scala

* Also default to None for async methods
* Issue swagger-api#4680 correct values for enum with escaped double quotes

* Issue swagger-api#4680 regenerate samples

* Issue swagger-api#4680 remove new lines

* Issue swagger-api#4680 fixed scripts

* Issue swagger-api#4680 update samples under CentOS
* Do not apply content-type header if no request body

* Set content-type header if there are form params

* Add tests

* Run update script

* Regenerated sample clients
Blog Post I wrote for Dreamfactorys Blog last year showing how to use Swagger to generate Client SDKs and using them
… etc. (swagger-api#6997)

* Add context to all requests for tracing, logging, cancellations, etc.

* Fix compile error with when call has no parameters.
…pi#7072)

* Update samples using latest codegen and templates

* Fix issue 6746 - problem with array models where array element type is a primitive
* Add build.sbt to Akka-scala

* Add readme.md and build.sbt to petstore sample
* Pass optional as null

* Addressing review comments

* Addressing review comments-2

* Addressing review comments-3
* Operation now returns StatusCode Stubs as well

* Updated mustache file to use comments

return StatusCode(..) is now commented out.

* Change default(..) to not escape the type

default(dataType) --> default(&dataType)

* Return IActionResult no matter what..

* Updated formatting

* Ran bin/aspnetcore-petstore-server.sh
* Add README.md to the typescript jquery client generator

* Fix from code reviews about the addition of README.md. Made the fix in fetch too since it was a copy paste
)

* Updated to .NET Core 2.0

* Fixed issue with IConfiguration vs. IConfigurationRoot

* Ran bin/aspnetcore-petstore-server.sh

* Updated to .NET Core 2.0

* Fixed issue with IConfiguration vs. IConfigurationRoot

* Ran bin/aspnetcore-petstore-server.sh
# Conflicts:
#	modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/AspNetCoreServerCodegen.java
#	modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/CSharpClientCodegen.java
@matdube matdube merged commit dd834bf into Vooban:fix-nullables Apr 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.