Closed kfcampbell closed 7 months ago
Could you provide the OpenAPI description for those operations please?
Yep! It's the same endpoint as in #23:
"/versions": {
"get": {
"summary": "Get all API versions",
"description": "Get all supported GitHub API versions.",
"tags": [
"meta"
],
"operationId": "meta/get-all-versions",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/meta/meta#get-all-api-versions"
},
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"type": "string",
"format": "date",
"example": "2021-01-01"
}
},
"examples": {
"default": {
"value": [
"2021-01-01",
"2021-06-01",
"2022-01-01"
]
}
}
}
}
},
"404": {
"$ref": "#/components/responses/not_found"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "meta",
"subcategory": "meta"
}
}
},
looks like a bug to me, it seems that kiota is generating a call to SendCollection instead of SendPrimitiveCollection. Can you create an issue in kiota so we can address it please?
Kiota has something funky going on with these structs, and we require a find/replace in post-processing to fix the package names used to reference them:
https://github.com/octokit/source-generator/blob/d1c29eea0c06262a42cc119b3ab0304f5e8e67ef/post-processors/go/main.go#L237-L252
When this step is removed, the error given is
versions/versions_request_builder.go:46:152: undefined: i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.CreateDateOnlyFromDiscriminatorValue
.We should bring this up to the Kiota team and see if there's anything we can do to fix it.