Commit Graph

11440 Commits

Author SHA1 Message Date
Kiran-Sivakumar
9df70798b3 [Java][okhttp-gson] Add option to employ builders for API requests (#1341)
* Generate APIs that use the builder pattern

* Add option to use builders for API requests

* Fix template spacing

* Add new sample-generation script and generated samples

* Update docs

* Add new sample-generation script for Windows

* Replace config option with vendor extension

* Remove useBuildersForApiRequests config option

* Remove builders sample-generation scripts

* Replace config option with vendor extension in api_test template

* Remove okhttp-gson-requestBuilders sample

* Rename x-builders-for-api-requests to x-group-parameters

* Add modified api_doc.mustache under okhttp-gson resources

* Add modified README.mustache under okhttp-gson resources

* Update petstore samples

* Fix FakeApiTest.java in petstore samples

* Add whitespace to rerun checks

* Remove whitespace to rerun tests

* Fix FakeApiTest.java in parcelable petstore sample

* Update versions in samples

* Update versions in samples
2018-11-28 17:53:36 +08:00
Akihito Nakano
3efe56752e Improve error message when the spec is not found (#1495)
* Improve error message when spec not found

* Add test yaml

* Fix invalid yaml file path

* Fix typo
2018-11-28 16:50:52 +08:00
rasmusfaber
d8dde6855f Use checksum to decided if input spec has changed. (#1502) 2018-11-28 16:43:00 +08:00
meganemura
ebf67e683c Fix regexp in ruby-client (#1521)
* Fix regexp in ruby-client

* Remove tests for unknown regexp patterns
2018-11-28 16:40:58 +08:00
William Cheng
9b99b6b6bf
better hanlding of string type with different format (#1558) 2018-11-28 11:21:54 +08:00
William Cheng
33016f2790
Update NPM installation instruction (#1556)
* Update NPM installation instruction

* further revise the doc
2018-11-28 00:27:35 +08:00
William Cheng
963173b357
Add link to conference presentation (#1554) 2018-11-27 23:59:23 +08:00
Michael Ramstein
d31fa4f7c4 Typespec: Fixes issue with formated primitivs (#1534) 2018-11-27 21:34:54 +08:00
Michael Ramstein
247bd68880 Decodes list with primitvs (#1536) 2018-11-27 17:00:10 +08:00
Michael Ramstein
4eae430cca [elixir] Fixes BadMapError for header parameters (#1537)
* Adds :headers as expected param mapping

* Gen Petstore
2018-11-27 16:59:16 +08:00
William Cheng
51a3a22928
Add online services to the documentation (#1550)
* update online service

* update readme with online services

* minor wording change

* revise wordings

* add links to linode logo
2018-11-27 15:51:23 +08:00
William Cheng
46a4ffe64c
Skip model generation if it's a top-level map or array (#1296)
* update samples

* remove string boolean map spec

* add logic to skip array alias being generated as model

* fix alias to array

* remove unused ruby files

* remove unused ruby (oas3) files

* unalias response schema

* fix NPE when no model defined

* fix ruby openapi3 script

* update samples

* add global openapi, schemas for unaliasing

* minor code cleanup/refactoring using globalSchemas

* Revert "minor code cleanup/refactoring using globalSchemas"

This reverts commit 20a2bbc6fc4267a0e0768dcf5f15d4194ce9647b.
2018-11-26 22:01:53 +08:00
Yuichi Okada
ce0253892c [PHP client] Fix README.md template for php (#1540)
* Fix README.md template for php

* update php openapi3 samples
2018-11-26 13:41:27 +08:00
William Cheng
bf2932d41c
fix array of enum class in JS (#1484) 2018-11-24 17:04:59 +08:00
William Cheng
f8ada391c4
Fix boolean value handling in HTTP request body (#1515)
* fix boolean http body handling

* fix typo in parameter name
2018-11-24 16:42:32 +08:00
Christian Schneider
0ba9278308 #1506 Bump Zone.js to remove warnings when using angular >=6. (#1522)
* 1506 allow zonejs 0.7.x and 0.8.x to support a wider range of angular versions

* #1506 Removed zone.js as peer since it comes with angular itself

* #1506 Removed zone.js as peer since it comes with angular itself
2018-11-24 16:42:09 +08:00
Erik Timmers
e91d6d735d
[elm] Add support for nested Lists & Dicts (#1528)
And rename Union Types to Custom Types and Aliases to Records.
2018-11-23 16:03:07 +01:00
Juan Eugenio Abadie
dd33434064 [cpp rest-sdk] Reponse headers handler (#1511)
* Add support to set a Response headers handler
* Update PetStore
* Fix missing names
* Update PetStore
2018-11-23 11:38:40 +01:00
William Cheng
cf04ba30db
Fix the function name starting with numbers (#1513)
* update elixir samples

* fix function name starting with numbers

* add new files
2018-11-23 17:32:51 +08:00
William Cheng
5aa1da7c2e
Add utility methods for free-form objects (isFreeFormObject) (#1338)
* add utility methods for models

* add isFreeFormObject tag

* add object mapping for elixir client

* minor fix to free form object check
2018-11-22 18:46:09 +08:00
Jon Schoning
9be5b99266 [haskell-http-client] fix typename generation bug for array params; update deps
- fix build for example-app + tests-integration in Samples (due to change in Category)

  - upgrade stack to 12.18

  - fix typename generation bug for array params
2018-11-20 18:38:07 -06:00
Alwin Garside
792f95eb09 [PHP] Use appDescription in composer.mustache (#1485)
* Use appDescription in composer.mustache

* Update petstore files

* More updated php petstore files

* Yet another updated php petstore file

* Use "{{{appDescription}}}" instead of "{{appDescription}}"
2018-11-20 10:30:14 +09:00
William Cheng
2b58f6737a
fix typo in java client docstring (#1494) 2018-11-19 21:14:03 +08:00
William Cheng
363b095721
better warning, default value (#1492) 2018-11-19 20:55:29 +08:00
meganemura
b9949e1a8e Generate a ruby-client sample for OpenAPI 2.0 (#1482)
* Move output directory for bin/openapi3/ruby-client-petstore.sh

$ git mv sample/client/petstore/ruby sample/openapi3/client/petstore/ruby-client

* $ bin/ruby-client-petstore.sh

* Run bin/ruby-client-petstore.sh in bin/utils/ensure-up-to-date
2018-11-19 17:02:19 +08:00
William Cheng
f58bd6d839
fix NPE for scala gatling generator (#1479) 2018-11-19 11:06:16 +08:00
William Cheng
0e693cd9a8
Fix NPE with cpp-restsdk client generator (#1477)
* fix_cpprest_npe

* fix_code_format
2018-11-19 11:05:44 +08:00
Ludovic Montel
7f8ff35245 fix #1272 Fix wrong PHP Symfony typehint (#1453)
A model with an array property used to have the wrong PHP typehint in
the setter: the array item object type instead of "array"
2018-11-18 12:38:44 +08:00
Arshad Kazmi
2c418e1b71 Fixed scripts list url in README.md (#1481) 2018-11-18 10:20:32 +09:00
William Cheng
941b3ea015 fix NPE in the C# Nancy generator (#1478) 2018-11-17 10:11:14 -05:00
William Cheng
c656194f22
Add C template creator to project's README (#1476) 2018-11-17 18:42:40 +08:00
Steven Masala
5b57eae5de add TUI InfoTec GmbH as company (#1472) 2018-11-17 11:38:13 +08:00
William Cheng
edc05df774
Add C client generator (#516)
* add c generator (1st commit)

* udpate c model template

* more fixes

* Add string replace function for C generator (#908)

* Add string replace function for C generator

* Fixed replacement for variable only

* Fixed problem for different datatypes of paramName

* store return value of modified path

* set str_replace variable to be same as original variable.

* [C] Fixed coding style issues

* add uncrustify support

* update petstore sampmles

* add Locale.ROOT

* added test-api-client.c to include test cases for strReplace function

* added header and body mustache and made changes to ClibcurlClientCodegen.java accordingly

* [C] renamed functions in apiKey.c.mustache according to apiKey.h.mustache

* [C] changes in import statement

* renamed apiKey.h to keyValuePair.h and made necessary changes in the codes

* changed apiKey.c according to keyValuePair.h

* fixed import statement in model

* added code for generating struct in model-header.mustache

* added typedef struct for model-headers

* updated sample/client/petstore/C

* fix locale

* [C] Function addition and modification of major structs (#1020)

* added readme file

* fixed parameters in api headers functions

* made changes to add readme file and typemapping of array to list

* fixed header import statement in apiheader files

* modified struct of model type in model header

* updated sample

* modified README file

* updated sample

* parse from json function added

* modified struct and create function

* added include for model

* modified parsefromjson function

* modified struct and create function for more datatypes

* added mapping for date-time and modified model import return statement

* modified function parameters

* modified include statement

* fix function in api body

* updated sample

* clean up files

* regenerate c petstore

* fix error message when setting uncrustify

* add version to uncrustify usage

* added uncrustify rules in  mustache (#1021)

* added uncrustify rules in  mustache

* updated sample

* updated same with crustify

* updated sample with uncrusitfy 0.67

* modified readme about uncrustify requirements

* fixed mistakes in readme mustache and sample readme

* fix file import, unformat c petstore

* fix import in test files

* fix model with complexType

* fix free string, format the code using uncrustify

* modified sample

* Modified sample to check

* return type issue figured,more to do to fix it

* minor fixes to make complete code compile

* Compiling sample code. Store has issue with map.

* comment out test file generation which is not req.

* commented operation name

* fixed various issues responsible for code not compiling

* test mustache temporary for testing

* updated sample add,del,getbyid works, formparam yet to do

* few minor changes and added fuction to add different header and content type in apiClient

* added code to upload image

* added function to test upload image

* fixes for fileupload and various other small things

* fixed issue due to xml produces

* updated sample:working sample add,del,find,uploading:tocheck ,

* added free functions for variable where memory is allocated

* rename imagecontainer struct to filestruct

* fix issues with if functions for all list types

* fixed issue with primitive return type in header file

* updated sample w/ free functions

* update c samples

* remove corrupted file

* update samples

* test cases for APIs

* added function to generate test cases from new mustache

* mustache files for manual written test cases

* added default content type to application/json

* fixed issue with primitive return type

* fixed issue with bool type

* added file apiKey.c

* updated sample tested

* update c environment variable (#1090)

* add mapping for map (#1103)

* minor update

* revert list paramter check to NULL

* modified return type for primitive(map - list_t)in mustache

* removed apiClient_free as it was two times

* updated sample

* fixed issue of path parameter when string less than parameter len

* fixed issue for form paramters upload

* added checks to avoid seg faults

* updated sample

* added check for null value in form parameter

* modified size of mallocs to dynamic

* updated sample

* Add C Petstore to Travis CI (#1136)

* setup CI for C petstore

* update bash script permission

* unit petapi test

* fixed memory leak in strReplace and apiClient Functions

* modified return value for status generation

* added enum defination and functions to convert and back from string

* added function for enum and made changes to free memory at necessary places

* added datatype handling for enum

* fixes regarding memory allocation and free

* updated mustache of test files

* updated sample

* renamed manually written test files

* manual test file for pet

* cleaned common api test file for time being

* renamed test files

* added renamed test files to build test bash

* added file null pointer check

* modified uncrusitfy rules

* minor update to c templates (#1161)

* [C] Fixed enum function declaration  (#1178)

* fixed enum function declaration in model headers

* fixed enum declaration in header files for sample

* disable curl verbose mode and add response code variable

* added response code variable in apiClient struct

* modified apiClient header and source file

* added response and removed commented code api-body mustache

* removed commented code from model-body mustache

* removed unnecessary print statements from test mustache

* updated sample

* fixed spaces issue

* Better format in C templates (#1224)

* better format in the c template

* minor format fix

* [C] changed base url from static to dynamic (#1225)

* changed basePath from static to dynamic

* removed unnecessary header declaration

* updated sample

* [C] added curl version check in CMakeList.txt (#1248)

* added curl version check in CMakeList.txt

* Updated README for latest curl version

* [C] Major changes to keyValuePair function (#1282)

* removed static declaration

* changed static declaration

* added difference for string and non string

* added more code for different function for string and non string

* fix issue with param name

* change value in keyPairValue to void

* fixed issue of difference in function name cases

* added support for non char parameters in api

* fix issue of map return data

* modified manual-StoreAPI map return data handling

* fix minor mistake

* added support for map and changed code to support value of keyvaluepair as char and other

* updated sample

* fixed api header declarations

* change map declaration in header

* resolved issues realted to map data handling

* fix minor issues

* add N at start if enum variable starts with number

* override toParamName method

* changed paramters to paramName from baseName

* change variables in apibody from baseName to paramName

* Skip test file generation (#1459)

* skip test file generation

* skip overwriting CMakeLists.txt
2018-11-17 01:32:18 +08:00
William Cheng
6ab6896a13
comment out dart2 test, update rust server samples (#1471) 2018-11-17 01:27:07 +08:00
Benjamin Gill
32b8d7fee7
[rust-server] Always derive Debug (#1404)
* Add test for file response

* Always derive Debug

Now that we're using a byte array, we can guarantee that deriving Debug will always work
2018-11-16 12:28:05 +00:00
Shengpeng Liu
dc3a3dd15a Fix openapi_types generation error (#1256) 2018-11-15 21:38:45 +08:00
William Cheng
8d9542207a
Prepare 3.3.4 snapshot (#1450)
* change version to 3.3.4-snapshot

* updat readme

* update samples
2018-11-15 16:21:15 +08:00
William Cheng
31d9928734 Revert "force deployment"
This reverts commit e5c0d227ab.
2018-11-15 12:25:14 +08:00
William Cheng
e5c0d227ab force deployment 2018-11-15 11:39:14 +08:00
James Addyman
653601bef2 Fix #1424 [SWIFT4] Date Encoding Issues (#1442)
Ensure the same date format string is used throughout the generated code (use the one set in Configuration.swift).

Ensure the same date formatter options are used when encoding dates as well as decoding dates. If a consumer has set their own date formatter on CodableHelper, use that when encoding dates too.

Adds DateFormatTests to the SWIFT4 unit tests.

Updates the SWIFT4 petstore samples
2018-11-15 11:20:39 +09:00
William Cheng
7564d629e7
prepare 3.3.3 release (#1447) 2018-11-14 23:56:58 +08:00
William Cheng
f647b2f24b
Add file post-processing to C++ client, server generators (#1440)
* add file post processing to cpp generators

* use clang to auto format cpp-restsdk code

* restore cpp-restsdk samples without clang format
2018-11-14 16:43:14 +08:00
William Cheng
0165b0fb33
test all generators with fake petstore spec 2.0, 3.0 (#1439) 2018-11-14 15:55:09 +08:00
Jim Schubert
df1819daa9 C# template refactor (#737)
* [csharp] Refactor to support third-party customization more easily

* [csharp] Regenerate OpenAPIClient sample

* create new csharp-refactor client gen

* update samples

* fix Locale.ROOT

* fix import

* remove outdated files, update samples
2018-11-14 14:41:42 +08:00
William Cheng
3c28946f1e
[Android] Fix compilation errors when there's no model defined (#1438)
* remove model import when there is no model

* fix android http client no model issu due to import
2018-11-14 14:02:05 +08:00
TNM Technologies
22902e72a1 fix(#1423): [JAVA] generating Map with jaxrs-reasteasy does not import (#1426)
* fix(#1423): [JAVA] generating Map with jaxrs-reasteasy does not import
the hashmap

https://github.com/OpenAPITools/openapi-generator/issues/1423

* fix(#1423): fix ensure-up-to-date issues for jaxrs-resteasy joda
samples

https://github.com/OpenAPITools/openapi-generator/issues/1423
2018-11-14 10:18:53 +08:00
William Cheng
efde4a8eb8
Fix issue with C# generator when the model name is "File" (#1428)
* fix get schema type in abstract c# class

* update c# petstore sample
2018-11-14 09:43:31 +08:00
Akihito Nakano
c8837ea414
Change entrypoint to docker-entrypoint.sh (#1413)
Run entrypoint script
2018-11-13 17:24:04 +09:00
William Cheng
7c3a2a5c07
Fix run-in-docker by disabling useSystemClassLoader (#1418)
* test run-in-docker in travis

* fix command path

* correct batch mode arg

* disable useSystemClassLoader
2018-11-12 22:07:46 +08:00
William Cheng
7e3149e675
fix npe when paramName is null (#1416) 2018-11-12 22:06:58 +08:00