Woodpecker is a community fork of the Drone CI system.
Find a file
Martin W. Kirst 14177635b6
Update swagger API specification (#1782)
# Summary

This PR drops the outdated former swagger.yaml/json and introduced
automatic API document generation from Go code.
The generated code is also used to generate documentation/markdown for
the community page,
as well as enable the Woodpecker server to serve a Swagger Web UI for
manual tinkering.

I did opt-in for gin-swagger, a middleware for the Gin framework, to
ease implementation and have a sophisticated output.
This middleware only produces Swagger v2 specs. AFAIK the newer OpenApi
3x tooling is not yet that mature,
so I guess that's fine for now.

## Implemenation notes

- former swagger.json files removed
- former // swagger godocs removed
- introduced new dependency gin-swagger, which uses godoc annotations on
top of Gin Handler functions.
- reworked Makefile to automatically generate Go code for the server
- introduce new dependency go-swagger, to generate Markdown for
documentation purposes
- add a Swagger Web UI, incl. capabilities for manual API exploration
- consider relative root paths in the implementation
- write documentation for all exposed API endpoints
- incl. API docs in the community website (auto-generated)
- provide developer documentation, for the Woodpecker authors
- no other existing logic/code was intentionally changed

---------

close #292

---------

Co-authored-by: qwerty287 <80460567+qwerty287@users.noreply.github.com>
Co-authored-by: 6543 <6543@obermui.de>
2023-06-03 21:38:36 +02:00
.github Change issue template labels (#1593) 2023-02-28 18:31:40 +01:00
.vscode Use modern error handling and enforce it via lint (#1327) 2023-02-02 00:08:02 +01:00
.woodpecker Update swagger API specification (#1782) 2023-06-03 21:38:36 +02:00
agent Remove unused file system api (#1791) 2023-05-31 18:03:03 +02:00
cli Buildin Env Vars, use _URL for all links/urls (#1794) 2023-05-31 18:03:38 +02:00
cmd Update swagger API specification (#1782) 2023-06-03 21:38:36 +02:00
contrib/woodpecker-test-repo/.woodpecker Create test repo on Gitpod start (#1248) 2022-10-09 22:13:04 +02:00
docker Update alpine images to 3.18 (#1765) 2023-05-18 10:08:35 +02:00
docs Update swagger API specification (#1782) 2023-06-03 21:38:36 +02:00
nfpm fix nfpm (#788) 2022-02-24 15:35:11 +01:00
pipeline Revert to docker 20.10.x for API 1.41 compatibility (#1792) 2023-06-02 15:09:38 +02:00
server Update swagger API specification (#1782) 2023-06-03 21:38:36 +02:00
shared Drop ".drone.yml" as default pipeline config (#1795) 2023-05-31 16:02:20 +02:00
version gofumpt -w -l -extra . (#661) 2022-01-05 21:50:23 +01:00
web Update swagger API specification (#1782) 2023-06-03 21:38:36 +02:00
woodpecker-go Add agent functions (#1754) 2023-05-14 16:46:54 +02:00
.changelog.yml Update .changelog.yml to account regression lable (#1808) 2023-06-02 15:16:09 +02:00
.ecrc Update swagger API specification (#1782) 2023-06-03 21:38:36 +02:00
.editorconfig Use editorconfig-checker (#982) 2022-06-17 12:03:34 +02:00
.gitignore Update swagger API specification (#1782) 2023-06-03 21:38:36 +02:00
.gitpod.yml Fix gitea development setup (#1613) 2023-03-11 07:08:00 +01:00
.golangci.yml Update swagger API specification (#1782) 2023-06-03 21:38:36 +02:00
CHANGELOG.md Add Changelog v0.15.9 (#1746) 2023-05-11 16:07:31 +02:00
CONTRIBUTING.md Update Owners 2023 (#1516) 2023-01-01 19:33:08 +01:00
docker-compose.example.yml Renamed procs/jobs to steps in code (#1331) 2022-10-28 17:38:53 +02:00
docker-compose.gitpod.yml Create test repo on Gitpod start (#1248) 2022-10-09 22:13:04 +02:00
go.mod Update swagger API specification (#1782) 2023-06-03 21:38:36 +02:00
go.sum Update swagger API specification (#1782) 2023-06-03 21:38:36 +02:00
LICENSE Optimize license files (#355) 2021-09-25 15:15:54 +02:00
Makefile Update swagger API specification (#1782) 2023-06-03 21:38:36 +02:00
README.md docs: change broken twitter url (#1729) 2023-04-30 21:54:38 +02:00
SECURITY.md Create SECURITY.md (#396) 2021-10-03 16:15:58 +02:00

Woodpecker


Translation status


Woodpecker

Woodpecker is a community fork of the Drone CI system.

woodpecker

🫶 Support

Please consider to donate and become a backer. 🙏 [Become a backer]

🚀 Usage

.woodpecker.yml

  • Place your pipeline in a file named .woodpecker.yml in your repository
  • Pipeline steps can be named as you like
  • Run any command in the commands section

Read More

Build steps are containers

  • Define any Docker image as context
  • Install the needed tools in custom Docker images, use them as context

Read More

Plugins

Woodpecker has official plugins, but you can also use your own.

Read More

📖 Documentation

https://woodpecker-ci.org/

Contribute

See Contributing Guide

Open in Gitpod

📣 Translate

We use an own Weblate instance at translate.woodpecker-ci.org.

Translation status

👋 Who uses Woodpecker?

Codeberg, the Woodpecker project itself, and many others.

Leave a comment if you're using it as well.

Also consider using the topic WoodpeckerCI in your repository, so others can learn from your config and use the hashtag #WoodpeckerCI when talking about the project on social media!

Here are some places where people mention Woodpecker:

Stars over time

Stargazers over time

License

Woodpecker is Apache 2.0 licensed with the source files in this repository having a header indicating which license they are under and what copyrights apply.

Files under the docs/ folder are licensed under Creative Commons Attribution-ShareAlike 4.0 International Public License.