devopshq / devopshq/teamcity

parameter field_name not required for tc.build_type_api.change_requirement_setting

Open
#54 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
36
Forks
11
PR merge metrics
No merged PRs in 30d

Description

Hi,

As seen here: [build_type_api.change_requirement_setting](https://devopshq.github.io/teamcity/swagger/api/BuildTypeApi.html#change-requirement-setting)
this function requires an parameter field_name, which must not be used at all for the function. All values for it other than `""` (empty str) leads to an error, as the parameter is currently mandatory by validation, but must be always `""` to build the correct url for the underlying TC RestAPI call.

To use this function at it's current state, it needs to be called as (using dohq-teamcity Types below):

```
bt: BuildType
ar: AgentRequirement

api_response = tc.build_type_api.change_requirement_setting(bt, ar, "", body=ar)

```

The parameter should be removed.

Thanks and Cheers
--- mnse

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at tc.build_type_api.change_requirement_setting and compare its current signature and validation with the linked BuildTypeApi documentation. The change is done when callers no longer need to provide field_name and the underlying TeamCity REST API URL is still built correctly.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.