The below table explains the OpenAPI schemas that KRNL currently supports.
To read more about OpenAPI, explore the below hyperlink.
Important Notes
1. Using AI Tools
One important note here is that if you are generating OpenAPI Specification by using AI, the schema might be misaligned.
Be careful and make sure that the schema matches with this guide to avoid paying for the gas during registration on the wrong schema.
2. Single API Endpoint
With the current architecture of KRNL, the Web APIs that can be registered as off-chain kernels have to be a single API Endpoint.
3. HTTP Request Method
Currently we do support only GET and POST method for calling off-chain kernels
GET
POST
There are various approaches to constructing and writing OpenAPI schema specifications. While some schemas are compatible with our technology, others may require small modifications.
While OpenAPI 3.0.x might be eligible, we do recommend using OpenAPI version 3.1.x.
The schema that is not defined in this page may not work with our architecture.
Element
Example
Description
null value
This is the only correct way to handle null value on OpenAPI 3.0 Specification.
Other methods might be from the older version.
There is a caveat when working with null value, please checkout anyOf section.
anyOf
Check anyOf section
Some cases are supported
oneOf
Check oneOf section
Some cases are supported
allOf
not supported at the moment
-
Enumeration
Check Enum section
anyOf
Supported Schema
When it comes to the schemas that have "anyOf" element, KRNL node can support some specific cases.