67 Commits

Author SHA1 Message Date
Amin Yahyaabadi
dc96d648f7
docs: add instruction for building the binary (#18473) 2024-04-24 13:36:55 +08:00
Christopher Kobusch
45a3fe05f5
Add Xojo client generator (#15194)
* Add Xojo client

* Add Xojo client generator

* Add Xojo client generator

* hide generation timestamp for xojo samples

---------

Co-authored-by: William Cheng <wing328hk@gmail.com>
2023-05-03 14:06:40 +08:00
Tanmay Mohapatra
4bc16ea6bb
Added a Julia client and server (#14520)
* Added a Julia client and server

This PR adds two new generators for the [Julia language](https://julialang.org/)
- `julia-client` to generate a client from specifications
- `julia-server` to generate a server with stubs that can be used to host a server conforming to the specifications

The generated code uses the Julia [OpenAPI.jl](https://github.com/JuliaComputing/OpenAPI.jl) package that includes support functions for both client and server.

* fix javadoc generation

* add changes after ensure-up-to-date run
2023-01-30 16:40:33 +08:00
Takuto Yuki
36976d5c72
Update Sort list of style guides (#13502) 2022-09-27 11:08:59 +08:00
Thomas Hansen
4c2fb932d0
Small adjustment to Contributing Guidelines (#12984) 2022-07-23 09:02:01 +08:00
Bernhard Danecker
32a3eb1655
fix generate-samples code sample line break (#9880) 2021-07-03 22:09:53 +08:00
Samuel Kahn
343d7eb712
[cpp-ue4] Improved retry system to use Unreal's FHttpRetrySystem (#9382)
* Revert "[cpp-ue4] Added the possibility to retry requests easily with AsyncRetry method on the response and SetAutoRetryCount on the request"

* [cpp-ue4] Improved retry system to use Unreal's FHttpRetrySystem

* [cpp-ue4] Updated style guide link

* update samples

Co-authored-by: William Cheng <wing328hk@gmail.com>
2021-05-06 11:26:07 +08:00
William Cheng
1df719801e
Add a new crystal client generator (beta) (#8304)
* add crytsal client generator

* update samples

* update doc

* regenerate spec

* regenerate spec

* various fixes

* test crystal in circleci

* test crystal client in drone ci

* Revert "test crystal client in drone ci"

This reverts commit 317f2cf2a09f902c08ced214e8e5802fa79c3de8.

* fix install

* fix installation

* test crystal in travis

* cache image

* add --cache-from

* update doc

* run petstore with mvn

* install crystal

* fix install crystal

* sudo mvn

* run server

* using mvnw

* fix form or body parameter

* remove crystal from circleci

* fix test

* remove cache-from

* update doc
2021-01-07 17:10:22 +08:00
timo-a
d90fd10a75
Update CONTRIBUTING.md with typo corrections - no semantic changes (#7811)
* Update CONTRIBUTING.md

typos

* update doc

Co-authored-by: William Cheng <wing328hk@gmail.com>
2020-10-27 22:14:08 +08:00
Jim Schubert
ca3fa4b9cb
[contrib][docs] Assert importance of title/description/repro steps (#7103) 2020-08-04 09:59:08 +08:00
Daniel Ludwig
b838e1885f
typescript-node: clean up require and import (#6947)
* Fix for issue 4656 typescript-node generate invalid require statement instead of import statement

* Fixed broken link under testing templates

* Result of run generate-samples.sh / typescript-node*

* import stmt depending on flag supportsES6

* Update petstore sample for typescript-node

* import ... from stmt for http/request module

* update samples

* update doc

Co-authored-by: William Cheng <wing328hk@gmail.com>
2020-07-31 17:58:43 +08:00
William Cheng
789b158cd4
Add "Allow edits from maintainers" tips to the doc (#7068)
Add "Allow edits from maintainers" tips to the doc
2020-07-29 15:41:19 +08:00
William Cheng
47b7a0d243
Update documentation with global propperty (#6863)
* update documentation with global propperty

* remove java opts

* remove KotlinNewServerCodegen

* update contributing.md
2020-07-05 18:20:26 +08:00
Tino Fuhrmann
ff68128c15
[TypeScript] Rewritten TypeScript client generator supporting fetch & jquery (#6341)
* Added http module draft

* Added generic enum

* Modified http lib, added config & middleware definition to ts-fetch

* Added model generation with imports

* Added auth module

* Added servers

* Added sample for typescript client

* WIP: Models & API

* Updated auth

* WIP: api modeling

* Implemented RequestFactory and Processor completely

* Implemented fetch client

* Ignore dist folder in typescript client sample

* Added middleware to fetch

* Restructured TypeScript generator

* Reverted: http library.send returns string again

* Removed TODOs

* Added pom.xml files to TypeScript PetStore client samples

* Removed tabs from TypeScriptClientCodegen

* Added ts client codegen to root pom.xml and travis

* Added server variable configuration to ts-refactor

* [TS-Refactor] Added tests for Object Serializer

* Added simple test for PetApi

* Fixed ObjectSerializer test

* Added handling for different http status codes and test for deletePet

* Removed tabs in TypeScriptClientCodegen

* Removed tabs in DefaultCodegen

* Additional tests for pet store api

* Fixed file uploads

* Made api call configuration separately settable

* Use string union for enums

* Remove tab

* Restructured module layout

* Use observables internally

* Added promise based middleware

* Made discriminator and attributeTypeMap readonly

* Configure discriminator correctly

* Set discriminator value automatically

* Fixed date-time and date handling

* Added comments & license info

* Added comments

* Ignore openapi-generator-cli/bin

* Removed accidentally created generated code

* Fixed compilation issues in TypeScriptClientCodegen

* Added typescript to docs/generators

* Updated docs

* Added gitignore and git_push

* Added jquery library

* Added pom.xmls, fixed packagejsons and hopefully webppack

* Removed tabs in TypeScriptClientCodegen

* Fixed a couple issues with pom.xml

* Ensured up to date

* Fixed missing fetch definition in TS default tests

* Updated typescript docs

* Refactor typescript merge master (#4319)

Merge master into ts-refactor

* Typescript refactor: stub rxjs (#4424)

* Remove unused supportsES6 field from codegen

* Add a new switch for RXJS

* Remove redundant npm dependency on rxjs4 types

* Fix return type of PromiseMiddleware methods

* Install webpack dependency to run jquery tests

* Update form-data to 2.5 which includes typings

* Add missing dependency on node typings

* Fix test artifact name typo

* Stub rxjs when it is not explicitly enabled

* Typescript refactor: Platform select for browser and node (#4500)

* Use string form of filename parameter

This works for the form-data library and is also compatible with the
browser FormData object.

* Add new option to select platform node or browser

When no platform is selected, a default is chosen by the framework
option and likewise the file data type option is implied by the
platform.

* Remove redundant import of node dns module

* Only use form-data library for node platform

* Generate npm package from npmName option

* Use method convertPropertyToBooleanAndWriteBack

* Generate typescript samples with ensure-up-to-date

* Removed tab from DefaultCodegen

* Readded missing change

* Mark typescript client codegen as experimental

* Removed whitespace

* [TS-Refactor] Top-level exports for fetch & jquery (#6138)

* Added top-level exports
* Updated generator README
* Updated typescript generator docs

* Allow browsers File type for files (#5521)

* Allow passing file parameters as File objects
* Add test for jquery upload
* Use HttpFile object for node platform
* Regenerate samples

This is by far the most common use case. A `File` object already
contains the name attribute. This commit allows that information to be
used directly.
When sending a `Blob`, in most browsers the `File` constructor can be
used to assign a file name. In all other browsers the alternative is
```typescript
Object.assign(data, { name: "foobar.txt" });
```
That is why we explicitely pass the name as third parameter to
`FormData.append`. This `Object.assign` method also works for `Buffer`
objects in node.

If one really does not want to touch the data object in the browser it
is possible to define another reference to the data with
```typescript
new Blob([data], { type: data.type })
```
or in node via
```typescript
Buffer.from(data)
```

* [TS-Refactor] Added options for npm version, repository, name and updated readme (#6139)

* Added options for npm version, repository, name and updated readme

* Removed `this`  where not required

* Updated typescript docs

* Typescript refactor fixes (#6027)

Fixes a handful of issues identified in https://github.com/OpenAPITools/openapi-generator/issues/802#issuecomment-617262139

List of changes

* Clean: Remove redundant cliOption definition

* Remove redundant directory structure in templates

If we need to have different index.ts files for the different
frameworks, we can mostly do that in the one mustache file. In the cases
where that is not possible, we can still add a new override file later.

* Use File.separator consistently

* Only export selected api type

* Simplify promise polyfill import

The behaviour should be the same, according to the es6-promise docs.
Previously tsc would report the error:
> error TS2307: Cannot find module 'es6-promise'.

* Import HttpFile in all models

* Export server configurations

* Use undefined as default body value

The empty string is not interpreted as "no body" by the browser fetch
api and thus leads to an exception during get requests

* Improve codestyle: prefer guards to nesting

* Remove verbose debug output

This should not be commited, because every developer has very different
requirements what debug information he needs to see.

* Fix: Use cleaned model names for imports

* Fix: do not call toString on undefined

* Fix typo in doc comment

* Introduce RequestBody type and remove method check

* Support media types other than json (#6177)

List of changes:

* Add */* as fallback to accept header

* Use more sophisticated media type selection

* Handle object stringify in ObjectSerializer

* Parse response with ObejctSerializer

* Fix: Correctly extract response headers in browser

* Create HttpFile objects from responses

* Handle binary responses

* Clean up dependencies and replace isomorphic-fetch

Instead of isomorphic-fetch, which is unmaintained, we directly use
node-fetch and whatwg-fetch polyfills.

* Updated versions in ts-default/jquery and ts docs

* Replaced isSuccessCode with is2xx

* [TypeScript-Refactor] Use OAIv3 spec and fix bugs in JQuery Blob download (#6416)

* Change to OAIv3 spec for TS-Refactor

* Moved samples to oaiv3 folder

* Updated package-lock

* Update pom to use OAIv3 paths for Typescript-refactor

* Renamed ts-refactor samples & tests in pom.xmls

* Fixed compile issues in ts-refactor jquery http test

* Fixed bugs in blob handling of jquery

* [Typescript] Support http bearer authentication with token provider (#6425)

* Add http bearer security

* Update typescript to 3.9

* Fix: Use Authorization header for basic and bearer

* Allow asynchronous tokenProvider in bearer auth

* Add TS-Rewrite-Jquery tests node_modules to travis caching

* Remove NoAuthentication

* Added file to generate TS samples on Windows

* Exclude btoa in browser

* Regen samples

* Remove outdated ToDo comments

* Document and optimize `getReturnType` in TSClientCodegen

* Added option to generate objects for operation function arguments

* Upgrade typescript docs

* Updated generators

* Updated samples

* Updated docs

* Readded pom.xml

* [Typescript] Support InversifyJS (#6489)

* Add config option to enable InversifyJS

* Add pascal case lambda for mustache

* Generate a class for each auth method

* Add service identifiers and service binder helper

* Split Configuration into interface and factory

This way we don't need to import the factory everywhere to do
typechecking.

* Define minimal interface for ServerConfiguration

* Add annotations for inversify when enabled

* Always expose list of server configurations

* Add samples and defalt tests for useInversify

* Simplify sample generation script

* Fix: Add object_params arg description to help

* Fix: Properly enable inversify with bool property

* Build tests in pom instead of prepublish

Otherwise running `npm install`, when the build failed was impossible.

* Update dependencies for inversify tests

* Test basic api service resolution

* Remove Promise and Observable prefix from exports

* Fix, RxJS: Import Observable in object params api

* Add ioc service identifier for object param api

* Add hint about unimpeded development

* Simplify api service binder syntax

* Remove default tests for inversify

* Add wrapper for easy promise based http libraries

This wrapper allows defining and injecting http libraries that do not
need to know anything about observables, especially when useRxJS is not
enabled. I will employ this in the tests for InversifyJS.

Not sure if we should also use this wrapper internally.

* Add named injects for remaining auth parameters

* Directly inject promise services without RxJS

* Add tests for api service binder

* Add convenience method to bind all api services

* Fix: Rename inversify test artifact

* Run bin/utils/copy-to-website.sh

* Restore changes to CONTRIBUTING.md from PR #6489

Co-authored-by: Bodo Graumann <mail@bodograumann.de>
Co-authored-by: Esteban Gehring <esteban.gehring@bithost.ch>
2020-06-15 08:12:39 +02:00
William Cheng
f2a615d693
Update PR checklist for Windows users (#6599)
* Update PR checklist for Windows users

* update contributing

* update building doc

* update doc
2020-06-10 16:43:26 +08:00
Sebastien Rosset
ce8cdcdf25
[DOC] Add link to integration test wiki in CONTRIBUTING.md (#5570)
* Add link to integration test wiki

* Add link to integration test wiki
2020-03-11 00:39:53 +08:00
valery1707
b22f7f033f Reduce scope of recommended git configuration (#4983) 2020-01-13 10:34:43 +08:00
Yuriy Belenko
cd6ec0dcf5 Update PHP coding style link (#4727)
* [PHP] Update PHP coding style link

* [PHP] Update website doc
2019-12-09 11:13:20 +08:00
Arun
d09146d359 Corrections to script names (#4135) 2019-10-13 18:06:41 +08:00
DanielHabenicht
7af2bc8dff add link to the "new-generator" guide (#3227)
* add link to the new--generator guide

* Update CONTRIBUTING.md
2019-06-26 17:57:24 +02:00
Sebastien Arod
8344102341 Improve CONTRIBUTING.md (#2699)
* Improve CONTRIBUTING.md

Indicate that bin/openapi3 scripts should be executed too.

Try to clarify how to run tests:
* use in sample a client for which tests exist
* explain where to run the command and how to find the artifactId

* Update contributing.md by running copy-to-website
2019-04-22 11:53:56 +08:00
ota42y
e810848a03 fix test script path in CONTRIBUTING.md (#2290)
* fix test script path in CONTRIBUTING.md

`./bin/ruby-petstore.sh` renamed by #534 so we should fix CONTRIBUTING.md

* fix website
2019-03-07 15:55:20 +08:00
William Cheng
147e193b31
minor doc revision (#1242) 2018-10-18 22:53:47 +08:00
William Cheng
dd8dd48a62
Revert "Various improvements (#1213)" (#1220)
This reverts commit 448680e7640097d1e04ef1eca0dacab4cb9d966f.
2018-10-11 20:11:51 +08:00
William Cheng
448680e764
Various improvements (#1213)
* update readme

* fix logger warning
2018-10-11 15:41:00 +08:00
Jérémie Bresson
defedf6e2b
Mention new branches in the doc pages (#287)
* Mention new branches in docs
* Add badges for new branches in README.md
* Allow branches "3.1.x" and "4.0.x" to deploy (.travis.yaml)
2018-06-12 12:05:32 +02:00
William Cheng
7d75c66180
Various updates (#419)
* various updates

* update pom.xml

* update ci config with new location

* Change "swagger-codegen" to "openapi-generator" in a comment

* fix pom.xml for bash client

* minor fix to github ID

* fix pom for ios
2018-05-11 15:28:32 +08:00
Jérémie Bresson
fbf2e135ef Docs: several small fixes (#399)
* Fixes for CONTRIBUTING.md

* Other docs fixes
2018-05-09 21:49:27 +08:00
Jérémie Bresson
e9793783cd
Fixes in GitHub templates files (#311) 2018-05-04 13:44:01 +02:00
William Cheng
8aa5642845
add dart style guide 2018-01-30 11:06:42 +08:00
Euan Kemp
26a665c771 [Rust] Recommend style based on 'rustfmt' defaults (#7335)
Rustfmt is widely accepted in the rust community. The actual style it
enforces is not completely stable, but running a reasonably recent
rustfmt and reading the short rfc-based style guide seems better than
nothing by a long shot.
2018-01-08 10:56:01 +08:00
wing328
7a7dd6d4cd add ada style guide 2017-10-08 12:08:45 +08:00
wing328
28a3206d16 update swift link, add kotlin, powershell 2017-09-27 11:52:44 +08:00
wing328
d4b8658e07 add style guide for R 2017-08-25 22:52:55 +08:00
wing328
45213e0eb6 add tips about github keyword 2017-07-25 15:09:38 +08:00
Javier Velilla
fa73e56c17 Enhancements to the Eiffel generator #6057 (#6138)
Added shell scripts, batch files to generate Eiffel Petstore samples.
Added Setup CI (travis, shippable, etc) to cover the Eiffel Petstore samples.
Refactored part of the code into an Abstract Eiffel base class,
which can be later used in Eiffel server stub generators.
Added Eiffel Style guide to the contribution guidelines so that Eiffel contributors know what to follow in terms of code style
Fixed code generator issues.
Updated mustaches templates.
2017-07-22 16:55:45 +08:00
wing328
f756bd7a72 add style guide for C++ tizen 2017-07-04 19:09:18 +08:00
wing328
8e29326eb5 add link to faq
https://github.com/swagger-api/swagger-codegen/wiki/FAQ#git
2017-03-29 22:24:49 +08:00
wing328
65d5b5001f add https://github.com/inaka/erlang_guidelines 2017-03-17 16:44:21 +08:00
wing328
436cbb6b3d add https://github.com/christopheradams/elixir_style_guide 2017-03-17 16:43:08 +08:00
wing328
9bb58d2040 add git tip 2017-01-12 23:36:43 +08:00
Bartek Kryza
0fb154e9a2 [Bash] Bash client script generator (#4541)
* Initial commit

* Remormatted petstore tests

* Added Bash codegen to main README.md

* Added bash to integration tests

* Fixed stdin detection in generated script

* Added back ruby module
2017-01-12 16:48:25 +08:00
wing328
537dcbe036 fix https://github.com/airbnb/javascript/ 2016-12-17 00:40:56 +08:00
wing328
7719bc8f1d add https://github.com/bbatsov/clojure-style-guide 2016-12-13 16:09:15 +08:00
ChrisJamesC
6472baa44e Fix typos in CONTRIBUTING.md 2016-11-28 16:57:10 +01:00
wing328
515fe33c2c add more info about test with latest master 2016-10-06 15:16:04 +08:00
wing328
b6e2c5a301 Update CONTRIBUTING.md 2016-09-10 00:23:49 +08:00
wing328
81e9bd0d73 add tips for filing better PR 2016-09-10 00:23:00 +08:00
wing328
907361cded add merge commit message 2016-07-05 07:46:42 +08:00
wing328
cbaa577c64 add more info about vendor extensions 2016-06-29 14:32:23 +08:00