OpenAPI template
Heim currently supports generating a http-api-application based on a OpenAPI v3.0.3 specification for Rust and C#.
We currently support only a small subset of the specification.
OpenAPI compatibilty in Heim
Section titled “OpenAPI compatibilty in Heim”Supported does not mean functionality.
A property can be allowed to be used in a specification by Heim but the property might be ignored. Supported means its allowed in a specification.
OpenAPI Root Object
Section titled “OpenAPI Root Object”| Field name | Type | Openapi required | Heim required | Supported | Note |
|---|---|---|---|---|---|
| openapi | string | ✅ | ✅ | ✅ | |
| info | Info Object | ✅ | ✅ | ✅ | |
| servers | [Server Object] | ❌ | ❌ | ✅ | |
| paths | Paths Object | ❌ | ✅ | ✅ | Not required by OpenAPI but specification is useless without it. |
| components | Components Object | ❌ | ❌ | ✅ | |
| security | [Security Requirement Object] | ❌ | ❌ | ✅ | |
| tags | [Tag Object] | ❌ | ❌ | ✅ | |
| externalDocs | External Documentation Object | ❌ | ❌ | ✅ |
Info Object
Section titled “Info Object”| Field name | Type | Openapi required | Heim required | Supported | Note |
|---|---|---|---|---|---|
| title | string | ✅ | ✅ | ✅ | |
| description | string | ❌ | ❌ | ✅ | |
| termsOfService | string | ❌ | ❌ | ✅ | |
| contact | Contact Object | ❌ | ❌ | ✅ | |
| license | License Object | ❌ | ❌ | ✅ | |
| version | string | ✅ | ✅ | ✅ |
Contact Object
Section titled “Contact Object”| Field name | Type | Openapi required | Heim required | Supported | Note |
|---|---|---|---|---|---|
| name | string | ❌ | ❌ | ✅ | |
| url | string | ❌ | ❌ | ✅ | |
string | ❌ | ❌ | ✅ |
License Object
Section titled “License Object”| Field name | Type | Openapi required | Heim required | Supported | Note |
|---|---|---|---|---|---|
| name | string | ✅ | ✅ | ✅ | |
| url | string | ❌ | ❌ | ✅ |
Server Object
Section titled “Server Object”| Field name | Type | Openapi required | Heim required | Supported | Note |
|---|---|---|---|---|---|
| url | string | ✅ | ✅ | ✅ | |
| description | string | ❌ | ❌ | ✅ | |
| variables | Map[string, Server Variable Object] | ❌ | ❌ | ✅ |
Server Variable Object
Section titled “Server Variable Object”| Field name | Type | Openapi required | Heim required | Supported | Note |
|---|---|---|---|---|---|
| enum | [string] | ❌ | ❌ | ✅ | |
| default | string | ✅ | ✅ | ✅ | |
| description | string | ❌ | ❌ | ✅ |
Components Object
Section titled “Components Object”| Field name | Type | Openapi required | Heim required | Supported | Note |
|---|---|---|---|---|---|
| schemas | Map[string, Schema Object | Reference Object] | ❌ | ❌ | ✅ | |
| responses | Map[string, Response Object | Reference Object] | ❌ | ❌ | ❌ | |
| parameters | Map[string, Parameter Object | Reference Object] | ❌ | ❌ | ❌ | |
| examples | Map[string, Example Object | Reference Object] | ❌ | ❌ | ✅ | |
| requestBodies | Map[string, Request Body Object | Reference Object] | ❌ | ❌ | ❌ | |
| headers | Map[string, Header Object | Reference Object] | ❌ | ❌ | ❌ | |
| securitySchemes | Map[string, Security Scheme Object | Reference Object] | ❌ | ❌ | ✅ | Currently not implemented |
| links | Map[string, Link Object | Reference Object] | ❌ | ❌ | ✅ | |
| callbacks | Map[string, Callback Object | Reference Object] | ❌ | ❌ | ❌ |
Paths Object
Section titled “Paths Object”| Field name | Type | Openapi required | Heim required | Supported | Note |
|---|---|---|---|---|---|
| /{path} | Path Item Object | ❌ | ✅ | ✅ | A specification used in Heim without a path serves no purpose |
Path Item Object
Section titled “Path Item Object”| Field name | Type | Openapi required | Heim required | Supported | Note |
|---|---|---|---|---|---|
| $ref | string | ❌ | ❌ | ❌ | |
| summary | string | ❌ | ❌ | ✅ | |
| description | string | ❌ | ❌ | ✅ | |
| get | Operation Object | ❌ | ❌ | ✅ | |
| put | Operation Object | ❌ | ❌ | ✅ | |
| post | Operation Object | ❌ | ❌ | ✅ | |
| delete | Operation Object | ❌ | ❌ | ✅ | |
| options | Operation Object | ❌ | ❌ | ✅ | |
| head | Operation Object | ❌ | ❌ | ✅ | |
| patch | Operation Object | ❌ | ❌ | ✅ | |
| trace | Operation Object | ❌ | ❌ | ✅ | |
| servers | [Server Object] | ❌ | ❌ | ✅ | |
| parameters | [Parameter Object | Reference Object] | ❌ | ❌ | ✅ |
Operation Object
Section titled “Operation Object”| Field name | Type | Openapi required | Heim required | Supported | Note |
|---|---|---|---|---|---|
| tags | [string] | ❌ | ❌ | ✅ | |
| summary | string | ❌ | ❌ | ✅ | |
| description | string | ❌ | ❌ | ✅ | |
| externalDocs | External Documentation Object | ❌ | ❌ | ✅ | |
| operationId | string | ❌ | ✅ | ✅ | This property is used to identify your routes |
| parameters | [Parameter Object | Reference Object] | ❌ | ❌ | ✅ | |
| requestBody | Request Body Object | Reference Object | ❌ | ❌ | ✅|❌ | Not supported as $ref |
| responses | Responses Object | ✅ | ✅ | ✅ | |
| callbacks | Map[string, Callback Object | Reference Object] | ❌ | ❌ | ✅ | |
| deprecated | boolean | ❌ | ❌ | ✅ | |
| security | [Security Requirement Object] | ❌ | ❌ | ✅ | |
| servers | [Server Object] | ❌ | ❌ | ✅ |
External Documentation Object
Section titled “External Documentation Object”| Field name | Type | Openapi required | Heim required | Supported | Note |
|---|---|---|---|---|---|
| description | string | ❌ | ❌ | ✅ | |
| url | string | ✅ | ✅ | ✅ |
Parameter Object
Section titled “Parameter Object”| Field name | Type | Openapi required | Heim required | Supported | Note |
|---|---|---|---|---|---|
| name | string | ✅ | ✅ | ✅ | |
| in | string | ✅ | ✅ | ✅|❌ | path is not supported as value |
| description | string | ❌ | ❌ | ✅ | |
| required | boolean | ✅|❌ | ✅ | ✅ | |
| deprecated | boolean | ❌ | ❌ | ✅ | |
| allowEmptyValue | boolean | ❌ | ❌ | ✅ | |
| style | string | ❌ | ❌ | ✅ | |
| explode | boolean | ❌ | ❌ | ✅ | |
| allowReserved | boolean | ❌ | ❌ | ✅ | |
| schema | Schema Object | Reference Object | ✅|❌ | ✅ | ✅|❌ | Does not support types object and array |
| example | Any | ❌ | ❌ | ✅ | |
| examples | Map[string, Example Object | Reference Object] | ❌ | ❌ | ✅ | |
| content | Map[string, Media Type Object] | ✅|❌ | ❌ | ❌ |
Request Body Object
Section titled “Request Body Object”| Field | Type | Openapi required | Heim required | Supported | Note |
|---|---|---|---|---|---|
| description | string | ❌ | ❌ | ✅ | |
| content | Map[string, Media Type Object] | ✅ | ❌ | ✅ | Must be present but allowed to be empty |
| required | boolean | ❌ | ❌ | ✅ |
Media Type Object
Section titled “Media Type Object”| Field | Type | Openapi required | Heim required | Supported | Note |
|---|---|---|---|---|---|
| schema | Schema Object | Reference Object | ❌ | ❌ | ✅ | |
| example | Any | ❌ | ❌ | ✅ | |
| examples | Map[string, Example Object | Reference Object] | ❌ | ❌ | ✅ | |
| encoding | Map[string, Encoding Object] | ❌ | ❌ | ✅ |
Encoding Object
Section titled “Encoding Object”| Field | Type | Openapi required | Heim required | Supported | Note |
|---|---|---|---|---|---|
| contentType | string | ❌ | ❌ | ✅ | |
| headers | Map[string, Header Object | Reference Object] | ❌ | ❌ | ✅ | |
| style | string | ❌ | ❌ | ✅ | |
| explode | boolean | ❌ | ❌ | ✅ | |
| allowReserved | boolean | ❌ | ❌ | ✅ |
Responses Object
Section titled “Responses Object”| Field name | Type | Openapi required | Heim required | Supported | Note |
|---|---|---|---|---|---|
| default | Response Object | Reference Object | ❌ | ❌ | ✅ | |
| HTTP Status Code | Response Object | Reference Object | ❌ | ❌ | ✅|❌ |
Response Object
Section titled “Response Object”| Field name | Type | Openapi required | Heim required | Supported | Note |
|---|---|---|---|---|---|
| description | string | ✅ | ✅ | ✅ | |
| headers | Map[string, Header Object | Reference Object] | ❌ | ❌ | ✅ | |
| content | Map[string, Media Type Object] | ❌ | ❌ | ✅ | |
| links | Map[string, Link Object | Reference Object] | ❌ | ❌ | ✅ |
Callback Object
Section titled “Callback Object”| Field name | Type | Openapi required | Heim required | Supported | Note |
|---|---|---|---|---|---|
| {expression} | Path Item Object | ❌ | ❌ | ✅|❌ | Dynamic keys evaluated at runtime are not supported |
Example Object
Section titled “Example Object”| Field name | Type | Openapi required | Heim required | Supported | Note |
|---|---|---|---|---|---|
| summary | string | ❌ | ❌ | ✅ | |
| description | string | ❌ | ❌ | ✅ | |
| value | Any | ❌ | ❌ | ✅ | |
| externalValue | string | ❌ | ❌ | ✅ |
Link Object
Section titled “Link Object”| Field | Type | Required | Heim required | Supported | Note |
|---|---|---|---|---|---|
| operationRef | string | ❌ | ❌ | ✅ | |
| operationId | string | ❌ | ❌ | ✅ | |
| parameters | Map[string, Any | {expressions}] | ❌ | ❌ | ✅ | |
| requestBody | Any | {expressions} | ❌ | ❌ | ✅ | |
| description | string | ❌ | ❌ | ✅ | |
| server | Server Object | ❌ | ❌ | ✅ |
Header Object
Section titled “Header Object”| Field name | Type | Openapi required | Heim required | Supported | Note |
|---|---|---|---|---|---|
| description | string | ❌ | ❌ | ✅ | |
| required | boolean | ❌ | ❌ | ✅ | |
| deprecated | boolean | ❌ | ❌ | ✅ | |
| allowEmptyValue | boolean | ❌ | ❌ | ✅ | |
| style | string | ❌ | ❌ | ✅ | |
| explode | boolean | ❌ | ❌ | ✅ | |
| allowReserved | boolean | ❌ | ❌ | ✅ | |
| schema | Schema Object | Reference Object | ✅ | ✅ | ✅ | |
| example | Any | ❌ | ❌ | ✅ | |
| examples | Map[string, Example Object | Reference Object] | ❌ | ❌ | ✅ | |
| content | Map[string, Media Type Object] | ❌ | ❌ | ✅|❌ |
Tag Object
Section titled “Tag Object”| Field | Type | Openapi required | Heim required | Supported | Note |
|---|---|---|---|---|---|
| name | string | ✅ | ✅ | ✅ | |
| description | string | ❌ | ❌ | ✅ | |
| externalDocs | External Documentation Object | ❌ | ❌ | ✅ |
Reference Object
Section titled “Reference Object”| Field | Type | Openapi required | Heim required | Supported | Note |
|---|---|---|---|---|---|
| $ref | string | ❌ | ❌ | ✅|❌ |
Schema Object
Section titled “Schema Object”| Field name | Type | Openapi required | Heim required | Supported | Note |
|---|---|---|---|---|---|
| nullable | boolean | ❌ | ❌ | ✅ | |
| discriminator | Discriminator Object | ❌ | ❌ | ✅ | |
| readOnly | boolean | ❌ | ❌ | ✅ | |
| writeOnly | boolean | ❌ | ❌ | ✅ | |
| xml | XML Object | ❌ | ❌ | ✅ | |
| externalDocs | External Documenation Object | ❌ | ❌ | ✅ | |
| example | Any | ❌ | ❌ | ✅ | |
| deprecated | boolean | ❌ | ❌ | ✅ |
- also includes the propertied found in JSON Schema Object
Discriminator Object
Section titled “Discriminator Object”| Field | Type | Openapi required | Heim required | Supported | Note |
|---|---|---|---|---|---|
| propertyName | string | ✅ | ✅ | ✅ | |
| mapping | Map[string, string] | ❌ | ❌ | ✅ |
XML Object
Section titled “XML Object”| Field | Type | Openapi required | Heim required | Supported | Note |
|---|---|---|---|---|---|
| name | string | ❌ | ❌ | ✅ | |
| namespace | string | ❌ | ❌ | ✅ | |
| prefix | string | ❌ | ❌ | ✅ | |
| attribute | boolean | ❌ | ❌ | ✅ | |
| wrapped | boolean | ❌ | ❌ | ✅ |
Security Scheme Object
Section titled “Security Scheme Object”| Field | Type | Openapi required | Heim required | Supported | Note |
|---|---|---|---|---|---|
| type | string | ✅ | ✅ | ✅ | |
| description | string | ❌ | ❌ | ✅ | |
| name | string | ✅|❌ | ✅|❌ | ✅ | |
| in | string | ✅|❌ | ✅|❌ | ✅ | |
| scheme | string | ✅|❌ | ✅|❌ | ✅ | |
| bearerFormat | string | ❌ | ✅ | ✅ | |
| flows | OAuth Flows Object | ✅|❌ | ✅|❌ | ✅ | |
| openIdConnectUrl | string | ✅|❌ | ✅|❌ | ✅ |
OAuth Flows Object
Section titled “OAuth Flows Object”| Field | Type | Openapi required | Heim required | Supported | Note |
|---|---|---|---|---|---|
| implicit | OAuth Flow Object | ❌ | ❌ | ✅ | |
| password | OAuth Flow Object | ❌ | ❌ | ✅ | |
| clientCredentials | OAuth Flow Object | ❌ | ❌ | ✅ | |
| authorizationCode | OAuth Flow Object | ❌ | ❌ | ✅ |
OAuth Flow Object
Section titled “OAuth Flow Object”| Field | Type | Openapi required | Heim required | Supported | Note |
|---|---|---|---|---|---|
| authorizationUrl | string | ✅ | ✅ | ✅ | |
| tokenUrl | string | ✅ | ✅ | ✅ | |
| refreshUrl | string | ❌ | ❌ | ✅ | |
| scopes | Map[string, string] | ✅ | ✅ | ✅ |
Security Requirement Object
Section titled “Security Requirement Object”| Field | Type | Openapi required | Heim required | Supported | Note |
|---|---|---|---|---|---|
| {name} | [string] | ❌ | ❌ | ✅ |
JSON Schema Object
Section titled “JSON Schema Object”| Field name | Type | Openapi required | Heim required | supported | note |
|---|---|---|---|---|---|
| title | string | ❌ | ❌ | ✅ | |
| multipleOf | number | ❌ | ❌ | ✅ | |
| maximum | number | ❌ | ❌ | ✅ | |
| exclusiveMaximum | boolean | ❌ | ❌ | ✅ | |
| minimum | number | ❌ | ❌ | ✅ | |
| exclusiveMinimum | boolean | ❌ | ❌ | ✅ | |
| maxLength | integer | ❌ | ❌ | ✅ | |
| minLength | integer | ❌ | ❌ | ✅ | |
| pattern | string | ❌ | ❌ | ✅ | |
| maxItems | integer | ❌ | ❌ | ✅ | |
| minItems | integer | ❌ | ❌ | ✅ | |
| uniqueItems | boolean | ❌ | ❌ | ✅ | |
| maxProperties | integer | ❌ | ❌ | ✅ | |
| minProperties | integer | ❌ | ❌ | ✅ | |
| required | [string] | ❌ | ❌ | ✅ | |
| enum | [] | ❌ | ❌ | ✅ | |
| type | string | ❌ | ❌ | ✅ | |
| allOf | [Schema Object] | ❌ | ❌ | ❌ | |
| oneOf | [Schema Object] | ❌ | ❌ | ❌ | |
| anyOf | [Schema Object] | ❌ | ❌ | ❌ | |
| not | Schema Object | ❌ | ❌ | ❌ | |
| items | Any | ❌ | ❌ | ✅ | |
| properties | Schema Object | ❌ | ❌ | ✅ | |
| additionalProperties | boolean | Schema Object | ❌ | ❌ | ✅|❌ | |
| description | string | ❌ | ❌ | ✅ | |
| format | Any | ❌ | ❌ | ✅ | |
| default | Any | ❌ | ❌ | ✅ |