-
Notifications
You must be signed in to change notification settings - Fork 0
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
Update OpenAPI specification #321
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.
Looks really good, just a couple of minor things.
@@ -1,35 +1,296 @@ | |||
openapi: '3.0.0' | |||
info: | |||
title: GOV.UK Search API | |||
title: GOV.UK Search API v2 | |||
version: 2.0.0-alpha | |||
|
|||
paths: | |||
/search: |
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.
Should this be /search.json (I notice it's inconsistent with the auto complete one)
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.
Actually it can just be /search
(the .json
is just a Railsism after all and the request content type is what matters - not to mention even that is ignored by Search API v2 which will always return JSON regardless of what you ask for 😂 )
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.
Great - I saw you amended autocomplete instead. Looks good.
docs/openapi/specification.yml
Outdated
|
||
This is used for analytics purposes to uniquely identify the search request. | ||
example: >- | ||
tgHwtQoLCLTQobYGEOeqt2wSJDY2Y2ZhYTBhLTAwMDAtMjIwZi04MGEwLWQ0ZjU0N2YwMjMxNCIHR0VORVJJQyp4t5KuMPn2sy3Usp0VmNa3LeuCsS2t-LMtmd6oL87mtS-0kq4w5-2ILdHmtS_C8J4Vo4CXIre3jC3ogrEtlt6oL6r4sy2b1rct3o-aIqvEii389rMtjr6dFYCymiKgibMtx8vzF4OymiKjibMt5O2ILduPmiKuxIot |
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 trust that this is a fake token 😄
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.
It is indeed 😁 But in some alternate universe it may relate to something...
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.
TBF I might make it more obviously fake so that people/cyber scanning tools don't get confused or worried
This brings our OpenAPI specification in line with the current state of the API endpoints for search, and adds the autocomplete endpoint.
This brings our OpenAPI specification in line with the current state of the API endpoints for search, and adds the autocomplete endpoint.
Live demo: https://generator.swagger.io/?url=https://raw.githubusercontent.com/alphagov/search-api-v2/549b3611f2d0ed37bbc56a969e422cbbbaddca63/docs/openapi/specification.yml