x-logo vendor extension
See original GitHub issue- [Latest] What version of the library are you using? Is it the latest version? The latest released version is
What kind of issue is this?
-
Question. Is this a question about how to do a certain thing?
-
[x Feature Request. Start by telling us what problem you’re trying to solve. Often a solution already exists! Don’t send pull requests to implement new features without first getting our support. Sometimes we leave features out on purpose to keep the project small.
I’m trying to show custom logo in ReDoc API documentation by adding ObjectVendorExtension("x-logo")
with required properties to the info section.
Expected result is:
"x-logo": {
...
}
However, the actual result is:
"extensions": {
"x-logo": {
....
}
}
How can I exclude “extensions”? Is there any workaround for this because now it is of course at variance with documentation of ReDoc?
Thank you for such a great API documentation tool.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:3
- Comments:9 (2 by maintainers)
Top Results From Across the Web
Adding x-logo vendor extension using Swashbuckle Asp.Net ...
I'm using swagger.json file (generated by Swashbuckle) for ReDoc to display API documentation. What I Need: Add x-logo vendor extension to ...
Read more >OpenAPI Extensions - Swagger
Extensions (also referred to as specification extensions or vendor extensions) are custom properties that start with x- , such as x-logo .
Read more >Redoc vendor extensions
You can use the following vendor extensions with Redoc. Swagger Object. x-servers; x-tagGroups; Tag Group Object; x-ignoredHeaderParameters. Info Object. x-logo ...
Read more >Can I add specification extensions to my schema? - Open API
ReDoc has a set of vendor extensions to the open api 2.0 spec. For example they have a property in the info JSON...
Read more >xlogo - man pages section 1: User Commands
xlogo - X Window System logo. ... This option indicates that the logo should be drawn with anti- aliased edges using the RENDER...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’m also hitting this issue. I’ve implemented an
OperationBuilderPlugin
to add customObjectVendorExtension
s and the value gets wrapped in anextensions
object.e.g. the following
produces
The same issue also occurs when using the the
@Extension
param of the@ApiOperation
annotation (and probably the other applicable annotations). e.gproduces
This does seem to be a bug. Consumers expect the extension properties to be directly under the parent to which they apply. Not wrapped in an
extensions
object. e.g https://swagger.io/specification/#specification-extensionsIt looks like this only affects the OpenAPI v3 document type. The Swagger v2 type generates correctly.
I have not been able to find a workaround for OpenAPI v3 (short of post-processing the json after generation).
Thanks for looking into it. 👍
I added a JacksonModuleRegistrar to solve this problem, such as public class MyOpenApiJacksonModule extends SimpleModule implements JacksonModuleRegistrar { … @Override public void setupModule(SetupContext context) { super.setupModule(context); … context.setMixInAnnotations(Operation.class, OperationMixin.class); …
}