-
Notifications
You must be signed in to change notification settings - Fork 1
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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? |
There was a problem hiding this comment.
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.
There was a problem hiding this 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: >- |
There was a problem hiding this comment.
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.
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.