---
title: "Get OpenAPI settings"
method: GET
path: "/v1/mock-apis/{mockApiId}/settings/openapi"
tags: ["Settings"]
---

# Get OpenAPI settings

`GET /v1/mock-apis/{mockApiId}/settings/openapi`

## Response `200`

The OpenAPI settings

- object
  - `openapi` OpenApiSettings — OpenAPI integration settings for the mock API.
    - `portalEnabled` boolean — Enable or disable the OpenAPI Developer Portal.
    - `portalSecurity` object — Security configuration for the Developer Portal.
      - `type` 'NONE' | 'OIDC', required — The type of security to apply to the Developer Portal.
    - `validationMode` 'none' | 'soft' | 'hard' | 'hard_spec_compliant' — OpenAPI request/response validation mode. See [OpenAPI Validation](/openAPI/openapi-validation) for full detail. A newly created mock API uses `soft`, and updating a mock API's settings without an `openApiSettings` object leaves the mode as `soft`. However, when an `openApiSettings` object is supplied with `validationMode` omitted, the mode is set to `none` — so set it explicitly to avoid unintentionally disabling validation. - `none`: no validation; no effect on the mock API. - `soft`: requests/responses that do not conform to the OpenAPI document are flagged with validation warnings in the request log. - `hard`: as `soft`, and invalid requests additionally receive a generic error response describing the validation issues. - `hard_spec_compliant`: as `hard`, but error responses use the body and `Content-Type` declared in your OpenAPI spec, and carry the raw failures in an `X-WMC-OpenAPI-Validation-Errors` header.
    - `generateOpenApiFromStubs` boolean — Automatically generate an OpenAPI description from stub mappings.
    - `generateStubsFromOpenApi` boolean — Automatically generate stub mappings from the OpenAPI description.
    - `generateDefaultStubs` boolean — Generate default/generic stubs from the OpenAPI description.

## Other responses

- `401` — 401 Unauthenticated response
- `403` — 403 Unauthorized response

---

[API](https://skmtc.net/wiremock/apis/wiremock-cloud.md) · [All operations](https://skmtc.net/wiremock/apis/wiremock-cloud/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/wiremock/wiremock-cloud/revisions/93bebefc672f/schema)
