Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Description

Design and document robust APIs with clear endpoints, fostering developer collaboration and scalability.

Version

Status
title12.0

Pre-selected AI

Status
colourBlue
titleAnthropic: Claude 3.5 Sonnet

Contexts

Jira issue (full context) Project: Purpose Project: Features / Advantages Project: Target Audience Project: Tech Stack

Steps

API Requirements Analysis

  • Input: Jira issue description and project goalsA document describing the game mechanics from contexts

  • AI Task: Extract requirements for the API:

    Identify endpoints

    • Extract key aspects: rules, user flows, data flows, core functionality, and functionalities.Highlight constraints etc.

    • Create a glossary of relevant terms and definitions.

    • Determine roles/entities involved (e.g., user, performance, securityadmin, NPC, etc.).

  • Output: A structured table of API requirements.concise, structured overview covering:

    • Fundamental concepts and components

    • Main interactions or workflows

    • Basic relationships among these elements

1

Endpoint DesignUser Actions

  • Input: API requirements and data flow contextOutput from "Requirements Analysis" (glossary, core components, etc.)

  • AI Task: Define the endpoints for the API:

    Include HTTP methods (GET, POST, PUT, DELETE

    • Compile a full list of possible user actions (in a game context: movement, item usage, etc.; in software: CRUD actions, triggers, etc.).Specify request/response structures

    • For each action:

      • Name (short tag)

      • Short description

      • Requirements/conditions (e.g.,

      headers
      • parameters,

      body
      • permissions,

      query params).
      • items)

      • Result (changes in system state, UI updates, etc.)

  • Output: A structured table of API endpoints.Comprehensive list (table or hierarchy) of all user actions with detailed descriptions

2

Document APIData model

  • Input: API design and endpoint detailsUser actions and entities

  • AI Task: Create developer-friendly API documentation:

    • Include endpoint descriptions, examples, and error handling.

    • Suggest tools like Swagger/OpenAPI for documentation generation.

  • Output: A detailed API documentation draft.

3

Validate API Design

  • Input: Full API design, endpoints, and documentation

  • AI Task: Review the API design for completeness:

    • Identify gaps or inconsistencies in endpoint definitions.

    • Suggest improvements for scalability or security.

  • Output: A validation report with actionable feedback.

    • Identify main entities (e.g., Player, User, Item, Resource, etc.) and their fields (id, status, relationships, etc.).

    • Determine client-side vs. server-side storage (or local vs. cloud for software).

    • Define how and when the system synchronizes data.

  • Output: A schema (ER diagram or tabular format) clarifying how data is structured and updated

3

API Design

  • Input: User actions and the data model

  • AI Task:

    • Map endpoints or service methods to each action (REST, GraphQL, WebSocket, etc.).

    • Specify request/response formats (HTTP method, path, parameters, body, etc.).

  • Output: A table with next columns:

    • Endpoint: API route.

    • HTTP Method: GET, POST, PUT, DELETE.

    • Request Body: JSON schema for the request payload (use `json` formatting).

    • Response Structure: JSON schema for the response payload (use `json` formatting).

4

Design Validation

  • Input: Draft API specification and the list of user actions

  • AI Task:

    • Verify that all actions are covered (no duplicates or gaps).

    • Adjust data structures or endpoints if needed.

  • Output: A refined API spec addressing all requirements and potential concerns