nori/info
Info, Contact, and License types for OpenAPI specifications.
These types provide metadata about the API.
Types
Contact information for the exposed API.
pub type Contact {
Contact(
name: option.Option(String),
url: option.Option(String),
email: option.Option(String),
extensions: dict.Dict(String, json.Json),
)
}
Constructors
-
Contact( name: option.Option(String), url: option.Option(String), email: option.Option(String), extensions: dict.Dict(String, json.Json), )Arguments
- name
-
The name of the contact person/organization.
- url
-
URL pointing to the contact information.
-
Email address of the contact person/organization.
- extensions
-
Extension fields (x-*)
Metadata about the API.
Required fields: title, version
pub type Info {
Info(
title: String,
description: option.Option(String),
terms_of_service: option.Option(String),
contact: option.Option(Contact),
license: option.Option(License),
version: String,
summary: option.Option(String),
extensions: dict.Dict(String, json.Json),
)
}
Constructors
-
Info( title: String, description: option.Option(String), terms_of_service: option.Option(String), contact: option.Option(Contact), license: option.Option(License), version: String, summary: option.Option(String), extensions: dict.Dict(String, json.Json), )Arguments
- title
-
The title of the API.
- description
-
A description of the API. CommonMark syntax may be used.
- terms_of_service
-
A URL to the Terms of Service for the API.
- contact
-
Contact information for the API.
- license
-
License information for the API.
- version
-
The version of the OpenAPI document (distinct from OpenAPI spec version).
- summary
-
A short summary of the API.
- extensions
-
Extension fields (x-*)
License information for the exposed API.
pub type License {
License(
name: String,
identifier: option.Option(String),
url: option.Option(String),
extensions: dict.Dict(String, json.Json),
)
}
Constructors
-
License( name: String, identifier: option.Option(String), url: option.Option(String), extensions: dict.Dict(String, json.Json), )Arguments
- name
-
The license name used for the API.
- identifier
-
An SPDX license identifier for the API.
- url
-
URL to the license used for the API.
- extensions
-
Extension fields (x-*)