# generateJsonSchema

Audience: Developer

Generates a JSON Schema from an example JSON object (at most 1 MB) with OpenAI.

Generates a JSON Schema from an example JSON object (at most 1 MB) with
OpenAI. Requires ROLE_WRITER on the tenant in X-Pyck-Tenant-Id.

**Served by:** [management](https://docs.pyck.cloud/api/services/management.md)

## Arguments

| Name | Type |
| --- | --- |
| `jsonData` | String! |

## Returns

[GenerateJsonSchemaResponse](https://docs.pyck.cloud/api/types/generatejsonschemaresponse.md)!

## Example

Generates a JSON Schema from an example JSON data object.

```graphql
mutation GenerateJsonSchema($jsonData: String!) {
  generateJsonSchema(jsonData: $jsonData) {
    jsonSchema
  }
}
```

**Variables**

```json
{
  "jsonData": "{\"name\":\"Acme Corp\",\"tier\":3,\"active\":true}"
}
```
