docs: updated docs for patch suggestion endpoint #1665
+120
−26
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.
OpenAPI Documentation Update: Suggestion Status Endpoint Clarification
Summary
Updated the SpaceCat OpenAPI specification to clarify the proper endpoint for updating suggestion statuses and improve documentation for the batch status update endpoint.
Problem
The API documentation was unclear about how to update suggestion statuses:
/sites/{siteId}/opportunities/{opportunityId}/suggestions/{suggestionId}) does not support updating thestatusfield/sites/{siteId}/opportunities/{opportunityId}/suggestions/status) which is the correct way to update statusesChanges Made
1. Enhanced Batch Status Endpoint Documentation
File:
docs/openapi/site-opportunities.yamlPATCH /sites/{siteId}/opportunities/{opportunityId}/suggestions/statusendpoint with:2. Clarified Individual Suggestion PATCH Endpoint
File:
docs/openapi/site-opportunities.yamlPATCH /sites/{siteId}/opportunities/{opportunityId}/suggestions/{suggestionId}to include:statusandtypefields are READ-ONLYrank,data, andkpiDeltas3. Fixed Schema Inconsistencies
File:
docs/openapi/schemas.yamlUpdated schemas to match actual implementation:
uuidfield (was missing)idtouuidfor consistencyfailuretofailedin metadata (matches implementation)4. Updated Examples
File:
docs/openapi/examples.yamlbroken-backlinks-suggestions-status-update-responseexample to:uuidinstead ofidfailedinstead offailurein metadataPlease ensure your pull request adheres to the following guidelines:
describe here the problem you're solving.
If the PR is changing the API specification:
yet. Ideally, return a 501 status code with a message explaining the feature is not implemented yet.
If the PR is changing the API implementation or an entity exposed through the API:
If the PR is introducing a new audit type:
Related Issues
Thanks for contributing!