microsoft / microsoft/OpenAPI.NET.OData

Pageable endpoints with missing schema information

Open
#496 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

type:bug
Dominant language
C#
Stars
240
Forks
70
Avg merge
7h 59m
Merged PRs (30d)
13

Description

The current OpenAPI file for the beta MSGraph endpoint results in descriptions with empty response information for some endpoints. An example is shown below.

Assemblies affected

Which assemblies and versions are known to be affected? 1.0.9.0

Expected result

For endpoints that have paging information (x-ms-pageable), the response shape should be known for kiota to generate paging code. @baywet also says that this endpoint isn't actually pageable. See https://github.com/microsoft/kiota/issues/4207#issuecomment-1956755281

Actual result
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
Additional detail

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the supplied beta MSGraph endpoint from the OpenAPI generation flow and inspect how its empty 2XX response and x-ms-pageable metadata are emitted. Check the related Kiota discussion for the endpoint's pageable status. Done means the generated description has the intended response information, or the endpoint is no longer marked pageable if that is confirmed as the correct behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, openapi
Domain
api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.