Bug #18590

[api] invalid value in discovery doc

Added by Ward Vandewege 5 months ago. Updated 2 months ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Category:
-
Target version:
Start date:
12/16/2021
Due date:
% Done:

100%

Estimated time:
(Total: 0.00 h)
Story points:
-
Release relationship:
Auto

Description

In `app/controllers/arvados/v1/groups_controller.rb` we say

  def self._contents_requires_parameters
    params = _index_requires_parameters.
      merge({
              uuid: {
                type: 'string', required: false, default: nil,
              },
...

That `default: nil` ends up in our discovery doc as

            "uuid": {
              "type": "string",
              "required": false,
              "default": null,
              "description": "",
              "location": "query" 
            },

That is the only place in our discovery doc where we say `"default": null`, and that does not conform with the spec. The value for `"default"` must be a string, as per https://developers.google.com/discovery/v1/reference/apis.


Subtasks

Task #18591: review 18590-fix-discovery-docResolvedWard Vandewege

History

#1 Updated by Ward Vandewege 5 months ago

  • Status changed from New to In Progress

#2 Updated by Ward Vandewege 5 months ago

  • Description updated (diff)

#3 Updated by Ward Vandewege 5 months ago

Ready for review at 49ef11e68168170d3ba4bebf17a428d99759178f on branch 18590-fix-discovery-doc.

Tests passed at developer-run-tests: #2844

#4 Updated by Tom Clegg 5 months ago

49ef11e68168170d3ba4bebf17a428d99759178f LGTM, thanks.

The GroupContentsOptions struct used by controller has UUID string `json:"uuid,omitempty"` and I guess this RailsAPI change confirms the ",omitempty" isn't needed there. Mostly harmless though.

#5 Updated by Ward Vandewege 5 months ago

  • % Done changed from 0 to 100
  • Status changed from In Progress to Resolved

Applied in changeset arvados-private:commit:arvados|e67d7d52092ba61e272a597e2fa9d98aee65c004.

#6 Updated by Peter Amstutz 2 months ago

  • Release set to 46

Also available in: Atom PDF