Skip to content
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

Move templates in clients #255

Merged
merged 93 commits into from
Mar 23, 2021
Merged

Move templates in clients #255

merged 93 commits into from
Mar 23, 2021

Conversation

api-clients-generation-pipeline[bot]
Copy link
Contributor

ackintosh and others added 30 commits July 13, 2018 22:28
* Rename templateDir: rails5 -> ruby-on-rails-server

* Rename script: rails5-petstore-server.sh -> ruby-on-rails-server-petstore.sh

* Rename sample folder: rails5 -> ruby-on-rails

* Rename script(openapi3): rails5-petstore-server.sh -> ruby-on-rails-server-petstore.sh

* Update ruby-on-rails-server-petstore.sh

* Rename templateDir: sinatra -> ruby-sinatra-server

* Rename script: sinatra-petstore-server.sh -> ruby-sinatra-server-petstore.sh

* Rename sample folder: sinatra -> ruby-sinatra

* Update script

* Rename templateDir: ruby -> ruby-client

* Rename script: ruby-petstore.sh -> ruby-client-petstore.sh

* Update scripts

* Update samples

- bin/ruby-sinatra-server-petstore.sh
- bin/ruby-on-rails-server-petstore.sh
- bin/ruby-client-petstore.sh
- bin/security/ruby-client-petstore.sh
* better handling of operationId starting with numbers in Ruby

* update Rubocop to use Layout
…ction reset (#715)

* prevent throwing another exception if the request fails eg connection reset

* prevent throwing another exception if the request fails eg connection reset
* Fix methods split for readable

* Recreate sample
* update ruby samples with OAS3 spec

* add server support to ruby api client

* minor format change

* minor format fix, skip form models

* better exception and add test for invaid value

* remove exception test code
…nt. (#1393)

* Added tests and fix for issue #1392. Param validation with regex not recognizing \d correctly in Ruby client.

* Added generated files to pass ./bin/utils/ensure-up-to-date which is run by circleci
* Fix return_type parameter examples

* $ bin/openapi3/ruby-client-petstore.sh
* add oneOf support to Ruby

* add anyOf support to ruby client

* add discriminator support to ruby client

* fix typo

* update samples, fix NPE

* better format in ruby generator

* fix test cases, disable mapping test

* fix update script, update samples

* add test, fix mapping

* update exit code

* reenabled discriminator test

* remove duplicated properties

* add test for duplicated properties

* update samples, add new spec

* fix ruby test cases

* fix hasMore after removing duplicates

* refactor method, comment out haskell client test

* fix hasMore and update samples

* fix parent detection

* fix discriminator check

* [haskell-http-client] need to use {{vars}}{{required}} instead of {{requiredVars}}

* remove deprecated methods in default codegen (#1031)

* regenerate samples

* remove commented code
* Add Model.build_from_hash

* Use Model.build_from_hash instead of Model.new.build_from_hash

* Update sample for ruby-client

* Update sample for openapi3 ruby-client
* Fix typos

* update petstore samples
…#2102)

* [Ruby] Delete empty lines and trailing newline in template to prevent Rubocop's rule violation (#2100)

* [Ruby] update samples of Ruby client (#2100)
* use double-quote string for enum value (#2081)

* use enumVars in templates for Ruby client (#2081)

* delete unnecessary line in enum model of Ruby client (#2081)

* update samples of Ruby client (#2081)
* Fix usage of regular expression literals in Ruby client (#2069)

* update samples of Ruby client (#2069)
* add to_s in api error class

* rename variable to align with code sample

* fix initalize, better validation

* update petstore samples

* add code sample for model

* add auto-generated travis file

* improve error message

* add travis file

* uncomment to_s
* update ZenTest

ZenTest 4.11.1 requires rubygems 2.x.

But Ruby 2.6.0 include rubygems 3.x.
So we can't use ruby client in Ruby 2.6.0.
https://www.ruby-lang.org/en/news/2018/12/25/ruby-2-6-0-released/

ZenTest 4.11.2 removed rubygems dependency so we should update.
seattlerb/zentest@1883b21

* update ruby client sample
* output dataType to YARD tag

YARD supports parameter type tag.
https://www.rubydoc.info/gems/yard/file/docs/Tags.md#param

We can use `dataType` as parameter type.
So it's very useful to output `dataType`.

* update samples
* maps 'boolean' to 'Boolean' in Ruby (#2385)

* update Ruby client samples (#2385)
* Add Rubocop

* Update samples

./bin/openapi3/ruby-client-petstore.sh
./bin/ruby-client-petstore.sh
* use Integer instead of Fixnum in Ruby client (#2475)

* update samples (#2475)
…#2458)

* [#2441] Update documentation mustache files for PHP client

This commit fixes issues with Markdown/CommonMark parsing by linting and enforcing consistent style.[#2441]
Issues with generated markdown files as reported by markdownlint for node.js are:

- MD001 heading-increment/header-increment - Heading levels should only increment by one level at a time
- MD002 first-heading-h1/first-header-h1 - First heading should be a top level heading
- MD007 ul-indent - Unordered list indentation
- MD009 no-trailing-spaces - Trailing spaces
- MD010 no-hard-tabs - Hard tabs
- MD011 no-reversed-links - Reversed link syntax
- MD025 single-h1 - Multiple top level headings in the same document
- MD031 blanks-around-fences - Fenced code blocks should be surrounded by blank lines
- MD032 blanks-around-lists - Lists should be surrounded by blank lines
- MD040 fenced-code-language - Fenced code blocks should have a language specified
- MD041 first-line-h1 - First line in file should be a top level heading

* [#2441] Update documentation mustache files for ruby client

This commit fixes issues with Markdown/CommonMark parsing by linting and enforcing consistent style.[#2441]
Issues with generated markdown files as reported by markdownlint for node.js are:

- MD001 heading-increment/header-increment - Heading levels should only increment by one level at a time
- MD002 first-heading-h1/first-header-h1 - First heading should be a top level heading
- MD007 ul-indent - Unordered list indentation
- MD009 no-trailing-spaces - Trailing spaces
- MD010 no-hard-tabs - Hard tabs
- MD011 no-reversed-links - Reversed link syntax
- MD025 single-h1 - Multiple top level headings in the same document
- MD031 blanks-around-fences - Fenced code blocks should be surrounded by blank lines
- MD032 blanks-around-lists - Lists should be surrounded by blank lines
- MD040 fenced-code-language - Fenced code blocks should have a language specified
- MD041 first-line-h1 - First line in file should be a top level heading

* [#2441] Update documentation mustache files for javascript client

This commit fixes issues with Markdown/CommonMark parsing by linting and enforcing consistent style.[#2441]
Issues with generated markdown files as reported by markdownlint for node.js are:

- MD001 heading-increment/header-increment - Heading levels should only increment by one level at a time
- MD002 first-heading-h1/first-header-h1 - First heading should be a top level heading
- MD007 ul-indent - Unordered list indentation
- MD009 no-trailing-spaces - Trailing spaces
- MD010 no-hard-tabs - Hard tabs
- MD011 no-reversed-links - Reversed link syntax
- MD025 single-h1 - Multiple top level headings in the same document
- MD031 blanks-around-fences - Fenced code blocks should be surrounded by blank lines
- MD032 blanks-around-lists - Lists should be surrounded by blank lines
- MD040 fenced-code-language - Fenced code blocks should have a language specified
- MD041 first-line-h1 - First line in file should be a top level heading

* [#2441] Update documentation mustache files for Java client

This commit fixes issues with Markdown/CommonMark parsing by linting and enforcing consistent style.[#2441]
Issues with generated markdown files as reported by markdownlint for node.js are:

- MD001 heading-increment/header-increment - Heading levels should only increment by one level at a time
- MD002 first-heading-h1/first-header-h1 - First heading should be a top level heading
- MD007 ul-indent - Unordered list indentation
- MD009 no-trailing-spaces - Trailing spaces
- MD010 no-hard-tabs - Hard tabs
- MD011 no-reversed-links - Reversed link syntax
- MD025 single-h1 - Multiple top level headings in the same document
- MD031 blanks-around-fences - Fenced code blocks should be surrounded by blank lines
- MD032 blanks-around-lists - Lists should be surrounded by blank lines
- MD040 fenced-code-language - Fenced code blocks should have a language specified
- MD041 first-line-h1 - First line in file should be a top level heading

* [#2441] Update documentation mustache files for GO client

This commit fixes issues with Markdown/CommonMark parsing by linting and enforcing consistent style.[#2441]
Issues with generated markdown files as reported by markdownlint for node.js are:

- MD001 heading-increment/header-increment - Heading levels should only increment by one level at a time
- MD002 first-heading-h1/first-header-h1 - First heading should be a top level heading
- MD007 ul-indent - Unordered list indentation
- MD009 no-trailing-spaces - Trailing spaces
- MD010 no-hard-tabs - Hard tabs
- MD011 no-reversed-links - Reversed link syntax
- MD025 single-h1 - Multiple top level headings in the same document
- MD031 blanks-around-fences - Fenced code blocks should be surrounded by blank lines
- MD032 blanks-around-lists - Lists should be surrounded by blank lines
- MD040 fenced-code-language - Fenced code blocks should have a language specified
- MD041 first-line-h1 - First line in file should be a top level heading

* [#2441] Update documentation mustache files for Rust client

This commit fixes issues with Markdown/CommonMark parsing by linting and enforcing consistent style.[#2441]
Issues with generated markdown files as reported by markdownlint for node.js are:

- MD001 heading-increment/header-increment - Heading levels should only increment by one level at a time
- MD002 first-heading-h1/first-header-h1 - First heading should be a top level heading
- MD007 ul-indent - Unordered list indentation
- MD009 no-trailing-spaces - Trailing spaces
- MD010 no-hard-tabs - Hard tabs
- MD011 no-reversed-links - Reversed link syntax
- MD025 single-h1 - Multiple top level headings in the same document
- MD031 blanks-around-fences - Fenced code blocks should be surrounded by blank lines
- MD032 blanks-around-lists - Lists should be surrounded by blank lines
- MD040 fenced-code-language - Fenced code blocks should have a language specified
- MD041 first-line-h1 - First line in file should be a top level heading

* [#2441] Update documentation mustache files for C# client

This commit fixes issues with Markdown/CommonMark parsing by linting and enforcing consistent style.[#2441]
Issues with generated markdown files as reported by markdownlint for node.js are:

- MD001 heading-increment/header-increment - Heading levels should only increment by one level at a time
- MD002 first-heading-h1/first-header-h1 - First heading should be a top level heading
- MD007 ul-indent - Unordered list indentation
- MD009 no-trailing-spaces - Trailing spaces
- MD010 no-hard-tabs - Hard tabs
- MD011 no-reversed-links - Reversed link syntax
- MD025 single-h1 - Multiple top level headings in the same document
- MD031 blanks-around-fences - Fenced code blocks should be surrounded by blank lines
- MD032 blanks-around-lists - Lists should be surrounded by blank lines
- MD040 fenced-code-language - Fenced code blocks should have a language specified
- MD041 first-line-h1 - First line in file should be a top level heading

* [#2441] Update documentation mustache files for Android client

This commit fixes issues with Markdown/CommonMark parsing by linting and enforcing consistent style.[#2441]
Issues with generated markdown files as reported by markdownlint for node.js are:

- MD001 heading-increment/header-increment - Heading levels should only increment by one level at a time
- MD002 first-heading-h1/first-header-h1 - First heading should be a top level heading
- MD007 ul-indent - Unordered list indentation
- MD009 no-trailing-spaces - Trailing spaces
- MD010 no-hard-tabs - Hard tabs
- MD011 no-reversed-links - Reversed link syntax
- MD025 single-h1 - Multiple top level headings in the same document
- MD031 blanks-around-fences - Fenced code blocks should be surrounded by blank lines
- MD032 blanks-around-lists - Lists should be surrounded by blank lines
- MD040 fenced-code-language - Fenced code blocks should have a language specified
- MD041 first-line-h1 - First line in file should be a top level heading

* Update README.mustache

* [#2441] Update documentation mustache files for Ada client

This commit fixes issues with Markdown/CommonMark parsing by linting and enforcing consistent style.[#2441]

* [#2441] Update documentation mustache files for Apex client

This commit fixes issues with Markdown/CommonMark parsing by linting and enforcing consistent style.[#2441]

* [#2441] Update documentation mustache files for bash

This commit fixes issues with Markdown/CommonMark parsing by linting and enforcing consistent style.[#2441]
* Pass opts argument to api client in ruby-client

We want to change the option when debugging, changing timeout to specific api, etc...
So we want to merge and pass options to api client.

* fix ruby-client

* fix openapi ruby-client

* fix typo

* fix template
* better wording for version of openapi doc

* update petstore samples
* Support for Bearer in Ruby Client

* Update README.mustache

* Update README.mustache

* Update api_doc.mustache

* Update api_doc.mustache

* Update api_doc.mustache

* samples

* Uncommited changes

* Formatting

* More Formatting

* Fomatting

* More formatting

* More formatting

* Even more formatting

* Even more formatting

* More formatting

* Even more formatting

* More formatting

* More formatting
* Ruby client: escape path parameters

Path parameters should be escaped when encoded into the path.

In the path '/pet/{petId}' let's pretend petId is a string instead of a
number.

If the user uses "Bobby" as the petId then they correctly get the path
'/pet/Bobby'.
But if they put 'Bobby/Tables' as the petId then they used to get the
path '/pet/Bobby/Tables' which will be interpreted by the server as a
different route.

Using CGI::Escape they now get '/pet/Bobby%2FTables' which is correct.

* Ruby client- regenerate further files

Thank you @autopp for noticing I needed to update
`samples/openapi3/client/petstore/ruby`.

Regenerated by running `bin/openapi3/ruby-client-petstore.sh`.

PR #3039
jfeltesse-mdsol and others added 22 commits November 25, 2020 23:47
* [ruby] Improve ruby client examples

* samples

* quote fixes

* Keep enum value

* better string type handling

* fix failing tests

* add space after comment

* update samples

* use Time

Co-authored-by: William Cheng <wing328hk@gmail.com>
* Allow aliasing of auth keys

* update sample and add config for feature

* update samples

Co-authored-by: William Cheng <wing328hk@gmail.com>
Added missing closing brace in list_invalid_properties model method.
…y concerns (#8730)

* address security issue when downloading files in the ruby client

* update samples

* fix double quote
… security concerns (#8730)" (#8807)

This reverts commit 18a6f5a941f3b5777977693f3b59ac5d200928a8.
…450ca0c4edc2'

git-subtree-dir: .generator/templates
git-subtree-mainline: a782b26
git-subtree-split: b6d10d8
@therve
Copy link
Contributor

therve commented Mar 23, 2021

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@therve therve merged commit a981f89 into master Mar 23, 2021
@therve therve deleted the datadog-api-spec/generated/889 branch March 23, 2021 14:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.