Giter Site home page Giter Site logo

drghood / swagger-jsonrpc4j Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 80 KB

spring-boot restful api integrate swagger2 and jsonrpc4j

License: Apache License 2.0

Java 78.44% HTML 12.62% JavaScript 7.87% CSS 1.07%
spring-boot swagger swagger-ui swagger2 restful-api jsonrpc4j springboot

swagger-jsonrpc4j's Introduction

swagger-jsonrpc4j

1. Coding work

1.1 Swagger @Api annotation on @JsonRpcService annotated Service

    @Api("sample")
    @JsonRpcService("demo")
    public class DemoApi{}

1.2 Swagger @ApiOperation annotation on @JsonRpcMethod annotated Method

@Api("sample")
@JsonRpcService("demo")
public class DemoApi{
    @ApiOperation("say hello and tell him/her which toilet to use")
    @JsonRpcMethod("greeting")
    public DemoResponse hello(DemoRequest req)(){
	    return null;
    }
}

1.3 Swagger @ApiModel,@ApiModelProperty etc. on Models and Fields

@ApiModel
public class DemoRequest {
	@ApiModelProperty("what's your name")
	private String name;
	@ApiModelProperty("what's your gender")
	private String gender;
}

2. Use swagger OAS

http://localhost:8080/v2/api-docs

or

http://localhost:8080/v3/api-docs

3. Use swagger-ui

http://localhost:8080/swagger-ui.html

4. Extension & Reference

The swagger-bootstrap-ui contains swagger ui extension.
The swagger-api contains annotation documentation, samples etc.

swagger-jsonrpc4j's People

Contributors

drghood avatar

Watchers

 avatar

swagger-jsonrpc4j's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.