apache / openwhisk

Apache OpenWhisk is an open source serverless cloud platform
https://openwhisk.apache.org/
Apache License 2.0
6.5k stars 1.16k forks source link

update swagger for action put #4201

Open rabbah opened 5 years ago

rabbah commented 5 years ago

http://petstore.swagger.io/?url=https://raw.githubusercontent.com/openwhisk/openwhisk/master/core/controller/src/main/resources/apiv1swagger.json#/Actions/updateAction

define the PUT request for an action to contain now removed fields binary and init.

larandersson commented 5 years ago

As far as I can see, those attributes are already present in the model. The ActionExec object contains the following attribute declarations:

      init:
        type: string
        description: optional zipfile reference when code kind is 'nodejs'
      binary:
        type: boolean
        description: Whether the action has a binary attachment or not

Did you mean that these attributes should be removed?

rabbah commented 5 years ago

Correct - they are no longer part of the PUT API.

larandersson commented 5 years ago

OK. No problem removing the init attribute. But, the binary attribute is still used in the response from the PUT operation, as well as in GET action and GET actions. It's also present in the database (tested with image openwhisk/controller:5e94e0b), so I suggest leaving that attribute as is. It's not a mandatory one so it should be fine. We can modify the description of the attribute and let people know it's not being used for PUT. If that's OK I can incorporate this in the PR I'm about to submit that contains several other fixes to the Swagger spec.