# Validate Pipeline Template

`POST /v1/pipelines/templates:validate`

Everything apply checks, writing nothing: the file's shape, every pin,
the resolved graph's ports as a run would see them, and its outputs.

- Base URL: `https://junction-api.qualiastudios.dev`
- Authentication: an API key in the `X-API-Key` header, or `Authorization: Bearer …`

## Request body

Required: `application/json` `TemplateSource`

## Responses

- `200` Successful Response: `application/json` `TemplateValidation`
- `401` Invalid or missing API key: `application/json` `ErrorResponse`
- `403` Missing capability on the workspace: `application/json` `ErrorResponse`
- `422` Validation Error: `application/json` `HTTPValidationError`

## Schemas

```yaml
TemplateSource:
  properties:
    source:
      type: string
      maxLength: 65536
      description: "The TOML file: name, description, nodes, edges, outputs"
  additionalProperties: false
  type: object
  required:
    - source
  title: TemplateSource
  description: A template file, as it is kept in the workspace's repository.
TemplateValidation:
  properties:
    valid:
      type: boolean
    errors:
      items:
        type: string
      type: array
    name:
      type:
        - string
        - "null"
    launch_fields:
      items:
        $ref: "#/components/schemas/LaunchField"
      type: array
  type: object
  required:
    - valid
  title: TemplateValidation
LaunchField:
  properties:
    name:
      type: string
    type_name:
      type: string
    schema:
      additionalProperties: true
      type: object
    required:
      type: boolean
    default:
      nullable: true
    resolve:
      nullable: true
      additionalProperties: true
      type: object
    ui:
      additionalProperties: true
      type: object
  type: object
  required:
    - name
    - type_name
    - required
  title: LaunchField
  description: |-
    One launch-form field of a template: an exposed port with its JSON
    schema, derived required-ness, and display metadata.
ErrorResponse:
  properties:
    detail:
      type: string
      description: Error message describing what went wrong
  type: object
  required:
    - detail
  title: ErrorResponse
  description: Standard error response.
HTTPValidationError:
  properties:
    detail:
      items:
        $ref: "#/components/schemas/ValidationError"
      type: array
  type: object
  title: HTTPValidationError
ValidationError:
  properties:
    loc:
      items:
        type:
          - string
          - integer
      type: array
      title: Location
    msg:
      type: string
      title: Message
    type:
      type: string
      title: Error Type
    input: {}
    ctx:
      type: object
      title: Context
  type: object
  required:
    - loc
    - msg
    - type
  title: ValidationError
```
