Skip to content

Using OpenAPI v3.0.0 for RESTful API documentation

License

Notifications You must be signed in to change notification settings

n3srcc/jax-rs-2.1-openapi

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Using OpenAPI v3.0.0 for RESTful API documentation

  • Build and run

    mvn clean package 
    java -jar target/jax-rs-2.1-openapi-0.0.1-SNAPSHOT.jar
    
  • Play with API using Swagger UI

    http://localhost:8080/api/api-docs?url=/api/openapi.json
    
  • Play with API using curl

    curl -iv -X POST "http://localhost:8080/api/people" -H  "Accept: application/json" -H  "Content-Type: application/x-www-form-urlencoded" -d "[email protected]&firstName=John&lastName=Smith"
    
    curl -iv -X GET "http://localhost:8080/api/people" -H  "Accept: application/json"
    
    curl -iv -X GET "http://localhost:8080/api/people/[email protected]" -H  "accept: application/json"
    
    curl -iv -X DELETE "http://localhost:8080/api/people/[email protected]"
    

About

Using OpenAPI v3.0.0 for RESTful API documentation

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%