> For the complete documentation index, see [llms.txt](https://help.aikido.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.aikido.dev/docs/docs-ja/dast-sfesu/api-scanning/autogenerate-openapi-via-aikido-ai-code2swagger.md).

# Aikido AI（Code2Swagger）による OpenAPI の自動生成

Aikidoは、コードベースから直接OpenAPI仕様を自動生成できるため、手動でのドキュメント作成が不要になり、正確なAPIスキャンを実現します。

LLMを使用してソースコードを解析し、独自のAPI仕様を作成しなくてもルート、パラメータ、ボディ情報を見つけます。

Aikidoは、OpenAPI仕様を最新に保つため、定期的にコードを再スキャンします。

{% hint style="success" %}
Aikidoは [Zen Firewall](/docs/docs-ja/zen-firewall/getting-started-with-zen-firewall.md) を可能な限り使用することを推奨します。これは、APIへの実際のトラフィックに基づいているため、より正確な結果が得られるからです。
{% endhint %}

### 使い方

次の [REST APIスキャンの設定](/docs/docs-ja/dast-sfesu/api-scanning/rest-api-scanning.md#setting-up-rest-api-scanning) ガイドに従い、 **Aikido AI** オプションを選択してください。

<figure><img src="/files/dff20189421435c853b13432fba5ae42a2cbeb24" alt=""><figcaption></figcaption></figure>

### 対応プログラミング言語

{% hint style="warning" %}
この機能はバックエンドコードの解析のみをサポートしており、フロントエンドコードはサポートしていません。
{% endhint %}

* C
* C++
* C# / .NET
* Dart
* Elixir
* Go
* Java
* JavaScript
* Kotlin
* PHP
* Python
* Ruby
* Rust
* Swift
* Scala
* TypeScript / TSX
* VB.NET（ルート検出のみ）

<br>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://help.aikido.dev/docs/docs-ja/dast-sfesu/api-scanning/autogenerate-openapi-via-aikido-ai-code2swagger.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
