Contributions
Re: Swagger
Given that Mutual TLS is not supported in Swagger/OpenAPI 2.0 and OpenAPI 3.0, it is not supported currently in Swagger UI and not in the short term roadmap,this commentprovides a solution in a browser environment. A possible avenue is to add a note in the description of your OpenAPI 3.0 or 2.0 definition (i.e.: info.description), with steps on how to add your client certificate into the users' browsers. Mutual TLS has been added as a securitytype in OAS 3.1 and its support might be added in scope ofOpenAPI 3.1 support but we have no ETA at the moment.953Views1like0CommentsRe: Is there a Java SDK available to represent the Open API Specification Schema
Hi, I am summarizing here your requirements to make sure I got them right: 1.to generate open api specification programmatically /manipulate/write Open API Specification 2.manipulating and generating an Open API Spec yaml 3.java code generated SDK from the Open API specification schema /SDK of java POJOs that supports the full extent the Open API Spec schema This functionality is provided by one or more of swagger-api OSS tools, specifically: Swagger Core(see also wiki ) provides OAS Java Representation, APIs, (de)serialization, resolution from POJOs / JAX-RS and annotations. Swagger Parserprovides parsing/validation and dereferencing/bundling Swagger Codegenprovides generation from a OAS spec of client SDKs and Server stubs in various languages including JAVA, and of documentation. Also check Web/JS toolsSwagger UI(here a demo) for rendering/visualization/testing and web editorsSwagger Editor(here a demo, supports OAS 2.x and 3.0) and Swagger Editor@Next (here a demo, supports OAS 3.0-3.1 and AsyncAPI 2.x)597Views0likes0CommentsRe: Swagger implementation using ANT build ??
Assuming your goal is to integrate swagger-core to generate a specification out of your JAX-RS code, probably the best option is to use an Ant Java task to configure and execute swagger, as detailed inhttps://github.com/swagger-api/swagger-core/wiki/Swagger-2.X---Integration-and-Configuration#programmatic-configuration. In terms of dependencies, they work as any other dependency in Ant/Ivy, you would include them as you do with the others.1.4KViews2likes0CommentsRe: How to add Properties[] properties in @Schema annotation?
ATM@Schemaannotation doesn't allow to specify properties and additionalProperties part of the schema, if not by referring to an existing class via implementation , as you mentioned. We have this enhancement (annotations + processing) in our roadmap, but for the moment you can either apply the implementation workaround by e.g. defining some POJOs like the following: ... class ExternalUserDTO { String foo; } class RoomOptionsDTO { public String bar; } @Schema(requiredProperties = {"user", "options"} class UserAndRoomDTO { public RoomOptionsDTO options; public ExternalUserDTO user; } ... requestBody = @RequestBody( content = @Content( mediaType = MediaType.MULTIPART_FORM_DATA, schema = @Schema( implementation = UserAndRoomDTO.class) or use one of the extension mechanism, e.g. filters (https://github.com/swagger-api/swagger-core/wiki/Swagger-2.X---Extensions#filters)1.9KViews0likes0CommentsRe: Need help - Swagger CodeGen ?
It's still unclear to me what is your issue / question. I understood you were facing errors with the generated code, but from your last answer it seems you asked for guidance in modfying/implementing some own OpenAPI spec in some way. If that is the case, and your interest is understanding how OpenAPI works, I would suggest going through some available docs, e.g.https://swagger.io/docs/specification/about/1.4KViews0likes1CommentRe: Need help - Swagger CodeGen ?
Still some points are not fully clear: * are you using the 2.x or 3.x petstore sample? * have you modified the sample toinclude pet images (in PNG format), a list of the inputted files, and characteristics about them?If so, please share the modified spec * are you getting errors with the server or with the client?1.4KViews0likes3CommentsRe: Swagger codegen/Swagger editor don't want to generate example
I am not sure I fully understand the issue, however if I get this correctly you are generating a spring server stub using the "spring" generator; and your second screenshot is the swagger-ui embedded into the result code. Each generator behaves differently and has different capabilities, in this case the generated server code is usingspringfoxproject to expose a Swagger definition resolved from the Api/Controller code. The generated code doesn't add for example annotations to define the possible examples for the endpoints, as found in the original definition.1.7KViews1like0CommentsRe: swagger editor
This functionality makes use ofSwagger Codegento generate client code (in various languages) capable of invoking endpoints represented by the provided Swagger/OpenAPI definition, or server stubs/scaffold to implement such endpoints in various languages and framework, or documentation, e.g. HTML.1.2KViews1like1Comment