Skip to content

This is a working example of swagger/open-api documentation generated with the zio-http library

Notifications You must be signed in to change notification settings

dpratt747/zio-http-swagger-example-scala3

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

What this contains:

  • zio-http endpoint examples
  • reading from file and sending files via http

Swagger/Open api endpoints for the following:

Sending files

curl -X 'POST' \
  'http://localhost:8080/file' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/octet-stream' \
  --data-binary '@README.md'

Getting files:

curl -X 'GET' \
  'http://localhost:8080/file' \
  -H 'accept: application/octet-stream'

Status endpoint:

curl -X 'GET' \
  'http://localhost:8080/status' \
  -H 'accept: application/json'

To run the application:

sbt "runMain runner.Main"

and

curl --location 'http://localhost:8080/status'

or

curl --location 'http://localhost:8080/hello'

To reach the open api/swagger docs use this url:

http://localhost:8080/docs/openapi

Relevant documentation:

About

This is a working example of swagger/open-api documentation generated with the zio-http library

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages