From 105a657920068bbf5c932fcded33486fee1a9904 Mon Sep 17 00:00:00 2001 From: wing328 Date: Tue, 29 Jan 2019 13:38:24 +0000 Subject: [PATCH] Deploy website Deploy website version based on 02a8dad77c0440393ccf0a158a4ac2c0a6b47de6 --- docs/templating.html | 28 +++++++++++++++++++++++++++- docs/templating/index.html | 28 +++++++++++++++++++++++++++- 2 files changed, 54 insertions(+), 2 deletions(-) diff --git a/docs/templating.html b/docs/templating.html index c958d7c4528..9bd55c33adc 100644 --- a/docs/templating.html +++ b/docs/templating.html @@ -587,6 +587,32 @@ You'll see them referred to as "Vendor Extensions" in most places in t

The following are vendor extensions supported by OpenAPI Generator. The list may not be up-to-date, the best way is to look for "x-" in the built-in mustache templates.

+

All generators (core)

+

Enum

+

x-enum-varnames can be used to have an other enum name for the corresponding value. +This is used to define names of the enum items.

+

x-enum-descriptions can be used to provide an individual description for each value. +This is used for comments in the code (like javadoc if the target language is java).

+

x-enum-descriptions and x-enum-varnames are each expected to be list of items containing the same number of items as enum. +The order of the items in the list matters: their position is used to group them together.

+

Example:

+
WeatherType:
+  type: integer
+  format: int32
+  enum:
+    - 42
+    - 18
+    - 56
+  x-enum-descriptions:
+    - 'Blue sky'
+    - 'Slightly overcast'
+    - 'Take an umbrella with you'
+  x-enum-varnames:
+    - Sunny
+    - Cloudy
+    - Rainy
+
+

In the example for the integer value 42, the description will be Blue sky and the name of the enum item will be Sunny (some generators changes it to SUNNY to respect some coding convention).

ObjC

x-objc-operationId

To customize the method name, you can provide a different name in x-objc-operationId, e.g.

@@ -681,4 +707,4 @@ For more details on Mustache see {{#enums}}{{-index}} {{enum}}{{/enums}} -
Last updated on 2019-1-18
PreviousCustomization
\ No newline at end of file +
Last updated on 2019-1-29
PreviousCustomization
\ No newline at end of file diff --git a/docs/templating/index.html b/docs/templating/index.html index c958d7c4528..9bd55c33adc 100644 --- a/docs/templating/index.html +++ b/docs/templating/index.html @@ -587,6 +587,32 @@ You'll see them referred to as "Vendor Extensions" in most places in t

The following are vendor extensions supported by OpenAPI Generator. The list may not be up-to-date, the best way is to look for "x-" in the built-in mustache templates.

+

All generators (core)

+

Enum

+

x-enum-varnames can be used to have an other enum name for the corresponding value. +This is used to define names of the enum items.

+

x-enum-descriptions can be used to provide an individual description for each value. +This is used for comments in the code (like javadoc if the target language is java).

+

x-enum-descriptions and x-enum-varnames are each expected to be list of items containing the same number of items as enum. +The order of the items in the list matters: their position is used to group them together.

+

Example:

+
WeatherType:
+  type: integer
+  format: int32
+  enum:
+    - 42
+    - 18
+    - 56
+  x-enum-descriptions:
+    - 'Blue sky'
+    - 'Slightly overcast'
+    - 'Take an umbrella with you'
+  x-enum-varnames:
+    - Sunny
+    - Cloudy
+    - Rainy
+
+

In the example for the integer value 42, the description will be Blue sky and the name of the enum item will be Sunny (some generators changes it to SUNNY to respect some coding convention).

ObjC

x-objc-operationId

To customize the method name, you can provide a different name in x-objc-operationId, e.g.

@@ -681,4 +707,4 @@ For more details on Mustache see {{#enums}}{{-index}} {{enum}}{{/enums}} -
Last updated on 2019-1-18
PreviousCustomization
\ No newline at end of file +
Last updated on 2019-1-29
PreviousCustomization
\ No newline at end of file