What are the mandatory elements of OpenAPI spec? my assumption is OpenAPI, Info and Path, Is that correct?
Thanks
The minimum required fields in OpenAPI definitions are:
openapi: 3.1.0 or swagger: '2.0'info.titleinfo.versionpaths, components, webhooks. These sections can be empty, e.g. paths: {}.paths – can be empty, i.e. paths: {}Sample minimal definition:
openapi: 3.1.0
info:
title: My API
version: 1.0.0
paths: {}
Technically info.title and info.version can also be empty strings (such as title: ''), although this wouldn't make sense in practice.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With