[BUG] The response definition for the GET /_snapshot/{repository}/{snapshot} endpoint is incorrect.
What is the bug?
The response from the get snapshot endpoint contains only snapshots. https://opensearch.org/docs/latest/api-reference/snapshots/get-snapshot/
However, the API definition includes total, responses, and remaining. https://github.com/opensearch-project/opensearch-api-specification/blob/main/spec/namespaces/snapshot.yaml#L411-L427
Similarly, the definition of SnapshotInfo includes unnecessary duration, index_details, metadata, reason, repository, and feature_states." https://github.com/opensearch-project/opensearch-api-specification/blob/10027be9609a6345cd82cd4840da86bdcba2f179/spec/schemas/snapshot._common.yaml#L9-L63
How can one reproduce the bug?
Compare the actual response with requests made to OpenSearch.
What is the expected behavior?
Match spec to what's in the OpenSearch code.
What is your host/environment?
OpenSearch 2.15.0
Do you have any additional context?
https://github.com/opensearch-project/opensearch-java/issues/420
@hogesako Thanks for opening this, appreciate a PR if you have time!
Duration, metadata, and reason were described in the source code. https://github.com/opensearch-project/OpenSearch/blob/main/server/src/main/java/org/opensearch/snapshots/SnapshotInfo.java