Use rswag to update openapi spec#2085
Open
sanason wants to merge 4 commits into
Open
Conversation
sanason
commented
Jun 26, 2026
| @@ -1,19 +0,0 @@ | |||
| # frozen_string_literal: true | |||
|
|
|||
Member
Author
There was a problem hiding this comment.
Safe to delete - no routes are mapped to this controller.
sanason
commented
Jun 26, 2026
| @@ -27,6 +27,7 @@ def index | |||
| meta: { | |||
| current_page: cx_responses.current_page, | |||
| size: cx_responses.size, | |||
Member
Author
There was a problem hiding this comment.
Adding this here so it matches the meta block in /forms/{id}/responses.
sanason
commented
Jun 26, 2026
| if current_user.organizational_admin? | ||
| render json: current_user.organization.forms | ||
| .order(:id) | ||
| .limit(100), each_serializer: FormSerializer |
Member
Author
There was a problem hiding this comment.
I don't like this undocumented and arbitrary limit. A safer solution would be to add pagination but the API already has a bunch of unlimited endpoints and I don't think this one is more of a risk than any of them.
sanason
commented
Jun 26, 2026
| end | ||
| namespace :v1 do | ||
| resources :organizations, only: [:index] | ||
| resources :collections, only: [:index] |
Member
Author
There was a problem hiding this comment.
Deleting because this route has no corresponding controller.
sanason
commented
Jun 26, 2026
| @@ -54,8 +54,8 @@ | |||
| expect(csv.class).to eq(CSV::Table) | |||
| expect(csv.size).to eq(2) | |||
|
|
|||
Member
Author
There was a problem hiding this comment.
Changed because the factory changed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The purpose of this PR is to update the OpenAPI spec for the V1 Touchpoints API. The updated spec adds documentation for the following endpoints:
It removes documentation for two digital registry endpoints:
Those endpoints still exist but, since the public-facing digital registry was shuttered in 2024, I'm not willing to maintain the documentation for the corresponding API endpoints. /websites is still documented because I know that GSA is still using the website registry as its internal inventory tool.