openapi: 3.0.3 info: title: APIGit API description: >- APIGit is a Git-native platform for full lifecycle API development, combining version control, API design, documentation, governance, testing, and dynamic mock servers in a single platform. version: "1.0" contact: name: APIGit url: https://apigit.com/ x-generated-from: documentation servers: - url: https://api.apigit.com/v1 description: APIGit Production API security: - apiKeyAuth: [] tags: - name: Repositories description: Manage API Git repositories. - name: APIs description: Manage API definitions and designs. - name: Documents description: Manage API documentation publications. - name: Mocks description: Manage dynamic mock servers. - name: Tests description: Manage API tests. paths: /repos: get: operationId: listRepositories summary: APIGit List Repositories description: Returns a list of API Git repositories for the authenticated user. tags: [Repositories] parameters: - name: limit in: query description: Maximum number of results. schema: {type: integer, default: 20} - name: offset in: query description: Number of results to skip. schema: {type: integer, default: 0} responses: '200': description: List of repositories. content: application/json: schema: $ref: '#/components/schemas/RepositoryList' examples: ListRepositories200Example: summary: Default listRepositories 200 response x-microcks-default: true value: data: - id: "repo-001" name: my-api description: My API repository visibility: public total: 1 '401': {$ref: '#/components/responses/Unauthorized'} x-microcks-operation: delay: 0 dispatcher: FALLBACK post: operationId: createRepository summary: APIGit Create Repository description: Creates a new API Git repository. tags: [Repositories] requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/RepositoryCreate' examples: CreateRepositoryRequestExample: summary: Default createRepository request x-microcks-default: true value: name: my-api description: My new API repository visibility: public responses: '201': description: Repository created. content: application/json: schema: $ref: '#/components/schemas/Repository' examples: CreateRepository201Example: summary: Default createRepository 201 response x-microcks-default: true value: id: "repo-001" name: my-api description: My new API repository visibility: public '401': {$ref: '#/components/responses/Unauthorized'} x-microcks-operation: delay: 0 dispatcher: FALLBACK /repos/{repoId}/api: get: operationId: getApiDefinition summary: APIGit Get API Definition description: Returns the OpenAPI definition for a repository. tags: [APIs] parameters: - name: repoId in: path required: true description: Repository ID. schema: {type: string} responses: '200': description: API definition. content: application/json: schema: type: object examples: GetApiDefinition200Example: summary: Default getApiDefinition 200 response x-microcks-default: true value: openapi: "3.0.3" info: title: My API version: "1.0" '401': {$ref: '#/components/responses/Unauthorized'} '404': {$ref: '#/components/responses/NotFound'} x-microcks-operation: delay: 0 dispatcher: FALLBACK /repos/{repoId}/mock: post: operationId: startMockServer summary: APIGit Start Mock Server description: Starts a dynamic mock server for the specified repository. tags: [Mocks] parameters: - name: repoId in: path required: true description: Repository ID. schema: {type: string} requestBody: content: application/json: schema: type: object properties: port: type: integer description: Port to run the mock server on. examples: StartMockServerRequestExample: summary: Default startMockServer request x-microcks-default: true value: port: 3000 responses: '200': description: Mock server started. content: application/json: schema: $ref: '#/components/schemas/MockServer' examples: StartMockServer200Example: summary: Default startMockServer 200 response x-microcks-default: true value: id: "mock-001" repoId: "repo-001" url: "https://mock.apigit.com/mock-001" status: running '401': {$ref: '#/components/responses/Unauthorized'} x-microcks-operation: delay: 0 dispatcher: FALLBACK /repos/{repoId}/tests: get: operationId: listTests summary: APIGit List Tests description: Returns all API tests for a repository. tags: [Tests] parameters: - name: repoId in: path required: true description: Repository ID. schema: {type: string} responses: '200': description: List of tests. content: application/json: schema: $ref: '#/components/schemas/TestList' examples: ListTests200Example: summary: Default listTests 200 response x-microcks-default: true value: data: - id: "test-001" name: Get Users Test status: passed total: 1 '401': {$ref: '#/components/responses/Unauthorized'} x-microcks-operation: delay: 0 dispatcher: FALLBACK components: securitySchemes: apiKeyAuth: type: apiKey in: header name: X-API-Key schemas: Repository: type: object description: An APIGit API repository. properties: id: {type: string, example: "repo-001"} name: {type: string, example: my-api} description: {type: string} visibility: {type: string, enum: [public, private], example: public} RepositoryCreate: type: object required: [name] properties: name: {type: string} description: {type: string} visibility: {type: string, enum: [public, private], default: public} RepositoryList: type: object properties: data: {type: array, items: {$ref: '#/components/schemas/Repository'}} total: {type: integer} MockServer: type: object description: A dynamic mock server instance. properties: id: {type: string, example: "mock-001"} repoId: {type: string, example: "repo-001"} url: {type: string, format: uri, example: "https://mock.apigit.com/mock-001"} status: {type: string, enum: [running, stopped], example: running} Test: type: object description: An API test. properties: id: {type: string, example: "test-001"} name: {type: string, example: Get Users Test} status: {type: string, enum: [passed, failed, pending], example: passed} TestList: type: object properties: data: {type: array, items: {$ref: '#/components/schemas/Test'}} total: {type: integer} Error: type: object properties: error: {type: string} message: {type: string} responses: Unauthorized: description: Authentication failed. content: application/json: schema: {$ref: '#/components/schemas/Error'} NotFound: description: Resource not found. content: application/json: schema: {$ref: '#/components/schemas/Error'}