Open ghost opened 2 years ago
I've ran into the same problem.
I generate my client code, so this leaves me in a situation where I still have to create my own code. Would be nice if the spec can be fixed, such that I can generate the proper client code.
I have the same problem that @stil4m reported.
I will notify the team owning this API about this issue so they can sort it out.
The CreatePipelineConfigurationParameters does indeed accept ConfigurationType as far as I can tell however ConfigurationType is enum defines as this
public enum ConfigurationType
{
/// <summary>
/// Unknown type.
/// </summary>
Unknown = 0,
/// <summary>
/// YAML.
/// </summary>
Yaml = 1,
/// <summary>
/// Designer JSON.
/// </summary>
DesignerJson = 2,
/// <summary>
/// Just-in-time.
/// </summary>
JustInTime = 3,
/// <summary>
/// Designer-JSON.
/// </summary>
[EnumMember(Value = "designer-json")]
DesignerHyphenJson = DesignerJson
}
We generate documentation from source code it seems it didn't handle this enum correctly.
I am also using the CreatePipeline (CreatePipelineParameters says it wants a CreatePipelineConfigurationParameters.
The definition of that thing is "it's a type" in the documentation, but in reality: It is more like:
"configuration": {
"path": "azure-pipelines.yml",
"repository": {
"id": "YourRepoGUID",
"type": "azureReposGit"
},
"type": "yaml"
},
as mentioned here in stackoverflow.
And I got this API call working with that configuration, which makes me think that the autogenerating documentation tool might have a bug?
Wrong documentation in https://docs.microsoft.com/en-us/rest/api/azure/devops/pipelines/pipelines/create?view=azure-devops-rest-7.1.
Request body to create pipeline, points wrongly to
ConfigurationType
:It seems that docs maintainer copy-paste the same information for
PipelineConfiguration
:ConfigurationType
doesn't show parameters required to Create Pipeline, just the type of the pipeline: