Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

git::items::list recursion_level should be an enum rather than a String #78

Open
johnbatty opened this issue Oct 18, 2022 · 1 comment

Comments

@johnbatty
Copy link
Collaborator

The current API defines the git::items::list::ClientBuilder::recursion_level() function to take an Into<String> parameter:

pub fn recursion_level(self, recursion_level: impl Into<String>) -> Self
// The recursion level of this request. The default is ‘none’, no recursion.

However the operation only takes a fixed set of values:

  • None
  • OneLevel
  • OneLevelPlusNestedEmptyFolders
  • Full

Should fix up the spec to make this parameter an enum with the set of valid values.
See VersionControlRecursionType

@johnbatty
Copy link
Collaborator Author

johnbatty commented Oct 18, 2022

Worth noting that the spec does currently define the parameter as an inline enum:

          {
            "in": "query",
            "name": "recursionLevel",
            "description": "The recursion level of this request. The default is 'none', no recursion.",
            "required": false,
            "type": "string",
            "enum": [
              "none",
              "oneLevel",
              "oneLevelPlusNestedEmptyFolders",
              "full"
            ],
            "x-ms-enum": {
              "name": "VersionControlRecursionType",
              "values": [
                {
                  "value": "none",
                  "description": "Only return the specified item."
                },
                {
                  "value": "oneLevel",
                  "description": "Return the specified item and its direct children."
                },
                {
                  "value": "oneLevelPlusNestedEmptyFolders",
                  "description": "Return the specified item and its direct children, as well as recursive chains of nested child folders that only contain a single folder."
                },
                {
                  "value": "full",
                  "description": "Return specified item and all descendants"
                }
              ]
            }
          },

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant