Skip to content

error rendering request parameter object in large service #2538

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

Closed
tomaskodaj opened this issue Mar 18, 2024 · 4 comments
Closed

error rendering request parameter object in large service #2538

tomaskodaj opened this issue Mar 18, 2024 · 4 comments

Comments

@tomaskodaj
Copy link

I you have complex objects in request parameters (e.g. query parameter) referenced as "$ref", only first 11 "paths" are rendered correctly as "textarea", rest of them wont be rendered with example, and wont render textarea when you hit "try it out".

This bug was introduced in version 2.4.0... version 2.3.0 was OK.

Using with spring boot 3.2.3.

    "paths": {
...
                "parameters": [
                    {
                        "required": true,
                        "examples": {
                            "exampleFullSomeComplexObjectSchema": {
                                "$ref": "#/components/examples/exampleFullSomeComplexObjectSchema"
                            },
                            "exampleMinimalSomeComplexObjectSchema": {
                                "$ref": "#/components/examples/exampleMinimalSomeComplexObjectSchema"
                            }
                        },
                        "schema": {
                            "$ref": "#/components/schemas/SomeComplexObjectSchema"
                        },
                        "description": "Some Complex Object Schema",
                        "in": "query",
                        "name": "someComplexObjectSchema"
                    }
@codespearhead
Copy link
Contributor

We need an MRE, like this one.

@tomaskodaj tomaskodaj closed this as not planned Won't fix, can't repro, duplicate, stale Mar 19, 2024
@tomaskodaj
Copy link
Author

tomaskodaj commented Mar 20, 2024

minimal example: bug-example.zip

see last approx 40 items and their request parameter "is". compare to first ~60 items. then recompile with 2.3.0 and it is correct. with 2.4.0 it is not. (be aware of browser cache when changing version - it might confuse you :))

image

image

@tomaskodaj tomaskodaj reopened this Mar 20, 2024
@tomaskodaj
Copy link
Author

tomaskodaj commented Mar 20, 2024

Error is in swagger-ui.version = 5.11.8

Please upgrade to 5.11.10, where it seems fixed

(Bit unfortunate, that I need to define property springdoc.swagger-ui.version when I change dependency version on pom.xml, but I guess there is no other way, since webjars package contains files in folder with version name inside jar archive 😢)

tomaskodaj added a commit to tomaskodaj/springdoc-openapi that referenced this issue Mar 20, 2024
Update dependency because of a bug springdoc#2538
@tomaskodaj tomaskodaj mentioned this issue Mar 20, 2024
@chaouki-reply
Copy link

We have faced the same behavior but hopefully, this will be fixed when merging PR#2542.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants