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

Plugin not rendering ExtensionProperty as a JSON/YAML value #870

Open
ghost opened this issue Sep 3, 2021 · 0 comments
Open

Plugin not rendering ExtensionProperty as a JSON/YAML value #870

ghost opened this issue Sep 3, 2021 · 0 comments

Comments

@ghost
Copy link

ghost commented Sep 3, 2021

The swagger maven plugin doesn't adhere to the parseValue flag in the ExtensionProperty annotation. The docs suggest the following:

If set to true, field value will be parsed and serialized as JSON/YAML

API definition

 @ApiOperation(value = "create a user",
            response = User.class,
            extensions = {
                    @Extension(name = "x-authorities", properties = {
                            @ExtensionProperty(name = "roles",
                                    value = "[\"user_create\", \"user_admin\"]",
                                    parseValue = true)
                    })
            })

But when the final extension property is rendered it is a string in the swagger.json file.

"x-authorities": {
                    "roles": "[\"user_create\", \"user_admin\"]"
                }

Is this the intended behavior or am I missing something while configuring the plugin?

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

No branches or pull requests

0 participants