
### delete <a name="delete"></a>
Delete an API Specification and it's associated metadata



**API Endpoint**: `DELETE /api/{api_name}/spec/{api_version}`

#### Example Snippet

```rust
let client = sideko_rest_api::SidekoClient::default()
    .with_api_key_auth(&std::env::var("API_KEY").unwrap())
    .with_cookie_auth(&std::env::var("API_KEY").unwrap());
let res = client
    .api()
    .spec()
    .delete(sideko_rest_api::resources::api::spec::DeleteRequest {
        api_name: "my-project".to_string(),
        api_version: sideko_rest_api::models::ApiVersion::VersionTypeEnum(
            sideko_rest_api::models::VersionTypeEnum::Latest,
        ),
    })
    .await;
```

### list <a name="list"></a>
List specs of a collection



**API Endpoint**: `GET /api/{api_name}/spec`

#### Example Snippet

```rust
let client = sideko_rest_api::SidekoClient::default()
    .with_api_key_auth(&std::env::var("API_KEY").unwrap())
    .with_cookie_auth(&std::env::var("API_KEY").unwrap());
let res = client
    .api()
    .spec()
    .list(sideko_rest_api::resources::api::spec::ListRequest {
        api_name: "my-project".to_string(),
    })
    .await;
```

### get <a name="get"></a>
Get API specification metadata



**API Endpoint**: `GET /api/{api_name}/spec/{api_version}`

#### Example Snippet

```rust
let client = sideko_rest_api::SidekoClient::default()
    .with_api_key_auth(&std::env::var("API_KEY").unwrap())
    .with_cookie_auth(&std::env::var("API_KEY").unwrap());
let res = client
    .api()
    .spec()
    .get(sideko_rest_api::resources::api::spec::GetRequest {
        api_name: "my-project".to_string(),
        api_version: sideko_rest_api::models::ApiVersion::VersionTypeEnum(
            sideko_rest_api::models::VersionTypeEnum::Latest,
        ),
    })
    .await;
```

### get_openapi <a name="get_openapi"></a>
Get OpenAPI specification



**API Endpoint**: `GET /api/{api_name}/spec/{api_version}/openapi`

#### Example Snippet

```rust
let client = sideko_rest_api::SidekoClient::default()
    .with_api_key_auth(&std::env::var("API_KEY").unwrap())
    .with_cookie_auth(&std::env::var("API_KEY").unwrap());
let res = client
    .api()
    .spec()
    .get_openapi(sideko_rest_api::resources::api::spec::GetOpenapiRequest {
        api_name: "my-project".to_string(),
        api_version: sideko_rest_api::models::ApiVersion::VersionTypeEnum(
            sideko_rest_api::models::VersionTypeEnum::Latest,
        ),
    })
    .await;
```

### get_stats <a name="get_stats"></a>
Get Stats about the specification



**API Endpoint**: `GET /api/{api_name}/spec/{api_version}/stats`

#### Example Snippet

```rust
let client = sideko_rest_api::SidekoClient::default()
    .with_api_key_auth(&std::env::var("API_KEY").unwrap())
    .with_cookie_auth(&std::env::var("API_KEY").unwrap());
let res = client
    .api()
    .spec()
    .get_stats(sideko_rest_api::resources::api::spec::GetStatsRequest {
        api_name: "my-project".to_string(),
        api_version: sideko_rest_api::models::ApiVersion::VersionTypeEnum(
            sideko_rest_api::models::VersionTypeEnum::Latest,
        ),
    })
    .await;
```

### patch <a name="patch"></a>
Update an API Specification and/or metadata



**API Endpoint**: `PATCH /api/{api_name}/spec/{api_version}`

#### Example Snippet

```rust
let client = sideko_rest_api::SidekoClient::default()
    .with_api_key_auth(&std::env::var("API_KEY").unwrap())
    .with_cookie_auth(&std::env::var("API_KEY").unwrap());
let res = client
    .api()
    .spec()
    .patch(sideko_rest_api::resources::api::spec::PatchRequest {
        api_name: "my-project".to_string(),
        api_version: sideko_rest_api::models::ApiVersion::VersionTypeEnum(
            sideko_rest_api::models::VersionTypeEnum::Latest,
        ),
        ..Default::default()
    })
    .await;
```

### create <a name="create"></a>
Add a new API specification



**API Endpoint**: `POST /api/{api_name}/spec`

#### Example Snippet

```rust
let client = sideko_rest_api::SidekoClient::default()
    .with_api_key_auth(&std::env::var("API_KEY").unwrap())
    .with_cookie_auth(&std::env::var("API_KEY").unwrap());
let res = client
    .api()
    .spec()
    .create(sideko_rest_api::resources::api::spec::CreateRequest {
        openapi: sideko_rest_api::UploadFile::from_path("uploads/openapi.yaml")
            .unwrap(),
        version: sideko_rest_api::models::VersionOrBump::VersionBumpEnum(
            sideko_rest_api::models::VersionBumpEnum::Major,
        ),
        api_name: "my-project".to_string(),
        ..Default::default()
    })
    .await;
```
