# OpenAPI / Swagger Integration

FLAT uses the well-known [OpenAPI 2.0 definition](https://swagger.io/docs/specification/2-0/basic-structure/) aka "Swagger" to describe its API. Many developers know this format and have worked with it before, primarily to document their APIs.

This section covers all FLAT features that integrate with Swagger.

By default, FLAT tries to read its API definition from the `swagger.yaml` file in the project's top-level directory. You can configure a different path (or even choose one dynamically) in [`conf/config.xml`](/flat/reference/configuration.md).

FLAT uses [Swagger Extensions](https://swagger.io/docs/specification/2-0/swagger-extensions/) prefixed with the `x-flat-` namespace to [augment](/flat/reference/openapi-2/differences.md#x-flat--extensions) the `swagger.yaml`.

## [Routing](/flat/reference/openapi-4/routing.md)

## [Validation](/flat/reference/openapi-7/validation.md)

## [Security Check](/flat/reference/openapi-5/security.md)

## [Mocking](/flat/reference/openapi-3/mocking.md)

## [CORS](/flat/reference/openapi-1/cors.md)

## [Upstream APIs](/flat/reference/openapi-6/upstream.md)

## [Differences from Swagger](/flat/reference/openapi-2/differences.md)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://sevenval.gitbook.io/flat/reference/openapi.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
