> ## 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 Operation Schema

> Returns the spec for a given operation.

Parameters:
- api_name (str): The name of the spec to list operations for.
- operation_name(str): The name of the operation to get the spec for.
- current_user (dict): The current user making the request. Retrieved using dependency injection.

Returns:
- List[dict]: List of operations or error detail.

Raises:
- HTTPException(500): If an error occurs while listing operations.



## OpenAPI

````yaml post /api/spec/{api_name}/operation_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}/operation_schema:
    post:
      tags:
        - Spec
      summary: Spec Operation Schema
      description: >-
        Returns the spec for a given operation.


        Parameters:

        - api_name (str): The name of the spec to list operations for.

        - operation_name(str): The name of the operation to get the spec for.

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


        Returns:

        - List[dict]: List of operations or error detail.


        Raises:

        - HTTPException(500): If an error occurs while listing operations.
      operationId: spec_operation_schema
      parameters:
        - name: api_name
          in: path
          required: true
          schema:
            type: string
            title: Api Name
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: string
              title: Operation 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}'

````