All Projects → cdimascio → Kotlin Openapi Spring Functional Template

cdimascio / Kotlin Openapi Spring Functional Template

Licence: other
🍃 Kotlin Spring 5 Webflux functional application with api request validation and interactive api doc

Programming Languages

kotlin
9241 projects

Projects that are alternatives of or similar to Kotlin Openapi Spring Functional Template

Openapi Spring Webflux Validator
🌱 A friendly kotlin library to validate API endpoints using an OpenApi 3.0 and Swagger 2.0 specification
Stars: ✭ 67 (-57.86%)
Mutual labels:  rest, swagger, hacktoberfest, validation, spring, functional
Angularjs Springmvc Sample Boot
A RESTful sample using Spring Boot, Spring MVC, Spring Data and Angular/Bootstrap.
Stars: ✭ 309 (+94.34%)
Mutual labels:  rest, swagger, spring
Spring Petclinic Rest
REST version of the Spring Petclinic sample application
Stars: ✭ 257 (+61.64%)
Mutual labels:  rest, swagger, spring
Loopback Next
LoopBack makes it easy to build modern API applications that require complex integrations.
Stars: ✭ 3,972 (+2398.11%)
Mutual labels:  rest, swagger, hacktoberfest
Swagger Js
Javascript library to connect to swagger-enabled APIs via browser or nodejs
Stars: ✭ 2,319 (+1358.49%)
Mutual labels:  rest, swagger, hacktoberfest
Gemini
Model Driven REST framework to automatically generate CRUD APIs
Stars: ✭ 138 (-13.21%)
Mutual labels:  rest, swagger, spring
Smoke
💨 Simple yet powerful file-based mock server with recording abilities
Stars: ✭ 142 (-10.69%)
Mutual labels:  rest, hacktoberfest, template
Mockoon
Mockoon is the easiest and quickest way to run mock APIs locally. No remote deployment, no account required, open source.
Stars: ✭ 3,448 (+2068.55%)
Mutual labels:  rest, swagger, hacktoberfest
Goa
Design-based APIs and microservices in Go
Stars: ✭ 4,493 (+2725.79%)
Mutual labels:  rest, swagger, hacktoberfest
Swagger Ui
Swagger UI is a collection of HTML, JavaScript, and CSS assets that dynamically generate beautiful documentation from a Swagger-compliant API.
Stars: ✭ 21,279 (+13283.02%)
Mutual labels:  rest, swagger, hacktoberfest
Swagger Editor
Swagger Editor
Stars: ✭ 7,365 (+4532.08%)
Mutual labels:  rest, swagger, hacktoberfest
Pode
Pode is a Cross-Platform PowerShell web framework for creating REST APIs, Web Sites, and TCP/SMTP servers
Stars: ✭ 329 (+106.92%)
Mutual labels:  rest, swagger, hacktoberfest
Koa Rest Api Boilerplate
💯 Boilerplate for Node.js Koa RESTful API application with Docker, Swagger, Jest, CodeCov and CircleCI
Stars: ✭ 420 (+164.15%)
Mutual labels:  rest, swagger, template
Rest Hapi
🚀 A RESTful API generator for Node.js
Stars: ✭ 1,102 (+593.08%)
Mutual labels:  rest, swagger, validation
Core
The server component of API Platform: hypermedia and GraphQL APIs in minutes
Stars: ✭ 2,004 (+1160.38%)
Mutual labels:  rest, swagger, hacktoberfest
Go Codon
Workflow based REST framework code generator
Stars: ✭ 133 (-16.35%)
Mutual labels:  rest, swagger
Cleanstone
Springboot based Minecraft Server
Stars: ✭ 133 (-16.35%)
Mutual labels:  hacktoberfest, spring
Ruoyi Oracle
(RuoYi)官方仓库 基于SpringBoot的权限管理系统 易读易懂、界面简洁美观。 核心技术采用Spring、MyBatis、Shiro没有任何其它重度依赖。直接运行即可用
Stars: ✭ 134 (-15.72%)
Mutual labels:  swagger, spring
Restful React
A consistent, declarative way of interacting with RESTful backends, featuring code-generation from Swagger and OpenAPI specs 🔥
Stars: ✭ 1,814 (+1040.88%)
Mutual labels:  rest, swagger
Beginners C Program Examples
Simple, Short and Sweet beginners friendly C language programs
Stars: ✭ 138 (-13.21%)
Mutual labels:  hacktoberfest, template

kotlin-swagger-spring-functional

A project template for Kotlin Spring WebFlux. The template features automatic request validation and interactive API documentation using an OpenApi 3.0 or Swagger 2.0 specification. The template provides 12-factor compliant environment based config and integrated in linting.

What's included?

Request validation and interactive documentation are based on an OpenApi 3.0 or Swagger v2 API specification. The specification is located at main/resources/static/api.yaml.

Install

Clone this repo

Build

./gradlew build

Run

./gradlew run

Lint

## show lint errors
./gradlew lintKotlin

## Attempt to auto fix lint errors
./gradlew formatKotlin

Test

./gradlew test

Dist

./gradlew clean distZip

Output artifact located at build/distributions

or unpacked

./gradlew clean distZip unzip

Output artifact located at build/unpacked/dist

Run the standalone dist

Create an unpacked dist. See the Dist section above. Then run it

cp build/unpacked/dist $HOME/kotlin-swagger-spring-functional-1.0.0/bin/kotlin-swagger-spring-functional

Try It!

Run the app or run the standalone dist, then:

curl http://localhost:8080/api/users

Try the example endpoints (with swagger validation)

POST to /users with a valid request body

curl -X POST http://localhost:8080/api/users -H "Content-Type: application/json" -d '{ "firstname": "carmine", "lastname": "dimascio" }'    

result

{
  "firstname":"carmine",
  "lastname":"dimascio"
}

POST to /users with an invalid request body i.e. we leave off the required field lastname

curl -X POST http://localhost:8080/api/users -H "Content-Type: application/json" -d '{ "firstname": "carmine" }'

result

{
  "errors":[{
    "code":"bad_request",
    "message":"Object has missing required properties ([\"lastname\"])"}
]}

Try the Interactive API documentation

Navigate to http://localhost:8080

Contributors ✨

Thanks goes to these wonderful people (emoji key):


Katie Levy

💻

Paul

📖

Ibragimov Ruslan

💻

Christof

💻

This project follows the all-contributors specification. Contributions of any kind welcome!

License

Apache 2

Buy Me A Coffee

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].