The table below explains the OpenAPI schemas that KRNL currently supports.
To read more about OpenAPI, visit this page:
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 the schema matches with this guide. This is to avoid paying gas fees for registration of the wrong schema.
2. Single API Endpoint
With KRNL's current architecture, Web APIs that can be registered as off-chain kernels must be single API Endpoint.
3. HTTP Request Method
Currently we only support GET and POST as methods for calling off-chain kernels.
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 recommend using OpenAPI version 3.1.x.
Schemata that are 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 check the "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 use the "anyOf" element, the KRNL node can support some specific cases.