> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kynasmith.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Validate Movespec Draft

> Validate the current draft through the shared backend loader.



## OpenAPI

````yaml /generated/api.openapi.json post /api/movespecs/{movespec_id}/draft/validate
openapi: 3.1.0
info:
  title: Kynasmith Public API
  version: 0.1.0
servers: []
security: []
paths:
  /api/movespecs/{movespec_id}/draft/validate:
    post:
      tags:
        - movespecs
      summary: Validate Movespec Draft
      description: Validate the current draft through the shared backend loader.
      operationId: validate_movespec_draft_api_movespecs__movespec_id__draft_validate_post
      parameters:
        - in: path
          name: movespec_id
          required: true
          schema:
            format: uuid
            title: Movespec Id
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MoveSpecValidationResult'
          description: Successful Response
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicErrorEnvelope'
          description: The request payload or query parameters are invalid.
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicErrorEnvelope'
          description: Authentication failed.
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicErrorEnvelope'
          description: Caller is not authorized for this action.
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicErrorEnvelope'
          description: Referenced resource does not exist.
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicErrorEnvelope'
          description: Request conflicts with current resource state.
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicErrorEnvelope'
          description: Request validation failed for the targeted resource state.
      security:
        - BearerAccessToken: []
        - BearerAccessToken: []
components:
  schemas:
    MoveSpecValidationResult:
      description: >-
        Structured validation envelope for public MoveSpec draft and version
        checks.
      properties:
        errors:
          description: Validation errors that block runtime loading.
          items:
            $ref: '#/components/schemas/MoveSpecValidationIssue'
          title: Errors
          type: array
        ok:
          description: Whether the YAML is valid for runtime use.
          title: Ok
          type: boolean
        target_id:
          description: Identifier for the validated target.
          title: Target Id
          type: string
        target_type:
          description: What public MoveSpec target was validated.
          enum:
            - draft
            - movespec_version
            - scratch
          title: Target Type
          type: string
        validated_at:
          description: ISO-8601 UTC timestamp for the validation run.
          title: Validated At
          type: string
        warnings:
          description: Non-blocking validation warnings.
          items:
            $ref: '#/components/schemas/MoveSpecValidationIssue'
          title: Warnings
          type: array
      required:
        - ok
        - target_type
        - target_id
        - validated_at
      title: MoveSpecValidationResult
      type: object
    PublicErrorEnvelope:
      description: Stable public error envelope shared across transports.
      properties:
        error:
          $ref: '#/components/schemas/PublicErrorDetail'
          description: Structured error payload.
      required:
        - error
      title: PublicErrorEnvelope
      type: object
    MoveSpecValidationIssue:
      description: One structured validation issue returned by public MoveSpec validation.
      properties:
        code:
          description: Stable machine-readable issue code.
          title: Code
          type: string
        column:
          anyOf:
            - type: integer
            - type: 'null'
          description: 1-indexed YAML column number when known.
          title: Column
        line:
          anyOf:
            - type: integer
            - type: 'null'
          description: 1-indexed YAML line number when known.
          title: Line
        message:
          description: Human-readable issue description.
          title: Message
          type: string
        path:
          anyOf:
            - type: string
            - type: 'null'
          description: Structured config path when known.
          title: Path
        severity:
          description: Issue severity level.
          enum:
            - error
            - warning
          title: Severity
          type: string
      required:
        - code
        - message
        - severity
      title: MoveSpecValidationIssue
      type: object
    PublicErrorDetail:
      description: Stable public error payload shared across transports.
      properties:
        code:
          description: Machine-readable error code.
          title: Code
          type: string
        details:
          additionalProperties:
            anyOf:
              - type: string
              - type: integer
              - type: number
              - type: boolean
              - type: 'null'
          description: Bounded structured error details.
          title: Details
          type: object
        message:
          description: Human-readable error message.
          title: Message
          type: string
        retryable:
          description: Whether the caller can retry safely.
          title: Retryable
          type: boolean
      required:
        - code
        - message
        - retryable
      title: PublicErrorDetail
      type: object
  securitySchemes:
    BearerAccessToken:
      description: Backend-issued machine access token for project-scoped API access.
      scheme: bearer
      type: http

````