Phil Sturgeon
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
      • Invitee
    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Versions and GitHub Sync Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
Invitee
Publish Note

Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

Your note will be visible on your profile and discoverable by anyone.
Your note is now live.
This note is visible on your profile and discoverable online.
Everyone on the web can find and read all notes of this public team.
See published notes
Unpublish note
Please check the box to agree to the Community Guidelines.
View profile
Engagement control
Commenting
Permission
Disabled Forbidden Owners Signed-in users Everyone
Enable
Permission
  • Forbidden
  • Owners
  • Signed-in users
  • Everyone
Suggest edit
Permission
Disabled Forbidden Owners Signed-in users Everyone
Enable
Permission
  • Forbidden
  • Owners
  • Signed-in users
Emoji Reply
Enable
Import from Dropbox Google Drive Gist Clipboard
   owned this note    owned this note      
Published Linked with GitHub
Subscribed
  • Any changes
    Be notified of any changes
  • Mention me
    Be notified of mention me
  • Unsubscribe
Subscribe
# OpenAPI v3.1 Resources for Tooling Developers OpenAPI v3.1.0 has [a bunch of great changes](https://www.openapis.org/blog/2021/02/18/openapi-specification-3-1-released), solving problems like the [subtle differences between JSON Schema objects and OpenAPI Schema objects](https://apisyouwonthate.com/blog/openapi-json-schema-divergence), and adds support for Webhooks. Upgrading tooling can be tricky, but this should be a lot easier than the jump from v2 to v3.0. To reduce the workload we've put together some convenient resources for tooling developers, to provide test cases, examples, and guidance in general. First of all, these articles will show the differences between v3.0 and v3.1 from a user perspective: - [OpenAPI official release notes](https://www.openapis.org/blog/2021/02/18/openapi-specification-3-1-released) - [OpenAPI Blog: Migrating from 3.0 to 3.1](https://www.openapis.org/blog/2021/02/16/migrating-from-openapi-3-0-to-3-1-0) - [Nordic APIs Blog: What's New in OpenAPI v3.1.0](https://nordicapis.com/whats-new-in-openapi-3-1-0/) ## Do you need to support everything? Some of that content is aimed more at end users and what they will need to do, but what do tooling vendors need to do? For new features like webhooks, you can think to yourself: does this tool need to support webhooks? If it's a documentation tool, probably! If the tool is validating incoming web requests to your server, then probably not. Some tools have gone with a definition of 3.1.0 support which is "a 3.1.0 document will work equally well as a 3.0.0 does in the same tool", which is a good first step. Then support for other new keywords can be added later. It's my opinion that getting 3.1.0 documents to _work_ at a basic level is more important than supporting every single feature in 3.1.0. End-users will create feature requests for the bits they're most excited about as you go. ## JSON Schema consolidation For the bulk of the other changes, the difference is that instead of using a schema object that is _very similar_ to JSON Schema, the OpenAPI Schema object is now literally JSON Schema. There's some technicalities involved here and technically OpenAPI Schema has defined it's own JSON Schema vocabulary, which extends the main JSON Schema vocabulary and adds support for `discriminator`. As the usage of `disciminator` in 3.1.0 was clarified to be purely a "hint" or shortcut for an existing oneOf, anyOf, allOf, this can be safely ignored by the vast majority of tooling. tl;dr: you can use any valid JSON Schema tooling to work with the contents of a `schema:` object in OpenAPI, which means a lot of tools can phase out reliance on hand-crafted schema inspection code, and leverage any of the existing [JSON Schema tooling](json-schema.org/implementations.html) instead. For example, if a tool you maintain was manually validating OpenAPI Schemas in JavaScript before, it might be an idea to wrap that in an `if ($version == "3.0")` statement, use that old logic, deprecate it, then if the version is 3.1 you could leverage powerful tools like [AJV](https://github.com/ajv-validator/ajv) or [HyperJump](https://json-schema.hyperjump.io/) to do all the heavy lifting. This immediately benefits your tooling from them doing all the work supporting modern JSON Schema / OAS3.1 keywords for you, like [if/then/else](https://json-schema.org/understanding-json-schema/reference/conditionals.html#if-then-else). It also means they can do the heavy lifting for other changes that come as JSON Schema matures into a stable release (although it would be brilliant if you could help them out a too). ## Test Cases To make sure your tooling works with OpenAPI v3.1, you'll need some OpenAPI v3.1 documents to test against. There is no official list of OpenAPI v3.1 documents around, but there are some example files written by the community which can be used in a test suite to show pass or fail scenarios: - [Mermade OpenAPI v3.1 Examples](https://github.com/Mermade/openapi3-examples/tree/master/3.1) - Extremely minimal examples that hit most of the new functionality. - [Adyen OpenAPI](https://github.com/Adyen/adyen-openapi/tree/main/yaml) - A financial technology platform with real-world OpenAPI v3.1 documents shared publically. ## Validation Schema Many tools use a JSON Schema document that describes valid OpenAPI documents. Yes that is a very meta sentence, but if you know what I mean then you are wondering if there is a new one for OpenAPI v3.1? Good news, there is! - [OpenAPI v3.1 Official Schema](https://github.com/OAI/OpenAPI-Specification/tree/main/schemas/v3.1) ## Find Other v3.1 Tooling To see how other OpenAPI tools are doing take a look at [OpenAPI.Tools](https://openapi.tools). Perhaps there is some other tooling you could leverage, or some developers you could team up with, or ask questions to, or hire to work on your thing too, etc. Don't forget to send a [pull request](https://github.com/apisyouwonthate/openapi.tools/compare) to OpenAPI.Tools to say when you're supporting v3.1, by adding `v3_1: true` to `_data/tools.yml`. You can also pop a `openapi31` tag on GitHub so that other tooling aggregators can find you too!

Import from clipboard

Paste your markdown or webpage here...

Advanced permission required

Your current role can only read. Ask the system administrator to acquire write and comment permission.

This team is disabled

Sorry, this team is disabled. You can't edit this note.

This note is locked

Sorry, only owner can edit this note.

Reach the limit

Sorry, you've reached the max length this note can be.
Please reduce the content or divide it to more notes, thank you!

Import from Gist

Import from Snippet

or

Export to Snippet

Are you sure?

Do you really want to delete this note?
All users will lose their connection.

Create a note from template

Create a note from template

Oops...
This template has been removed or transferred.
Upgrade
All
  • All
  • Team
No template.

Create a template

Upgrade

Delete template

Do you really want to delete this template?
Turn this template into a regular note and keep its content, versions, and comments.

This page need refresh

You have an incompatible client version.
Refresh to update.
New version available!
See releases notes here
Refresh to enjoy new features.
Your user state has changed.
Refresh to load new user state.

Sign in

Forgot password

or

By clicking below, you agree to our terms of service.

Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
Wallet ( )
Connect another wallet

New to HackMD? Sign up

Help

  • English
  • 中文
  • Français
  • Deutsch
  • 日本語
  • Español
  • Català
  • Ελληνικά
  • Português
  • italiano
  • Türkçe
  • Русский
  • Nederlands
  • hrvatski jezik
  • język polski
  • Українська
  • हिन्दी
  • svenska
  • Esperanto
  • dansk

Documents

Help & Tutorial

How to use Book mode

Slide Example

API Docs

Edit in VSCode

Install browser extension

Contacts

Feedback

Discord

Send us email

Resources

Releases

Pricing

Blog

Policy

Terms

Privacy

Cheatsheet

Syntax Example Reference
# Header Header 基本排版
- Unordered List
  • Unordered List
1. Ordered List
  1. Ordered List
- [ ] Todo List
  • Todo List
> Blockquote
Blockquote
**Bold font** Bold font
*Italics font* Italics font
~~Strikethrough~~ Strikethrough
19^th^ 19th
H~2~O H2O
++Inserted text++ Inserted text
==Marked text== Marked text
[link text](https:// "title") Link
![image alt](https:// "title") Image
`Code` Code 在筆記中貼入程式碼
```javascript
var i = 0;
```
var i = 0;
:smile: :smile: Emoji list
{%youtube youtube_id %} Externals
$L^aT_eX$ LaTeX
:::info
This is a alert area.
:::

This is a alert area.

Versions and GitHub Sync
Get Full History Access

  • Edit version name
  • Delete

revision author avatar     named on  

More Less

Note content is identical to the latest version.
Compare
    Choose a version
    No search result
    Version not found
Sign in to link this note to GitHub
Learn more
This note is not linked with GitHub
 

Feedback

Submission failed, please try again

Thanks for your support.

On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

Please give us some advice and help us improve HackMD.

 

Thanks for your feedback

Remove version name

Do you want to remove this version name and description?

Transfer ownership

Transfer to
    Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

      Link with GitHub

      Please authorize HackMD on GitHub
      • Please sign in to GitHub and install the HackMD app on your GitHub repo.
      • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
      Learn more  Sign in to GitHub

      Push the note to GitHub Push to GitHub Pull a file from GitHub

        Authorize again
       

      Choose which file to push to

      Select repo
      Refresh Authorize more repos
      Select branch
      Select file
      Select branch
      Choose version(s) to push
      • Save a new version and push
      • Choose from existing versions
      Include title and tags
      Available push count

      Pull from GitHub

       
      File from GitHub
      File from HackMD

      GitHub Link Settings

      File linked

      Linked by
      File path
      Last synced branch
      Available push count

      Danger Zone

      Unlink
      You will no longer receive notification when GitHub file changes after unlink.

      Syncing

      Push failed

      Push successfully