Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lwydyby/vertx-openapi
Generate openapi 3.0 documentation based on annotations
https://github.com/lwydyby/vertx-openapi
Last synced: 8 days ago
JSON representation
Generate openapi 3.0 documentation based on annotations
- Host: GitHub
- URL: https://github.com/lwydyby/vertx-openapi
- Owner: lwydyby
- Created: 2019-12-18T03:21:25.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2022-02-11T00:26:46.000Z (almost 3 years ago)
- Last Synced: 2024-10-30T04:56:02.496Z (about 2 months ago)
- Language: Java
- Size: 20.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# vertx-openapi
Generate openapi 3.0 documentation based on annotations## example
````java
package cn.lwydyby.openapi.example;import cn.lwydyby.openapi.annotation.VertxHandler;
import cn.lwydyby.openapi.annotation.VertxPath;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.enums.ParameterIn;
import io.swagger.v3.oas.annotations.headers.Header;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.responses.ApiResponse;
import io.vertx.ext.web.RoutingContext;@VertxHandler
public interface ServerHandler {@Operation(summary = "Creates a new upload unit-of-work.", method = "POST",
parameters = {@Parameter(name = "Upload-Length", in = ParameterIn.HEADER, required = true),
@Parameter(name = "Upload-Concat", in = ParameterIn.HEADER, schema = @Schema(type = "string")),
@Parameter(name = "Upload-Metadata", in = ParameterIn.HEADER, schema = @Schema(type = "string"))},
responses = {
@ApiResponse(responseCode = "413", description = "Upload size too large."),
@ApiResponse(responseCode = "400", description = "Bad Request."),
@ApiResponse(responseCode = "201", description = "Upload unit of work Created.",
headers = {@Header(name = "Location", description = "The uri of the created upload unit of work.", required = true)})})
@VertxPath(path = "/servers")
void testHandler(RoutingContext context);
}````