Skip to content

Property writer-with-order-by-keys not taken into account #1690

Closed
@fabienfleureau

Description

@fabienfleureau

Describe the bug
When springdoc.writer-with-order-by-keys is set to true, in the yaml generated file the keys are not sorted alphabetically
It seems related to this commit:
e77aec1#diff-f7a64fc1c3465d474089ceed1a982db7c484a3c23570ac637948999956614e6dL119
ObjectMapperProvider.java:119
As you can see the ObjectMapper is not configured anymore with MapperFeature.SORT_PROPERTIES_ALPHABETICALLY set to true.

To Reproduce
Steps to reproduce the behavior:

  • What version of spring-boot you are using?
    2.7.0
  • What modules and versions of springdoc-openapi are you using?
    springdoc-openapi-webmvc-core 1.6.9
    springdoc-openapi-webflux-core 1.6.9
    springdoc-openapi-common 1.6.9
  • What is the actual and the expected result using OpenAPI Description (yml or json)?
    yaml

Expected behavior

  • A clear and concise description of what you expected to happen.
    I expect the yaml to be generated with keys sorted alphabetically
  • What is the expected result using OpenAPI Description (yml or json)?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions