Skip to content

sersoft-gmbh/route-docs

This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Folders and files

NameName
Last commit message
Last commit date
Mar 12, 2024
Mar 12, 2024
Aug 15, 2023
Jul 22, 2021
Apr 8, 2024
Jan 4, 2019
May 30, 2024
Mar 12, 2024
Mar 12, 2024
May 7, 2022

Repository files navigation

RouteDocs

GitHub release Tests Codacy Badge codecov Docs

This adds some types and extensions to Vapor's Route type that allows documenting each route. Also, a ViewContext object helps in bringing these documentations to a web page. Finally, there's a default docs page to show all collected route documentation.

Installation

Add the following dependency to your Package.swift:

.package(url: "https://github.com/sersoft-gmbh/route-docs.git", from: "2.0.0"),

Compatibility

  • For Vapor up to version 3, use RouteDocs version 1.x.y.
  • For Vapor as of version 4, use RouteDocs version 2.x.y.

Possible Features

While not yet integrated, the following features might provide added value and could make it into RouteDocs in the future:

  • Improved cycle detection
  • Better representation of types that are named but encode as a single raw value (e.g. RawRepresentable types)

Documentation

The API is documented using header doc. If you prefer to view the documentation as a webpage, there is an online version available for you.

Contributing

If you find a bug / like to see a new feature in RouteDocs there are a few ways of helping out:

  • If you can fix the bug / implement the feature yourself please do and open a PR.
  • If you know how to code (which you probably do), please add a (failing) test and open a PR. We'll try to get your test green ASAP.
  • If you can do neither, then open an issue. While this might be the easiest way, it will likely take the longest for the bug to be fixed / feature to be implemented.

License

See LICENSE file.