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

Fix header parameters display in the documentation #1579

Merged
merged 2 commits into from
Nov 30, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bin/cwiki-petstore.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ fi

# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g cwiki -o samples/documentation/cwiki $@"
ags="generate -t modules/openapi-generator/src/main/resources/confluenceWikiDocs -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g cwiki -o samples/documentation/cwiki $@"

java $JAVA_OPTS -jar $executable $ags
2 changes: 1 addition & 1 deletion bin/html-petstore.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ fi

# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g html -o samples/documentation/html $@"
ags="generate -t modules/openapi-generator/src/main/resources/htmlDocs -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g html -o samples/documentation/html $@"

java $JAVA_OPTS -jar $executable $ags
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ h2. Endpoints
{{#hasHeaderParams}}
h5. Header Parameters
||Name||Description||Required||Default||Pattern||
{{#headerParam}}{{>param}}
{{/headerParam}}
{{#headerParams}}{{>param}}
{{/headerParams}}
{{/hasHeaderParams}}

{{#hasQueryParams}}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{{#isHeaderParam}}<div class="param">{{baseName}} {{^required}}(optional){{/required}}{{#required}}(required){{/required}}</div>
<div class="param">{{baseName}} {{^required}}(optional){{/required}}{{#required}}(required){{/required}}</div>

<div class="param-desc"><span class="param-type">Header Parameter</span> &mdash; {{unescapedDescription}} {{#defaultValue}}default: {{{defaultValue}}} {{/defaultValue}}{{#dataFormat}}format: {{{dataFormat}}}{{/dataFormat}}</div>{{/isHeaderParam}}
<div class="param-desc"><span class="param-type">Header Parameter</span> &mdash; {{unescapedDescription}} {{#defaultValue}}default: {{{defaultValue}}} {{/defaultValue}}{{#dataFormat}}format: {{{dataFormat}}}{{/dataFormat}}</div>
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
{{#hasHeaderParams}}
<h3 class="field-label">Request headers</h3>
<div class="field-items">
{{#headerParam}}{{>headerParam}}{{/headerParam}}
{{#headerParams}}{{>headerParam}}{{/headerParams}}
</div> <!-- field-items -->
{{/hasHeaderParams}}

Expand Down
2 changes: 1 addition & 1 deletion samples/documentation/cwiki/.openapi-generator/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.2.1-SNAPSHOT
3.3.4-SNAPSHOT
30 changes: 16 additions & 14 deletions samples/documentation/cwiki/confluence-markup.txt
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,15 @@ h2. Endpoints
h4. Parameters
h5. Path Parameters
||Name||Description||Required||Default||Pattern||
|petId |Pet id to delete |(/) | | |
|petId |Pet id to delete |(/) |null | |



h5. Header Parameters
||Name||Description||Required||Default||Pattern||

|apiKey | |(x) |null | |





Expand Down Expand Up @@ -103,7 +105,7 @@ h2. Endpoints

h5. Query Parameters
||Name||Description||Required||Default||Pattern||
|status |Status values that need to be considered for filter |(/) | | |
|status |Status values that need to be considered for filter |(/) |null | |



Expand Down Expand Up @@ -174,7 +176,7 @@ array[Pet]

h5. Query Parameters
||Name||Description||Required||Default||Pattern||
|tags |Tags to filter by |(/) | | |
|tags |Tags to filter by |(/) |null | |



Expand Down Expand Up @@ -242,7 +244,7 @@ array[Pet]
h4. Parameters
h5. Path Parameters
||Name||Description||Required||Default||Pattern||
|petId |ID of pet to return |(/) | | |
|petId |ID of pet to return |(/) |null | |



Expand Down Expand Up @@ -391,7 +393,7 @@ Pet
h4. Parameters
h5. Path Parameters
||Name||Description||Required||Default||Pattern||
|petId |ID of pet that needs to be updated |(/) | | |
|petId |ID of pet that needs to be updated |(/) |null | |



Expand Down Expand Up @@ -430,7 +432,7 @@ Pet
h4. Parameters
h5. Path Parameters
||Name||Description||Required||Default||Pattern||
|petId |ID of pet to update |(/) | | |
|petId |ID of pet to update |(/) |null | |



Expand Down Expand Up @@ -475,7 +477,7 @@ ApiResponse
h4. Parameters
h5. Path Parameters
||Name||Description||Required||Default||Pattern||
|orderId |ID of the order that needs to be deleted |(/) | | |
|orderId |ID of the order that needs to be deleted |(/) |null | |



Expand Down Expand Up @@ -574,7 +576,7 @@ map[String, Integer]
h4. Parameters
h5. Path Parameters
||Name||Description||Required||Default||Pattern||
|orderId |ID of pet that needs to be fetched |(/) | | |
|orderId |ID of pet that needs to be fetched |(/) |null | |



Expand Down Expand Up @@ -836,7 +838,7 @@ Order
h4. Parameters
h5. Path Parameters
||Name||Description||Required||Default||Pattern||
|username |The name that needs to be deleted |(/) | | |
|username |The name that needs to be deleted |(/) |null | |



Expand Down Expand Up @@ -890,7 +892,7 @@ Order
h4. Parameters
h5. Path Parameters
||Name||Description||Required||Default||Pattern||
|username |The name that needs to be fetched. Use user1 for testing. |(/) | | |
|username |The name that needs to be fetched. Use user1 for testing. |(/) |null | |



Expand Down Expand Up @@ -973,9 +975,9 @@ User

h5. Query Parameters
||Name||Description||Required||Default||Pattern||
|username |The user name for login |(/) | | |
|username |The user name for login |(/) |null | |

|password |The password for login in clear text |(/) | | |
|password |The password for login in clear text |(/) |null | |



Expand Down Expand Up @@ -1088,7 +1090,7 @@ String
h4. Parameters
h5. Path Parameters
||Name||Description||Required||Default||Pattern||
|username |name that need to be deleted |(/) | | |
|username |name that need to be deleted |(/) |null | |


h5. Body Parameter
Expand Down
2 changes: 1 addition & 1 deletion samples/documentation/html/.openapi-generator/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.3.2-SNAPSHOT
3.3.4-SNAPSHOT
5 changes: 4 additions & 1 deletion samples/documentation/html/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,10 @@ <h3 class="field-label">Path parameters</h3>

<h3 class="field-label">Request headers</h3>
<div class="field-items">

<div class="param">api_key (optional)</div>

<div class="param-desc"><span class="param-type">Header Parameter</span> &mdash; default: null </div>

</div> <!-- field-items -->


Expand Down