Skip to content

Create Static Mock JSON:API Endpoint for Testing #4

@intel352

Description

@intel352

Description:
Create a static mock server that provides JSON:API compliant responses for testing the validator.

Requirements:

  • Set up a simple mock server (using Express.js or similar)
  • Implement endpoints that return valid JSON:API responses:
    • /articles - Collection of articles with relationships
    • /articles/{id} - Single article resource
    • /articles/{id}/author - Related author resource
    • /articles/{id}/comments - Related comments collection
    • /people/{id} - Person resource
    • /comments/{id} - Comment resource
  • Include examples of:
    • Compound documents with included resources
    • Pagination links
    • Sparse fieldsets support
    • Sorting capabilities
    • Error responses
    • Meta information
    • JSON:API version object
  • Support various query parameters as per spec
  • Include both valid and intentionally invalid responses for testing
  • Document all available endpoints and their behaviors

Definition of Done:

  • Mock server runs locally and responds to requests
  • All endpoints return properly formatted JSON:API responses
  • Includes comprehensive examples of all spec features
  • Documentation clearly explains available endpoints
  • Can be used to test both positive and negative validation cases

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions