devopshq / teamcity

dohq-teamcity is a Python package providing access to the JetBrains TeamCity server API.
https://devopshq.github.io/teamcity/
MIT License
33 stars 12 forks source link

parameter field_name not required for tc.build_type_api.change_requirement_setting #54

Open MNSEhub opened 4 months ago

MNSEhub commented 4 months ago

Hi,

As seen here: build_type_api.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