# Whitch json schema version should function calling use

**URL:** <https://community.openai.com/t/whitch-json-schema-version-should-function-calling-use/283535>\
**Category:** API\
**Tags:** api\
**Created:** [June 30, 2023, 10:06am UTC](https://community.openai.com/t/whitch-json-schema-version-should-function-calling-use/283535 "2023-06-30T10:06:23Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ziyjingyu](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/ziyjingyu/32/158645_2.png) [@ziyjingyu](https://community.openai.com/u/ziyjingyu)\
**Post date:** [June 30, 2023, 10:06am UTC](https://community.openai.com/t/whitch-json-schema-version-should-function-calling-use/283535/1 "2023-06-30T10:06:23Z")

</div>

I am using jackson-module-jsonSchema to generate JSON schema, but I found that it uses v3 version. It is not the same as the example in OpenAI. For example, for the required field:

```auto
"role": {
    "type": "string",
    "required": true,
    "description": "My description to add in schema"
}

```

In the OpenAI example, the format is at least v4:

```auto
"required":["role"]

```

I found that there are many differences between different versions. Could you please tell me which version is the officially recommended one?

---

<div class="post-metadata">

**Author:** ![kjordan](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/kjordan/32/157616_2.png) [@kjordan](https://community.openai.com/u/kjordan)\
**Post date:** [June 30, 2023, 11:04am UTC](https://community.openai.com/t/whitch-json-schema-version-should-function-calling-use/283535/2 "2023-06-30T11:04:24Z")

</div>

[Understanding JSON Schema — Understanding JSON Schema 2020-12 documentation](https://json-schema.org/understanding-json-schema/) Here’s the official reference link of the schema version, as of 2020-12. You need to check with the maintainer of `jackson-module-jsonSchema` regarding the compatibility.

---

<div class="post-metadata">

**Author:** ![ziyjingyu](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/ziyjingyu/32/158645_2.png) [@ziyjingyu](https://community.openai.com/u/ziyjingyu)\
**Post date:** [June 30, 2023, 11:08am UTC](https://community.openai.com/t/whitch-json-schema-version-should-function-calling-use/283535/3 "2023-06-30T11:08:38Z")

</div>

yes, but i want know which version OpenAI best support.

---

<div class="post-metadata">

**Author:** ![kjordan](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/kjordan/32/157616_2.png) [@kjordan](https://community.openai.com/u/kjordan)\
**Post date:** [June 30, 2023, 11:13am UTC](https://community.openai.com/t/whitch-json-schema-version-should-function-calling-use/283535/4 "2023-06-30T11:13:37Z")

</div>

The `v3` and `v4` are both not official version specification of JSON Schema, you should check with the maintainer of the module.

[Specification Links | JSON Schema](https://json-schema.org/specification-links.html) Here’s the official specification, OpenAI adopts the 2020-12 version, which is annotated as `Draft 8 patch 1`.
