Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ and this project adheres to
[#4741](https://github.com/firecracker-microvm/firecracker/pull/4741),
[#4746](https://github.com/firecracker-microvm/firecracker/pull/4746): Added
official support for 6.1 microVM guest kernels.
- [#4763](https://github.com/firecracker-microvm/firecracker/pull/4763): Migrated
API specification from Swagger 2.0 to OpenAPI 3.1.

### Changed

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ Firecracker's overall architecture is described in

Firecracker consists of a single micro Virtual Machine Manager process that
exposes an API endpoint to the host once started. The API is
[specified in OpenAPI format](src/firecracker/swagger/firecracker.yaml). Read
[specified in OpenAPI 3.1 format](src/firecracker/openapi/firecracker.yaml). Read
more about it in the [API docs](docs/api_requests).

The **API endpoint** can be used to:
Expand Down
2 changes: 1 addition & 1 deletion SPECIFICATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ on the following:
they are logged[^2] by the Firecracker process.
1. **API Stability:** The API socket is always available and the API conforms to
the in-tree
[Open API specification](src/firecracker/swagger/firecracker.yaml). API
[Open API specification](src/firecracker/openapi/firecracker.yaml). API
failures are logged in the Firecracker log.
1. **Overhead:** For a Firecracker virtual machine manager running a microVM
with `1 CPUs and 128 MiB of RAM`, and a guest OS with the Firecracker-tuned
Expand Down
12 changes: 6 additions & 6 deletions docs/api-change-runbook.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,19 +143,19 @@ conditions, there are 2 major cases where we need to deprecate an endpoint:
but doing so immediately would be a breaking change.
- We just mark the endpoint as deprecated.

### Keeping Swagger updated
### Keeping OpenAPI specification updated

Make sure that any changes you make in the code are also reflected in the
swagger specification.
OpenAPI specification.

Some tips:

- There is nothing in the swagger file that shows whether an endpoint is
- There is nothing in the OpenAPI file that shows whether an endpoint is
mandatory or optional, it’s all code logic.
- Mandatory fields in a request or response body are marked with
`required: true` in the swagger definition. All other fields are optional.
the `required` array. All other fields are optional.
- If you need to redirect an endpoint, you have to clone the old one under the
new URI in the swagger specification.
new URI in the OpenAPI specification.

### Marking endpoints as deprecated

Expand Down Expand Up @@ -234,7 +234,7 @@ Firecracker API.
deprecation case.
- Add a unit test where you test your new code paths.
- Fix all other failing unit tests.
- Update the swagger file to reflect the change, in this case by removing the
- Update the OpenAPI specification to reflect the change, in this case by removing the
`vsock_id` field from the required parameter list in the `Vsock` definition
and adding a description to it stating that it is deprecated since the
current version.
Expand Down
2 changes: 1 addition & 1 deletion docs/api_requests/actions.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Firecracker microVMs can execute actions that can be triggered via `PUT`
requests on the `/actions` resource.

Details about the required fields can be found in the
[swagger definition](../../src/firecracker/swagger/firecracker.yaml).
[OpenAPI specification](../../src/firecracker/openapi/firecracker.yaml).

## InstanceStart

Expand Down
2 changes: 1 addition & 1 deletion docs/api_requests/patch-network-interface.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Accept: application/json
```

The full specification of the data structures available for this call can be
found in our [OpenAPI spec](../../src/firecracker/swagger/firecracker.yaml).
found in our [OpenAPI spec](../../src/firecracker/openapi/firecracker.yaml).

**Note**: The data provided for the update is merged with the existing data. In
the above example, the RX rate limit is updated, but the TX rate limit remains
Expand Down
12 changes: 6 additions & 6 deletions docs/device-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ BadRequest - HTTP response.

## Input Schema

All input schema fields can be found in the [Swagger](https://swagger.io)
All input schema fields can be found in the [OpenAPI](https://www.openapis.org/)
specification:
[firecracker.yaml](./../src/firecracker/swagger/firecracker.yaml).
[firecracker.yaml](./../src/firecracker/openapi/firecracker.yaml).

| Schema | Property | keyboard | serial console | virtio-block | vhost-user-block | virtio-net | virtio-vsock | virtio-rng |
| ------------------------- | --------------------- | :------: | :------------: | :----------: | :--------------: | :--------: | :----------: | :--------: |
Expand Down Expand Up @@ -108,9 +108,9 @@ virtio-block and virtio-rng devices.

## Output Schema

All output schema fields can be found in the [Swagger](https://swagger.io)
All output schema fields can be found in the [OpenAPI](https://www.openapis.org/)
specification:
[firecracker.yaml](./../src/firecracker/swagger/firecracker.yaml).
[firecracker.yaml](./../src/firecracker/openapi/firecracker.yaml).

| Schema | Property | keyboard | serial console | virtio-block | vhost-user-block | virtio-net | virtio-vsock |
| ---------------------- | ----------------- | :------: | :------------: | :----------: | :--------------: | :--------: | :----------: |
Expand All @@ -133,9 +133,9 @@ If more than 64 devices are configured for a VM in total on aarch64, only first

## Instance Actions

All instance actions can be found in the [Swagger](https://swagger.io)
All instance actions can be found in the [OpenAPI](https://www.openapis.org/)
specification:
[firecracker.yaml](./../src/firecracker/swagger/firecracker.yaml).
[firecracker.yaml](./../src/firecracker/openapi/firecracker.yaml).

| Action | keyboard | serial console | virtio-block | vhost-user-block | virtio-net | virtio-vsock |
| ---------------- | :------: | :------------: | :----------: | :--------------: | :--------: | :----------: |
Expand Down
2 changes: 1 addition & 1 deletion docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ configuration for the guest kernel and rootfs, all of the other resources are
optional. This configuration method will also start the microVM, as such you
need to specify all desired pre-boot configurable resources in the JSON. The
names of the resources can be seen in \[`firecracker.yaml`\]
(../src/firecracker/swagger/firecracker.yaml) and the names of their fields are
(../src/firecracker/openapi/firecracker.yaml) and the names of their fields are
the same that are used in the API requests.

An example of configuration file is provided:
Expand Down
Binary file modified docs/images/api_change_flowchart.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/images/fc_decal_icon-dark_dark-bg.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading