-
Notifications
You must be signed in to change notification settings - Fork 120
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
OpenAPI Spec #11689
base: main
Are you sure you want to change the base?
OpenAPI Spec #11689
Conversation
Is there any linting or compilation (like, a bunch of yaml files ➡️ a single json file) we can do in CI for this? |
+1 I am curious if there is an validation we can do on the files, and also eventually what we can do to make sure that our implementation matches what we document |
docs/attempts-api/schemas/events/account-recovery/ForgotPasswordEmailRateLimited.yml
Outdated
Show resolved
Hide resolved
# What is the best way of documenting all these errors? https://docs.google.com/document/d/1H7SAM8DSnbRJqKoSj4Qdzr-UvLCNMupt2zoqHLsIFe8/edit?tab=t.0#heading=h.uiomae9tgtly | ||
# They won't be very readable in this document | ||
description: | | ||
Due to technical limitations, errors for this event will be localized into English, Spanish, or French, depending on the user’s settings, and appear in the “failure_reasons” setting that way. |
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.
I forgot about this gem.
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.
yeah i am going to see if we can fix this this time around!
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 really, really should try to avoid doing this
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.
I think we've discussed using the error codes/keys rather than the 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.
i just put time on amir's calendar to discuss the technical limitations and what we can do when he's back in the office!
@matthinz and @zachmargolis yes! there are a bunch of different tools that can do this. i was using redocly as i found recommendations for it generally, and it has a vscode extension. it can both compile into one document and lint. (to your second point zach, i would like to figure out also how to make sure our implementation matches the spec, but i haven't given much thought to that quite yet.) |
swagger-cli might be a good tool to look into for validation. It can also compile a bunch of yaml files down to a single JSON file, which would be cool, since we could then ship that JSON file and make it publicly accessible on secure.login.gov |
Minor - we should sort all the enum values so that it is easy to look up as well as maintain. |
@matthinz it would also be cool to compile the docs as reference docs in the dev-docs site somehow, to ensure that documentation matches our source of truth! i added a linting step in 9542a03 -- am happy to add a step that compiles to json, but am curious if anyone has thoughts about the best place to insert that in ci? |
@vrajmohan sorted in 033c0e1 ! |
# What is the best way of documenting all these errors? https://docs.google.com/document/d/1H7SAM8DSnbRJqKoSj4Qdzr-UvLCNMupt2zoqHLsIFe8/edit?tab=t.0#heading=h.uiomae9tgtly | ||
# They won't be very readable in this document | ||
description: | | ||
Due to technical limitations, errors for this event will be localized into English, Spanish, or French, depending on the user’s settings, and appear in the “failure_reasons” setting that way. |
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.
Due to technical limitations, errors for this event will be localized into English, Spanish, or French, depending on the user’s settings, and appear in the “failure_reasons” setting that way. | |
Due to technical limitations, errors for this event will be localized into English, Spanish, French, or Chinese (Simplified) depending on the user’s settings, and appear in the “failure_reasons” setting that way. |
ccc5045
to
a7239b9
Compare
4dc0d13
to
10f06a5
Compare
🎫 Ticket
Link to the relevant ticket:
Create OpenAPI spec
🛠 Summary of changes
🚨 Feedback requested! (I probably made a lot of mistakes!)
This change is a preliminary spec for the new Attempts API implementation. It follows in the spirit of the Shared Signals Framework (SSF) and utilizes the RISC poll-based SET delivery specification (RFC 8936).
The initial spec includes a configuration, verification, and status endpoint as well as the polling endpoint.
It includes all 65 Attempts API events, which are divided into Registration, Sign In, Identity Proofing, and Account Recovery events. The events were compiled from this schema document, with some small changes for consistency. If any of the data in the events look like it will be difficult or impossible to get, let's talk!
If you'd like to view the documentation in a compiled reference doc, you can:
redocly.yaml
file with the following content:(if you click down into the
/poll
endpoint, you can get to the individual events, as shown in the screenshot. click the carets next to the event names in order to see what data is inside them)