Skip to content

API Documentation#5

Merged
ItsJamie9494 merged 3 commits into
mainfrom
openapi
Apr 16, 2026
Merged

API Documentation#5
ItsJamie9494 merged 3 commits into
mainfrom
openapi

Conversation

@ItsJamie9494
Copy link
Copy Markdown
Collaborator

Autogenerate API Documentation and provide an API browser

/// <response code="200">The CTS route and stop data.</response>
[HttpGet("static")]
[Produces("application/json")]
[ProducesResponseType<BusStaticData>(200)]
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Examples are somewhat broken right now. We could manually override this by providing a textual example in the StaticData class

public ActionResult GetServiceAlertsWebsite()
[ProducesResponseType(302)]
[Tags(["CTS"])]
public ActionResult GetServiceAlertsWebsite() // FIXME: not a fan of the redirect API
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd like to look into a better way to handle Service Alerts

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GTFS Realtime data provides alerts, as does https://www.corvallistransit.com/rtt/public/api/transit/ServiceAlert

Comment thread CorvallisBus.Web/Startup.cs Outdated
Comment thread CorvallisBus.Web/Startup.cs Outdated
Comment thread CorvallisBus.Web/Startup.cs Outdated
Comment thread CorvallisBus.Web/Startup.cs Outdated
Comment thread CorvallisBus.Core/CorvallisBus.Core.csproj
Documents all available routes, and replaces the Index with the swagger
URL
Update README, disable XML comment warnings
@ItsJamie9494 ItsJamie9494 marked this pull request as ready for review April 16, 2026 03:43
@ItsJamie9494 ItsJamie9494 merged commit 941473c into main Apr 16, 2026
1 check passed
@ItsJamie9494 ItsJamie9494 deleted the openapi branch April 16, 2026 03:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant