Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLI generation build failure when an API has paging information but no response body schema #4207

Closed
calebkiage opened this issue Feb 21, 2024 · 1 comment · Fixed by #4210
Assignees
Labels
CLI Work to support generating CLIs with Kiota type:bug A broken experience WIP
Milestone

Comments

@calebkiage
Copy link
Contributor

The generated code against the latest beta API fails to build for some endpoints because of missing response schemas on pageable endpoints.

Failing snippet
openapi: 3.0.1
paths:
  '/identity/authenticationEventsFlows/{authenticationEventsFlow-id}/graph.externalUsersSelfServiceSignUpEventsFlow/onAttributeCollection/graph.onAttributeCollectionExternalUsersSelfServiceSignUp':
    description: Casts the previous resource to onAttributeCollectionExternalUsersSelfServiceSignUp.
    get:
      tags:
        - identity.authenticationEventsFlow
      summary: Get the items of type microsoft.graph.onAttributeCollectionExternalUsersSelfServiceSignUp in the microsoft.graph.onAttributeCollectionHandler collection
      operationId: identity.authenticationEventsFlows.GetOnAttributeCollection.AsOnAttributeCollectionExternalUsersSelfServiceSignUp
      responses:
        2XX: { }
      x-ms-pageable:
        nextLinkName: '@odata.nextLink'
        operationName: listMore
    parameters:
      - name: authenticationEventsFlow-id
        in: path
        description: The unique identifier of authenticationEventsFlow
        required: true
        schema:
          type: string
        x-ms-docs-key-type: authenticationEventsFlow
@calebkiage calebkiage added type:bug A broken experience CLI Work to support generating CLIs with Kiota labels Feb 21, 2024
@calebkiage calebkiage self-assigned this Feb 21, 2024
@calebkiage calebkiage added this to Kiota Feb 21, 2024
@github-project-automation github-project-automation bot moved this to Todo in Kiota Feb 21, 2024
@baywet
Copy link
Member

baywet commented Feb 21, 2024

Thanks for reporting this.
While we could add defensive programming to ignore paging information when no schema is available here, I believe we should also log an issue in the conversion library.
The onAttributeCollection property is a single valued property (not a collection), therefor the paging information should not have been added to the OpenAPI description.
Can you create an issue over there as well please @calebkiage?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLI Work to support generating CLIs with Kiota type:bug A broken experience WIP
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants