Skip to content

Commit

Permalink
Add - Status colors in Wiki, Example per parameter (#12394)
Browse files Browse the repository at this point in the history
This are small (but visually nice) improvements:
- Add colors: 200 = green, 300 = blue, 400 = red
- Add an example per parameter for better understanding
  • Loading branch information
chatelao committed May 21, 2022
1 parent c270640 commit 11462e7
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,37 +22,37 @@ h3. {{nickname}}
|| Protocol | {noformat:nopanel=true}{{scheme}}{noformat} |
|| Path | {noformat:nopanel=true}{{path}}{noformat} |
|| Base Path | {noformat:nopanel=true}{{basePath}}{noformat} |
{{#hasProduces}}|| Produces | {noformat:nopanel=true}{{#produces}}{{mediaType}}{{/produces}}{noformat} |{{/hasProduces}}
{{#hasProduces}}|| Produces | {noformat:nopanel=true}{{#produces}}{{mediaType}} {{/produces}}{noformat} |{{/hasProduces}}
----
h4. Parameters
{{#hasPathParams}}
h5. Path Parameters
||Name||Description||Type||Required||Default||Pattern||Enum||
||Name||Description||Type||Required||Default||Pattern||Enum||Example||
{{#pathParams}}{{>param}}{{/pathParams}}
{{/hasPathParams}}

{{#hasBodyParam}}
h5. Body Parameter
||Name||Description||Type||Required||Default||Pattern||Enum||
||Name||Description||Type||Required||Default||Pattern||Enum||Example||
{{#bodyParams}}{{>param}}{{/bodyParams}}
{{/hasBodyParam}}

{{#hasHeaderParams}}
h5. Header Parameters
||Name||Description||Required||Default||Pattern||
||Name||Description||Type||Required||Default||Pattern||Enum||Example||
{{#headerParams}}{{>param}}{{/headerParams}}
{{/hasHeaderParams}}

{{#hasQueryParams}}
h5. Query Parameters
||Name||Description||Required||Default||Pattern||
||Name||Description||Type||Required||Default||Pattern||Enum||Example||
{{#queryParams}}{{>param}}{{/queryParams}}
{{/hasQueryParams}}
----
h4. Responses
{{#responses}}

|| Status Code | {status:colour=Green|title={{code}}|subtle=false} |
|| Status Code | {status:colour={{#is2xx}}Green{{/is2xx}}{{^is2xx}}{{#is4xx}}Orange{{/is4xx}}{{^is4xx}}Red{{/is4xx}}{{/is2xx}}|title={{code}}|subtle=false} |
|| Message | {{message}} |
|| Response Type | {{{dataType}}} |
|| Response Model | [{{dataType}} Model|#{{dataType}}ModelAnchor|Jump to model] |
Expand Down Expand Up @@ -81,8 +81,8 @@ h2. Models
{{#allowableValues}} {{#enumVars}} |{{{name}}} |{{{value}}} |{{{enumDescription}}} |
{{/enumVars}}
{{/allowableValues}} {{/isEnum}}
{{^isEnum}}||Field Name||Required||Type||Description||Enum||
{{#vars}} |{{baseName}} |{{#required}}(/){{/required}}{{^required}}(x){{/required}} |{noformat:nopanel=true}{{{dataType}}}{noformat} |{{description}} | {{#isEnum}} {{_enum}} {{/isEnum}} |
{{^isEnum}}||Field Name||Required||Type||Description||Enum||Example||
{{#vars}} |{{baseName}} |{{#required}}(/){{/required}}{{^required}}(x){{/required}} |{noformat:nopanel=true}{{{dataType}}}{noformat} | {{description}} | {{#isEnum}} {{_enum}} {{/isEnum}} | {{example}}
{{/vars}} {{/isEnum}}
{{/model}}
{{/models}}

0 comments on commit 11462e7

Please sign in to comment.