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

Remove redundant query parameters from API surface #128

Open
borland opened this issue Jul 31, 2022 · 0 comments
Open

Remove redundant query parameters from API surface #128

borland opened this issue Jul 31, 2022 · 0 comments

Comments

@borland
Copy link
Collaborator

borland commented Jul 31, 2022

Example:

ProjectsQuery in the library has this shape:

type ProjectsQuery struct {
	ClonedFromProjectID string   `url:"clonedFromProjectId"`
	IDs                 []string `uri:"ids,omitempty" url:"ids,omitempty"`
	IsClone             bool     `uri:"clone,omitempty" url:"clone,omitempty"`
	Name                string   `uri:"name,omitempty" url:"name,omitempty"`
	PartialName         string   `uri:"partialName,omitempty" url:"partialName,omitempty"`
	Skip                int      `uri:"skip,omitempty" url:"skip,omitempty"`
	Take                int      `uri:"take,omitempty" url:"take,omitempty"`
}

Note the presence of both Name and PartialName.
To a casual observer, Name implies an exact name match -- however in practice the Octopus Server treats them both as a partial match.

I.e. given a project "Integrations", Query for {Name: "gr"} will find it. This is legacy behaviour in the server, and to avoid confusion we should remove the Name field from ProjectsQuery.

As part of this work, we should sweep the library's API surface and remove any other similarly redundant fields if there are others beyond Project Name

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