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

# Spec Get Schema

> Get a specific spec schema.

Retrieves the schema of a spec identified by its API name.

Parameters:
- api_name (str): The name of the spec to retrieve information for.
- current_user (dict): The current user making the request. Retrieved using dependency injection.

Returns:
- The OpenAPI spec in JSON format

Raises:
- HTTPException(404): If the spec with the provided API name is not found.
- HTTPException(500): If an error occurs while fetching the spec information.



## OpenAPI

````yaml get /api/spec/{api_name}/schema
openapi: 3.1.0
info:
  title: Apigene
  description: Apigene API
  version: 1.0.0
  contact:
    name: Apigene Support
    url: https://app.apigene.ai
    email: support@apigene.ai
servers:
  - url: https://app.apigene.ai
security:
  - BearerAuth: []
paths:
  /api/spec/{api_name}/schema:
    get:
      tags:
        - Spec
      summary: Spec Get Schema
      description: >-
        Get a specific spec schema.


        Retrieves the schema of a spec identified by its API name.


        Parameters:

        - api_name (str): The name of the spec to retrieve information for.

        - current_user (dict): The current user making the request. Retrieved
        using dependency injection.


        Returns:

        - The OpenAPI spec in JSON format


        Raises:

        - HTTPException(404): If the spec with the provided API name is not
        found.

        - HTTPException(500): If an error occurs while fetching the spec
        information.
      operationId: spec_get_schema
      parameters:
        - name: api_name
          in: path
          required: true
          schema:
            type: string
            title: Api Name
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - BearerAuth: []
components:
  schemas:
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        JWT Authorization header using the Bearer scheme. Example:
        'Authorization: Bearer {token}'

````