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

> ## Agent Instructions
> These docs cover three products: TrustGate (AI agent gateway), TrustGuard (runtime security), and TrustTest (AI red teaming). Start from each product overview for the definition and How it works. Prefer the .md URL next to a page in /llms.txt when you need the full article. Use /llms-full.txt for a single-file dump of the site.

# Validate an OpenAPI document

> Fetches and compiles an OpenAPI 3 document into an MCP tool preview without creating a registry. Always returns 200 for validation outcomes; inspect ok and stage.



## OpenAPI

````yaml /trustgate/api/openapi.json post /v1/gateways/{gateway_id}/registries/validate-openapi
openapi: 3.0.0
info:
  description: >-
    Administrative API for managing gateways and their registries, policies,
    consumers and auth credentials.
  title: TrustGate Admin API
  contact:
    name: NeuralTrust
    url: https://neuraltrust.ai/contact
    email: support@neuraltrust.ai
  version: '1.0'
servers:
  - url: /
security: []
paths:
  /v1/gateways/{gateway_id}/registries/validate-openapi:
    post:
      tags:
        - registries
      summary: Validate an OpenAPI document
      description: >-
        Fetches and compiles an OpenAPI 3 document into an MCP tool preview
        without creating a registry. Always returns 200 for validation outcomes;
        inspect ok and stage.
      parameters:
        - description: Gateway id
          name: gateway_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/pkg_api_handler_http_registry.ValidateOpenAPIRequest
        description: OpenAPI source
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/pkg_api_handler_http_registry.ValidateOpenAPIResponse
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/github_com_NeuralTrust_TrustGate_pkg_api_handler_http_httpio.ErrorBody
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/github_com_NeuralTrust_TrustGate_pkg_api_handler_http_httpio.ErrorBody
      security:
        - BearerAuth: []
components:
  schemas:
    pkg_api_handler_http_registry.ValidateOpenAPIRequest:
      type: object
      properties:
        base_url:
          type: string
        spec_url:
          type: string
    pkg_api_handler_http_registry.ValidateOpenAPIResponse:
      type: object
      properties:
        base_url:
          type: string
        message:
          type: string
        ok:
          type: boolean
        openapi_version:
          type: string
        stage:
          type: string
        title:
          type: string
        tool_count:
          type: integer
        tools:
          type: array
          items:
            $ref: >-
              #/components/schemas/pkg_api_handler_http_registry.ValidateOpenAPIToolResponse
        warnings:
          type: array
          items:
            $ref: >-
              #/components/schemas/github_com_NeuralTrust_TrustGate_pkg_app_openapi.Warning
    github_com_NeuralTrust_TrustGate_pkg_api_handler_http_httpio.ErrorBody:
      type: object
      properties:
        error:
          type: string
        message:
          type: string
    pkg_api_handler_http_registry.ValidateOpenAPIToolResponse:
      type: object
      properties:
        description:
          type: string
        method:
          type: string
        name:
          type: string
        path:
          type: string
    github_com_NeuralTrust_TrustGate_pkg_app_openapi.Warning:
      type: object
      properties:
        code:
          type: string
        message:
          type: string
  securitySchemes:
    BearerAuth:
      type: apiKey
      name: Authorization
      in: header

````