Skip to content
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

Add missing request specs for /api/v1/tags endpoint #23146

Closed

Commits on Jan 18, 2023

  1. Add JSON-Schema definition for Tag API entity.

    Adds a [JSON-Schema](https://json-schema.org) specification for [Tag](https://docs.joinmastodon.org/entities/Tag/) and the nested history object that I've called `TrendHistory`.
    darronschall committed Jan 18, 2023
    Configuration menu
    Copy the full SHA
    a12e2da View commit details
    Browse the repository at this point in the history
  2. Add API request specs for /api/v1/tags endpoint.

    This aims to be a complete specification and source of truth for how the endpoint behaves. It specifies the responses in both happy and sad paths, error handling, and authentication and authorization handling.
    
    Use JSON-schema definitions to validate the API responses via `match_json_schema` added in mastodon#21395.
    
    There is some repeated code and abstractions here. The next step is to extract [RSpec shared_examples](https://relishapp.com/rspec/rspec-core/docs/example-groups/shared-examples) to DRY. Another option to consider is moving towards the [`rswag` gem](https://github.com/rswag/rswag) per issue mastodon#20572.
    darronschall committed Jan 18, 2023
    Configuration menu
    Copy the full SHA
    ae411cf View commit details
    Browse the repository at this point in the history