csantanapr closed pull request #45: WIP: Adding support for path parameters for api gateway URL: https://github.com/apache/incubator-openwhisk-client-go/pull/45
This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/.gitignore b/.gitignore index b3cb8d53..e2a8d365 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ Godeps/_workspace +.idea diff --git a/whisk/api.go b/whisk/api.go index 4a30118d..6d695a68 100644 --- a/whisk/api.go +++ b/whisk/api.go @@ -71,6 +71,33 @@ type Api struct { GatewayFullPath string `json:"gatewayFullPath,omitempty"` Swagger string `json:"swagger,omitempty"` Action *ApiAction `json:"action,omitempty"` + PathParameters []ApiParameter `json:"pathParameters,omitempty"` +} + +type ApiParameter struct { + Name string `json:"name"` + In string `json:"in"` + 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"` + Ref string `json:"$ref,omitempty"` } type ApiAction struct { @@ -132,8 +159,9 @@ type ApiSwaggerInfo struct { } type ApiSwaggerOperation struct { - OperationId string `json:"operationId"` - Responses interface{} `json:"responses"` + OperationId string `json:"operationId"` + Parameters []ApiParameter `json:"parameters,omitempty"` + Responses interface{} `json:"responses"` XOpenWhisk *ApiSwaggerOpXOpenWhisk `json:"x-openwhisk,omitempty"` } ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services