Repository navigation
Closed
Labels
priority:p1High priority but not blocking. Causes major but not critical loss of functionality SLA <=7daysHigh priority but not blocking. Causes major but not critical loss of functionality SLA <=7daystype:bugA broken experienceA broken experience
Milestone
Description
Short summary (3-5 sentences) describing the issue.
Assemblies affected
1.2.0-preview4
Steps to reproduce
dotnet tool install -g Microsoft.OpenAPI.Kiota --prerelease
kiota show -k msgraph::microsoft-graphExpected result
No errors about path parameters missing the required property.
Actual result
fail: Kiota.Builder.KiotaBuilder[0]
OpenApi Parsing error: "required" must be true when parameter location is "path" [#/paths/~1applications~1{application-id}/parameters/1/required]
fail: Kiota.Builder.KiotaBuilder[0]
OpenApi Parsing error: Declared path parameter "appId" needs to be defined as a path parameter at either the path or operation level [#/paths/~1applications~1{application-id}/parameters/1/in]
fail: Kiota.Builder.KiotaBuilder[0]
OpenApi Parsing error: "required" must be true when parameter location is "path" [#/paths/~1applications~1{application-id}~1createdOnBehalfOf/parameters/1/required]
fail: Kiota.Builder.KiotaBuilder[0]
OpenApi Parsing error: Declared path parameter "appId" needs to be defined as a path parameter at either the path or operation level [#/paths/~1applications~1{application-id}~1createdOnBehalfOf/parameters/1/in]
fail: Kiota.Builder.KiotaBuilder[0]
OpenApi Parsing error: "required" must be true when parameter location is "path" [#/paths/~1applications~1{application-id}~1extensionProperties/parameters/1/required]
fail: Kiota.Builder.KiotaBuilder[0]
OpenApi Parsing error: Declared path parameter "appId" needs to be defined as a path parameter at either the path or operation level [#/paths/~1applications~1{application-id}~1extensionProperties/parameters/1/in]
fail: Kiota.Builder.KiotaBuilder[0]
OpenApi Parsing error: "required" must be true when parameter location is "path" [#/paths/~1applications~1{application-id}~1extensionProperties~1{extensionProperty-id}/parameters/1/required]
fail: Kiota.Builder.KiotaBuilder[0]
OpenApi Parsing error: Declared path parameter "appId" needs to be defined as a path parameter at either the path or operation level [#/paths/~1applications~1{application-id}~1extensionProperties~1{extensionProperty-id}/parameters/1/in]
fail: Kiota.Builder.KiotaBuilder[0]
OpenApi Parsing error: "required" must be true when parameter location is "path" [#/paths/~1applications~1{application-id}~1extensionProperties~1$count/parameters/1/required]
fail: Kiota.Builder.KiotaBuilder[0]
OpenApi Parsing error: Declared path parameter "appId" needs to be defined as a path parameter at either the path or operation level [#/paths/~1applications~1{application-id}~1extensionProperties~1$count/parameters/1/in]
fail: Kiota.Builder.KiotaBuilder[0]
OpenApi Parsing error: "required" must be true when parameter location is "path" [#/paths/~1applications~1{application-id}~1federatedIdentityCredentials/parameters/1/required]
fail: Kiota.Builder.KiotaBuilder[0]
OpenApi Parsing error: Declared path parameter "appId" needs to be defined as a path parameter at either the path or operation level [#/paths/~1applications~1{application-id}~1federatedIdentityCredentials/parameters/1/in]
(logs truncated for brevity)
Additional detail
This is using the latest open API description for Microsoft Graph which has been using the current version of this library to be generated by the weekly process.
Reacted by Peter Ombwa
Metadata
Metadata
Assignees
Labels
priority:p1High priority but not blocking. Causes major but not critical loss of functionality SLA <=7daysHigh priority but not blocking. Causes major but not critical loss of functionality SLA <=7daystype:bugA broken experienceA broken experience
Activity
baywet commentedon Oct 18, 2022
bug seems to have been introduced by #293 which introduced
'/applications/{application-id}/createdOnBehalfOf': description: Provides operations to manage the createdOnBehalfOf property of the microsoft.graph.application entity. get: tags: - applications.directoryObject summary: Get createdOnBehalfOf from applications description: Supports $filter (eq when counting empty collections). Read-only. operationId: applications.GetCreatedOnBehalfOf parameters: - name: $select in: query description: Select properties to be returned style: form explode: false schema: uniqueItems: true type: array items: enum: - id - deletedDateTime type: string - name: $expand in: query description: Expand related entities style: form explode: false schema: uniqueItems: true type: array items: enum: - '*' type: string responses: 2XX: description: Retrieved navigation property content: application/json: schema: $ref: '#/components/schemas/microsoft.graph.directoryObject' 4XX: $ref: '#/components/responses/error' 5XX: $ref: '#/components/responses/error' x-ms-docs-operation-type: operation parameters: - name: application-id in: path description: 'key: id of application' required: true style: simple schema: type: string x-ms-docs-key-type: application + - name: appId + in: path + description: 'Alternate key: appId of application' + style: simple + schema: + type: string + nullable: trueCC Millicent Achieng (@millicentachieng)
peombwa commentedon Oct 19, 2022
This is also affecting PowerShell module - microsoftgraph/msgraph-sdk-powershell#1577 (review).
How is the alternate key (
appId) supposed to be used in the context of OAS 3? There is no direct equivalent of OData's AlternateKeys term in OAS 3 that I can think of. Aliasing of parameters is still an open feature request for OAS - OAI/OpenAPI-Specification#2298.irvinesunday commentedon Oct 21, 2022
This is also potentially affecting Go and PowerShell snippets in GE: microsoftgraph/microsoft-graph-explorer-v4#2174
millicentachieng commentedon Nov 10, 2022
Peter Ombwa (@peombwa) The idea is to generate paths that utilize alternate parameters e.g. for the alternate key
appId, the path will be/applications(appId={appId}).I'm closing this issue since removing support for alternate keys fixed this issue. Let's have further discussions here.