Skip to content

Kiota should send properties in OAS declaration order, not alphabetic order #4680

@bkoelman

Description

@bkoelman

What are you generating using Kiota, clients or plugins?

API Client/SDK

In what context or format are you using Kiota?

Nuget tool

Client library/SDK language

Csharp

Describe the bug

My OAS file lists properties (in component schema) in an intentional order: type, id, firstName, lastName, age. While the last three vary per model, the first two are always present. Kiota ignores that and uses alphabetic order instead: age, firstName, id, lastName, type. This makes the payload harder to read, test, and debug.

Expected behavior

Preserve declaration order. In the case of inheritance, fields from base types come first.

How to reproduce

Open API description file

No response

Kiota Version

1.14.0

Latest Kiota version known to work for scenario above? (Not required)

No response

Known Workarounds

None

Configuration

No response

Debug output

No response

Other information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Done ✔️

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions