This is an automated email from the ASF dual-hosted git repository. csantanapr pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk-client-go.git
commit 6e7d1c371a237bfd16b91d6c34248624bc3a7e06 Author: Jesus G. Alva <[email protected]> AuthorDate: Mon Nov 27 10:54:10 2017 -0600 Adding support for path parameters for api gateway --- .gitignore | 1 + whisk/api.go | 31 +++++++++++++++++++++++++++++-- 2 files changed, 30 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index b3cb8d5..e2a8d36 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ Godeps/_workspace +.idea diff --git a/whisk/api.go b/whisk/api.go index 4a30118..1238ba3 100644 --- a/whisk/api.go +++ b/whisk/api.go @@ -71,6 +71,32 @@ type Api struct { GatewayFullPath string `json:"gatewayFullPath,omitempty"` Swagger string `json:"swagger,omitempty"` Action *ApiAction `json:"action,omitempty"` + PathParameters []ApiPathParameter `json:"pathParameters,omitempty"` +} + +type ApiPathParameter struct { + Name string `json:"name,omitempty"` + In string `json:"in,omitempty"` + Description string `json:"description,omitempty"` + Required bool `json:"required,omitempty"` + Type string `json:"type,omitempty"` + Format string `json:"format,omitempty"` + AllowEmptyValue bool `json:"allowEmptyValue,omitempty"` + Items map[string]interface{} `json:"items,omitempty"` + CollectionFormat string `json:"collectionFormat,omitempty"` + Default interface{} `json:"default,omitempty"` + Maximum int `json:"maximum,omitempty"` + ExclusiveMaximum bool `json:"exclusiveMaximum,omitempty"` + Minimum int `json:"minimum,omitempty"` + ExclusiveMinimum bool `json:"exclusiveMinimum,omitempty"` + MaxLength int `json:"maxLength,omitempty"` + MinLength int `json:"minLength,omitempty"` + Pattern string `json:"pattern,omitempty"` + MaxItems int `json:"maxItems,omitempty"` + MinItems int `json:"minItems,omitempty"` + UniqueItems bool `json:"uniqueItems,omitempty"` + MultipleOf int `json:"multipleOf,omitempty"` + Enum interface{} `json:"enum,omitempty"` } type ApiAction struct { @@ -132,8 +158,9 @@ type ApiSwaggerInfo struct { } type ApiSwaggerOperation struct { - OperationId string `json:"operationId"` - Responses interface{} `json:"responses"` + OperationId string `json:"operationId"` + Parameters []ApiPathParameter `json:"parameters,omitempty"` + Responses interface{} `json:"responses"` XOpenWhisk *ApiSwaggerOpXOpenWhisk `json:"x-openwhisk,omitempty"` } -- To stop receiving notification emails like this one, please contact "[email protected]" <[email protected]>.
