Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a bunch of missing descriptions, models, and requirements #10

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

ianthetechie
Copy link
Contributor

Title says it all. I've done my best to document everything accurately based on a mix of OSRM and Mapbox docs (careful not to copy anything there that isn't already copied from OSRM; a LOT of their docs, including shortcomings, weird wordings, and funky grammar are), and Valhalla source code.

Copy link
Contributor Author

@ianthetechie ianthetechie left a comment

Choose a reason for hiding this comment

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

Here's a draft PR. I'll probably push some more improvements tomorrow as I generate more API clients from this.

I've done my best to conservatively mark required fields as well so that the generated models aren't so annoying to use. Similarly, I've marked documented enums (I think some of the maneuver ones still need factoring out).

openapi.yaml Outdated
items:
$ref: '#/components/schemas/ViaWaypoint'
# TODO: admins
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We are missing a model for admins.

geometry:
type: object
type: object # FIXME
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is going to be an encoded polyline in all of our use cases, but technically OSRM supports GeoJSON too. Any objection to just skipping that? It's going to be absurdly inefficient 😂

openapi.yaml Outdated
destinations:
# FIXME
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This isn't properly modeled.

openapi.yaml Outdated
type: object
exits:
# FIXME
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This isn't properly modeled.

openapi.yaml Outdated
Annotation:
type: object
properties:
# TODO: Refactor into properties?
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Might make sense to refactor some of these out to top level objects and/or add another property (I think title) for model naming control, but I'll see how badly it screws up the generated models first.

Copy link
Collaborator

@Archdoog Archdoog left a comment

Choose a reason for hiding this comment

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

Looking through this, seems like a definite improvement. I'd say we go for it and keep improving from there 👍

datasource_names:
type: array
items:
description: >-
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Note: I deleted metadata here because I couldn't find it in any responses/docs from either valhalla or mapbox.

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.

2 participants