-
-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* [ruby] fix oneOf handling * use previous ruby configs due to issue #4690 * check for oneOf model in base_object * validate the attributes in partial_oneof_module
1 parent
6f6822a
commit 522faf8
Showing
221 changed files
with
2,719 additions
and
1,732 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 12 additions & 19 deletions
31
modules/openapi-generator/src/main/resources/ruby-client/model_doc.mustache
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,12 @@ | ||
{{#models}}{{#model}}# {{moduleName}}::{{classname}} | ||
|
||
## Properties | ||
|
||
Name | Type | Description | Notes | ||
------------ | ------------- | ------------- | ------------- | ||
{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#isReadOnly}}[readonly] {{/isReadOnly}}{{#defaultValue}}[default to {{defaultValue}}]{{/defaultValue}} | ||
{{/vars}} | ||
|
||
## Code Sample | ||
|
||
```ruby | ||
require '{{moduleName}}' | ||
|
||
instance = {{moduleName}}::{{classname}}.new({{#vars}}{{name}}: {{example}}{{^-last}}, | ||
{{/-last}}{{/vars}}) | ||
``` | ||
|
||
{{/model}}{{/models}} | ||
{{#models}} | ||
{{#model}} | ||
{{#oneOf}} | ||
{{#-first}} | ||
{{>partial_oneof_module_doc}} | ||
{{/-first}} | ||
{{/oneOf}} | ||
{{^oneOf}} | ||
{{>partial_model_generic_doc}} | ||
{{/oneOf}} | ||
{{/model}} | ||
{{/models}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
modules/openapi-generator/src/main/resources/ruby-client/partial_model_generic_doc.mustache
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# {{moduleName}}::{{classname}} | ||
|
||
## Properties | ||
|
||
| Name | Type | Description | Notes | | ||
| ---- | ---- | ----------- | ----- | | ||
{{#vars}} | ||
| **{{name}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional]{{/required}}{{#isReadOnly}}[readonly]{{/isReadOnly}}{{#defaultValue}}[default to {{defaultValue}}]{{/defaultValue}} | | ||
{{/vars}} | ||
|
||
## Code Sample | ||
|
||
```ruby | ||
require '{{{gemName}}}' | ||
|
||
{{^vars}} | ||
instance = {{moduleName}}::{{classname}}.new() | ||
{{/vars}} | ||
{{#vars}} | ||
{{#-first}} | ||
instance = {{moduleName}}::{{classname}}.new( | ||
{{/-first}} | ||
{{name}}: {{example}}{{^-last}},{{/-last}} | ||
{{#-last}} | ||
) | ||
{{/-last}} | ||
{{/vars}} | ||
``` |
Oops, something went wrong.