moonrockz/openrpc

Types

ClosedValidation

pub struct ClosedValidation {
  report : ValidationReport
  document : ValidatedDocument?
} derive(@moonbitlang/core/debug.Debug)

Source

ClosedValidation::document

fn ClosedValidation::document(self : ClosedValidation) -> ValidatedDocument?

Source

ClosedValidation::report

fn ClosedValidation::report(self : ClosedValidation) -> ValidationReport

Source

ClosedValidation::to_repr

fn ClosedValidation::to_repr(ClosedValidation) -> @moonbitlang/core/debug.Repr

Source

Components

pub struct Components {
  value : @moonrockz/openrpc/json.Value
  schemas : Array[(@moonrockz/openrpc/domain.ComponentKey, @moonrockz/openrpc/schema.Schema)]?
  content_descriptors : Array[(@moonrockz/openrpc/domain.ComponentKey, ContentDescriptor)]?
  examples : Array[(@moonrockz/openrpc/domain.ComponentKey, Example)]?
  links : Array[(@moonrockz/openrpc/domain.ComponentKey, Link)]?
  errors : Array[(@moonrockz/openrpc/domain.ComponentKey, ErrorObject)]?
  tags : Array[(@moonrockz/openrpc/domain.ComponentKey, Tag)]?
  example_pairings : Array[(@moonrockz/openrpc/domain.ComponentKey, ExamplePairing)]?
  example_pairing_objects : Array[(@moonrockz/openrpc/domain.ComponentKey, ExamplePairing)]?
} derive(@moonbitlang/core/debug.Debug)

Source

Components::additional_fields

fn Components::additional_fields(self : Components) -> Array[(String, @moonrockz/openrpc/json.Value)]

Source

Components::content_descriptors

fn Components::content_descriptors(self : Components) -> Array[(@moonrockz/openrpc/domain.ComponentKey, ContentDescriptor)]?

Source

Components::errors

fn Components::errors(self : Components) -> Array[(@moonrockz/openrpc/domain.ComponentKey, ErrorObject)]?

Source

Components::example_pairing_objects

fn Components::example_pairing_objects(self : Components) -> Array[(@moonrockz/openrpc/domain.ComponentKey, ExamplePairing)]?

Source

Components::example_pairings

fn Components::example_pairings(self : Components) -> Array[(@moonrockz/openrpc/domain.ComponentKey, ExamplePairing)]?

Source

Components::examples

fn Components::examples(self : Components) -> Array[(@moonrockz/openrpc/domain.ComponentKey, Example)]?

Source

Components::extensions

fn Components::extensions(self : Components) -> @moonrockz/openrpc/domain.Extensions

Source

Components::from_json

fn Components::from_json(value : @moonrockz/openrpc/json.Value, limits? : @moonrockz/openrpc/json.Limits) -> Result[Components, @moonrockz/openrpc/json.Diagnostic]

Source

fn Components::links(self : Components) -> Array[(@moonrockz/openrpc/domain.ComponentKey, Link)]?

Source

Components::new

fn Components::new(schemas? : Array[(@moonrockz/openrpc/domain.ComponentKey, @moonrockz/openrpc/schema.Schema)]?, content_descriptors? : Array[(@moonrockz/openrpc/domain.ComponentKey, ContentDescriptor)]?, examples? : Array[(@moonrockz/openrpc/domain.ComponentKey, Example)]?, links? : Array[(@moonrockz/openrpc/domain.ComponentKey, Link)]?, errors? : Array[(@moonrockz/openrpc/domain.ComponentKey, ErrorObject)]?, tags? : Array[(@moonrockz/openrpc/domain.ComponentKey, Tag)]?, example_pairings? : Array[(@moonrockz/openrpc/domain.ComponentKey, ExamplePairing)]?, example_pairing_objects? : Array[(@moonrockz/openrpc/domain.ComponentKey, ExamplePairing)]?, extensions? : @moonrockz/openrpc/domain.Extensions, additional_fields? : Array[(String, @moonrockz/openrpc/json.Value)], limits? : @moonrockz/openrpc/json.Limits) -> Result[Components, @moonrockz/openrpc/json.Diagnostic]

Source

Components::schemas

fn Components::schemas(self : Components) -> Array[(@moonrockz/openrpc/domain.ComponentKey, @moonrockz/openrpc/schema.Schema)]?

Source

Components::tags

fn Components::tags(self : Components) -> Array[(@moonrockz/openrpc/domain.ComponentKey, Tag)]?

Source

Components::to_json

fn Components::to_json(self : Components) -> @moonrockz/openrpc/json.Value

Source

Components::to_repr

fn Components::to_repr(Components) -> @moonbitlang/core/debug.Repr

Source

Contact

pub struct Contact {
  value : @moonrockz/openrpc/json.Value
} derive(@moonbitlang/core/debug.Debug)

Source

Contact::additional_fields

fn Contact::additional_fields(self : Contact) -> Array[(String, @moonrockz/openrpc/json.Value)]

Source

Contact::email

fn Contact::email(self : Contact) -> String?

Source

Contact::extensions

fn Contact::extensions(self : Contact) -> @moonrockz/openrpc/domain.Extensions

Source

Contact::from_json

fn Contact::from_json(value : @moonrockz/openrpc/json.Value, limits? : @moonrockz/openrpc/json.Limits) -> Result[Contact, @moonrockz/openrpc/json.Diagnostic]

Source

Contact::name

fn Contact::name(self : Contact) -> String?

Source

Contact::new

fn Contact::new(name? : String?, url? : @moonrockz/openrpc/reference.UriReference?, email? : String?, extensions? : @moonrockz/openrpc/domain.Extensions, additional_fields? : Array[(String, @moonrockz/openrpc/json.Value)], limits? : @moonrockz/openrpc/json.Limits) -> Result[Contact, @moonrockz/openrpc/json.Diagnostic]

Source

Contact::to_json

fn Contact::to_json(self : Contact) -> @moonrockz/openrpc/json.Value

Source

Contact::to_repr

fn Contact::to_repr(Contact) -> @moonbitlang/core/debug.Repr

Source

Contact::url

fn Contact::url(self : Contact) -> @moonrockz/openrpc/reference.UriReference?

Source

ContentDescriptor

pub struct ContentDescriptor {
  name : String
  schema : @moonrockz/openrpc/schema.Schema
  required : Bool?
  value : @moonrockz/openrpc/json.Value
} derive(@moonbitlang/core/debug.Debug)

Source

ContentDescriptor::additional_fields

fn ContentDescriptor::additional_fields(self : ContentDescriptor) -> Array[(String, @moonrockz/openrpc/json.Value)]

Source

ContentDescriptor::deprecated

fn ContentDescriptor::deprecated(self : ContentDescriptor) -> Bool?

Source

ContentDescriptor::description

fn ContentDescriptor::description(self : ContentDescriptor) -> String?

Source

ContentDescriptor::extensions

fn ContentDescriptor::extensions(self : ContentDescriptor) -> @moonrockz/openrpc/domain.Extensions

Source

ContentDescriptor::from_json

fn ContentDescriptor::from_json(value : @moonrockz/openrpc/json.Value, limits? : @moonrockz/openrpc/json.Limits) -> Result[ContentDescriptor, @moonrockz/openrpc/json.Diagnostic]

Source

ContentDescriptor::name

fn ContentDescriptor::name(self : ContentDescriptor) -> String

Source

ContentDescriptor::new

fn ContentDescriptor::new(name : String, schema : @moonrockz/openrpc/schema.Schema, summary? : String?, description? : String?, required? : Bool?, deprecated? : Bool?, extensions? : @moonrockz/openrpc/domain.Extensions, additional_fields? : Array[(String, @moonrockz/openrpc/json.Value)], limits? : @moonrockz/openrpc/json.Limits) -> Result[ContentDescriptor, @moonrockz/openrpc/json.Diagnostic]

Source

ContentDescriptor::required

fn ContentDescriptor::required(self : ContentDescriptor) -> Bool?

Source

ContentDescriptor::schema

fn ContentDescriptor::schema(self : ContentDescriptor) -> @moonrockz/openrpc/schema.Schema

Source

ContentDescriptor::summary

fn ContentDescriptor::summary(self : ContentDescriptor) -> String?

Source

ContentDescriptor::to_json

fn ContentDescriptor::to_json(self : ContentDescriptor) -> @moonrockz/openrpc/json.Value

Source

ContentDescriptor::to_repr

fn ContentDescriptor::to_repr(ContentDescriptor) -> @moonbitlang/core/debug.Repr

Source

Coverage

pub(all) enum Coverage {
  Passed
  Failed
  Incomplete
} derive(Eq, @moonbitlang/core/debug.Debug)

Source

Coverage::equal

fn Coverage::equal(Coverage, Coverage) -> Bool

Source

Coverage::not_equal

fn Coverage::not_equal(x : Coverage, y : Coverage) -> Bool

Source

Coverage::to_repr

fn Coverage::to_repr(Coverage) -> @moonbitlang/core/debug.Repr

Source

Discrepancy

pub(all) enum Discrepancy {
  OptionalParameterBeforeRequired
  ServerNameOmitted
  LicenseNameOmitted
} derive(Eq, @moonbitlang/core/debug.Debug)

A recorded disagreement between pinned prose and the pinned metaschema. Only these normative errors become warnings under MetaschemaCompatibility.

Source

Discrepancy::equal

fn Discrepancy::equal(Discrepancy, Discrepancy) -> Bool

Source

Discrepancy::not_equal

fn Discrepancy::not_equal(x : Discrepancy, y : Discrepancy) -> Bool

Source

Discrepancy::to_repr

fn Discrepancy::to_repr(Discrepancy) -> @moonbitlang/core/debug.Repr

Source

Document

pub struct Document {
  version : DocumentVersion
  info : Info
  methods : Array[InlineOrReference[Method]]
  value : @moonrockz/openrpc/json.Value
  schema_uri : @moonrockz/openrpc/reference.UriReference?
  servers : Array[Server]?
  components : Components?
  external_docs : ExternalDocumentation?
} derive(@moonbitlang/core/debug.Debug)

Source

Document::additional_fields

fn Document::additional_fields(self : Document) -> Array[(String, @moonrockz/openrpc/json.Value)]

Source

Document::as_resource

fn Document::as_resource(self : Document, uri : @moonrockz/openrpc/reference.UriReference, aliases? : Array[@moonrockz/openrpc/reference.UriReference], limits? : @moonrockz/openrpc/json.Limits) -> Result[@moonrockz/openrpc/reference.Resource, @moonrockz/openrpc/json.Diagnostic]

The document as an explicit resource whose schema roots are every schema position in its typed model. Other values stay opaque.

Source

Document::components

fn Document::components(self : Document) -> Components?

Source

Document::extensions

fn Document::extensions(self : Document) -> @moonrockz/openrpc/domain.Extensions

Source

Document::external_docs

fn Document::external_docs(self : Document) -> ExternalDocumentation?

Source

Document::from_json

fn Document::from_json(value : @moonrockz/openrpc/json.Value, limits? : @moonrockz/openrpc/json.Limits) -> Result[Document, Array[@moonrockz/openrpc/json.Diagnostic]]

Source

Document::info

fn Document::info(self : Document) -> Info

Source

Document::methods

fn Document::methods(self : Document) -> Array[InlineOrReference[Method]]

Source

Document::new

fn Document::new(version : DocumentVersion, info : Info, methods : Array[InlineOrReference[Method]], schema? : @moonrockz/openrpc/reference.UriReference?, servers? : Array[Server]?, components? : Components?, external_docs? : ExternalDocumentation?, extensions? : @moonrockz/openrpc/domain.Extensions, additional_fields? : Array[(String, @moonrockz/openrpc/json.Value)], limits? : @moonrockz/openrpc/json.Limits) -> Result[Document, Array[@moonrockz/openrpc/json.Diagnostic]]

Source

Document::schema

fn Document::schema(self : Document) -> @moonrockz/openrpc/reference.UriReference?

Source

Document::servers

fn Document::servers(self : Document) -> Array[Server]?

Source

Document::to_json

fn Document::to_json(self : Document) -> @moonrockz/openrpc/json.Value

Source

Document::to_repr

fn Document::to_repr(Document) -> @moonbitlang/core/debug.Repr

Source

Document::version

fn Document::version(self : Document) -> DocumentVersion

Source

DocumentVersion

pub struct DocumentVersion {
  text : String
} derive(Eq, @moonbitlang/core/debug.Debug)

Source

DocumentVersion::equal

fn DocumentVersion::equal(DocumentVersion, DocumentVersion) -> Bool

Source

DocumentVersion::not_equal

fn DocumentVersion::not_equal(x : DocumentVersion, y : DocumentVersion) -> Bool

Source

DocumentVersion::parse

fn DocumentVersion::parse(text : String) -> Result[DocumentVersion, @moonrockz/openrpc/json.Diagnostic]

Source

DocumentVersion::to_repr

fn DocumentVersion::to_repr(DocumentVersion) -> @moonbitlang/core/debug.Repr

Source

DocumentVersion::to_string

fn DocumentVersion::to_string(self : DocumentVersion) -> String

Source

ErrorObject

pub struct ErrorObject {
  value : @moonrockz/openrpc/json.Value
} derive(@moonbitlang/core/debug.Debug)

Source

ErrorObject::additional_fields

fn ErrorObject::additional_fields(self : ErrorObject) -> Array[(String, @moonrockz/openrpc/json.Value)]

Source

ErrorObject::code

fn ErrorObject::code(self : ErrorObject) -> @moonrockz/openrpc/domain.ErrorCode

Source

ErrorObject::data

fn ErrorObject::data(self : ErrorObject) -> @moonrockz/openrpc/json.Value?

Source

ErrorObject::extensions

fn ErrorObject::extensions(self : ErrorObject) -> @moonrockz/openrpc/domain.Extensions

Source

ErrorObject::from_json

fn ErrorObject::from_json(value : @moonrockz/openrpc/json.Value, limits? : @moonrockz/openrpc/json.Limits) -> Result[ErrorObject, @moonrockz/openrpc/json.Diagnostic]

Source

ErrorObject::message

fn ErrorObject::message(self : ErrorObject) -> String

Source

ErrorObject::new

fn ErrorObject::new(code : @moonrockz/openrpc/domain.ErrorCode, message : String, data? : @moonrockz/openrpc/json.Value?, extensions? : @moonrockz/openrpc/domain.Extensions, additional_fields? : Array[(String, @moonrockz/openrpc/json.Value)], limits? : @moonrockz/openrpc/json.Limits) -> Result[ErrorObject, @moonrockz/openrpc/json.Diagnostic]

Source

ErrorObject::to_json

fn ErrorObject::to_json(self : ErrorObject) -> @moonrockz/openrpc/json.Value

Source

ErrorObject::to_repr

fn ErrorObject::to_repr(ErrorObject) -> @moonbitlang/core/debug.Repr

Source

Example

pub struct Example {
  value : @moonrockz/openrpc/json.Value
} derive(@moonbitlang/core/debug.Debug)

Source

Example::additional_fields

fn Example::additional_fields(self : Example) -> Array[(String, @moonrockz/openrpc/json.Value)]

Source

Example::description

fn Example::description(self : Example) -> String?

Source

Example::extensions

fn Example::extensions(self : Example) -> @moonrockz/openrpc/domain.Extensions

Source

Example::from_json

fn Example::from_json(value : @moonrockz/openrpc/json.Value, limits? : @moonrockz/openrpc/json.Limits) -> Result[Example, @moonrockz/openrpc/json.Diagnostic]

Source

Example::name

fn Example::name(self : Example) -> String?

Source

Example::new

fn Example::new(payload : ExampleValue, name? : String?, summary? : String?, description? : String?, extensions? : @moonrockz/openrpc/domain.Extensions, additional_fields? : Array[(String, @moonrockz/openrpc/json.Value)], limits? : @moonrockz/openrpc/json.Limits) -> Result[Example, @moonrockz/openrpc/json.Diagnostic]

Source

Example::payload

fn Example::payload(self : Example) -> ExampleValue

Source

Example::summary

fn Example::summary(self : Example) -> String?

Source

Example::to_json

fn Example::to_json(self : Example) -> @moonrockz/openrpc/json.Value

Source

Example::to_repr

fn Example::to_repr(Example) -> @moonbitlang/core/debug.Repr

Source

ExamplePairing

pub struct ExamplePairing {
  value : @moonrockz/openrpc/json.Value
} derive(@moonbitlang/core/debug.Debug)

Source

ExamplePairing::additional_fields

fn ExamplePairing::additional_fields(self : ExamplePairing) -> Array[(String, @moonrockz/openrpc/json.Value)]

Source

ExamplePairing::description

fn ExamplePairing::description(self : ExamplePairing) -> String?

Source

ExamplePairing::extensions

fn ExamplePairing::extensions(self : ExamplePairing) -> @moonrockz/openrpc/domain.Extensions

Source

ExamplePairing::from_json

fn ExamplePairing::from_json(value : @moonrockz/openrpc/json.Value, limits? : @moonrockz/openrpc/json.Limits) -> Result[ExamplePairing, @moonrockz/openrpc/json.Diagnostic]

Source

ExamplePairing::name

fn ExamplePairing::name(self : ExamplePairing) -> String

Source

ExamplePairing::new

fn ExamplePairing::new(name : String, params : Array[InlineOrReference[Example]], summary? : String?, description? : String?, result? : InlineOrReference[Example]?, extensions? : @moonrockz/openrpc/domain.Extensions, additional_fields? : Array[(String, @moonrockz/openrpc/json.Value)], limits? : @moonrockz/openrpc/json.Limits) -> Result[ExamplePairing, @moonrockz/openrpc/json.Diagnostic]

Source

ExamplePairing::params

fn ExamplePairing::params(self : ExamplePairing) -> Array[InlineOrReference[Example]]

Source

ExamplePairing::result

fn ExamplePairing::result(self : ExamplePairing) -> InlineOrReference[Example]?

Source

ExamplePairing::summary

fn ExamplePairing::summary(self : ExamplePairing) -> String?

Source

ExamplePairing::to_json

fn ExamplePairing::to_json(self : ExamplePairing) -> @moonrockz/openrpc/json.Value

Source

ExamplePairing::to_repr

fn ExamplePairing::to_repr(ExamplePairing) -> @moonbitlang/core/debug.Repr

Source

ExampleValue

pub(all) enum ExampleValue {
  NoExampleValue
  LiteralExample(@moonrockz/openrpc/json.Value)
  ExternalExample(@moonrockz/openrpc/reference.UriReference)
} derive(@moonbitlang/core/debug.Debug)

Source

ExampleValue::to_repr

fn ExampleValue::to_repr(ExampleValue) -> @moonbitlang/core/debug.Repr

Source

ExternalDocumentation

pub struct ExternalDocumentation {
  value : @moonrockz/openrpc/json.Value
} derive(@moonbitlang/core/debug.Debug)

Source

ExternalDocumentation::additional_fields

fn ExternalDocumentation::additional_fields(self : ExternalDocumentation) -> Array[(String, @moonrockz/openrpc/json.Value)]

Source

ExternalDocumentation::description

fn ExternalDocumentation::description(self : ExternalDocumentation) -> String?

Source

ExternalDocumentation::extensions

fn ExternalDocumentation::extensions(self : ExternalDocumentation) -> @moonrockz/openrpc/domain.Extensions

Source

ExternalDocumentation::from_json

fn ExternalDocumentation::from_json(value : @moonrockz/openrpc/json.Value, limits? : @moonrockz/openrpc/json.Limits) -> Result[ExternalDocumentation, @moonrockz/openrpc/json.Diagnostic]

Source

ExternalDocumentation::new

fn ExternalDocumentation::new(url : @moonrockz/openrpc/reference.UriReference, description? : String?, extensions? : @moonrockz/openrpc/domain.Extensions, additional_fields? : Array[(String, @moonrockz/openrpc/json.Value)], limits? : @moonrockz/openrpc/json.Limits) -> Result[ExternalDocumentation, @moonrockz/openrpc/json.Diagnostic]

Source

ExternalDocumentation::to_json

fn ExternalDocumentation::to_json(self : ExternalDocumentation) -> @moonrockz/openrpc/json.Value

Source

ExternalDocumentation::to_repr

fn ExternalDocumentation::to_repr(ExternalDocumentation) -> @moonbitlang/core/debug.Repr

Source

ExternalDocumentation::url

fn ExternalDocumentation::url(self : ExternalDocumentation) -> @moonrockz/openrpc/reference.UriReference

Source

Finding

pub struct Finding {
  diagnostic : @moonrockz/openrpc/json.Diagnostic
  severity : Severity
  phase : Phase
  // private fields
} derive(@moonbitlang/core/debug.Debug)

Source

Finding::chain

fn Finding::chain(self : Finding) -> Array[FindingLocation]

OpenRPC $ref sites followed, in order, to reach the location.

Source

Finding::diagnostic

fn Finding::diagnostic(self : Finding) -> @moonrockz/openrpc/json.Diagnostic

Source

Finding::discrepancy

fn Finding::discrepancy(self : Finding) -> Discrepancy?

The recorded prose/artifact discrepancy this normative finding belongs to.

Source

Finding::expected_field

fn Finding::expected_field(self : Finding) -> String?

The missing member's name when the location is its parent object.

Source

Finding::location

fn Finding::location(self : Finding) -> FindingLocation

Source

Finding::phase

fn Finding::phase(self : Finding) -> Phase

Source

Finding::profile

fn Finding::profile(self : Finding) -> ValidationProfile

Source

Finding::related

fn Finding::related(self : Finding) -> Array[FindingLocation]

Other occurrences involved, such as the first of two duplicates.

Source

Finding::severity

fn Finding::severity(self : Finding) -> Severity

Source

Finding::to_repr

fn Finding::to_repr(Finding) -> @moonbitlang/core/debug.Repr

Source

Finding::version

fn Finding::version(self : Finding) -> DocumentVersion

Source

FindingLocation

pub struct FindingLocation {
  // private fields
} derive(@moonbitlang/core/debug.Debug)

Where a finding applies. resource is None for the unnamed input document. Spans exist only for the input document, and only when its source map was supplied.

Source

FindingLocation::path

fn FindingLocation::path(self : FindingLocation) -> Array[String]

Source

FindingLocation::resource

fn FindingLocation::resource(self : FindingLocation) -> @moonrockz/openrpc/reference.UriReference?

Source

FindingLocation::source_id

fn FindingLocation::source_id(self : FindingLocation) -> String?

Source

FindingLocation::span

fn FindingLocation::span(self : FindingLocation) -> @moonrockz/openrpc/json.Span?

Source

FindingLocation::to_repr

fn FindingLocation::to_repr(FindingLocation) -> @moonbitlang/core/debug.Repr

Source

Info

pub struct Info {
  title : String
  version : String
  value : @moonrockz/openrpc/json.Value
} derive(@moonbitlang/core/debug.Debug)

Source

Info::additional_fields

fn Info::additional_fields(self : Info) -> Array[(String, @moonrockz/openrpc/json.Value)]

Source

Info::contact

fn Info::contact(self : Info) -> Contact?

Source

Info::description

fn Info::description(self : Info) -> String?

Source

Info::extensions

fn Info::extensions(self : Info) -> @moonrockz/openrpc/domain.Extensions

Source

Info::from_json

fn Info::from_json(value : @moonrockz/openrpc/json.Value, limits? : @moonrockz/openrpc/json.Limits) -> Result[Info, @moonrockz/openrpc/json.Diagnostic]

Source

Info::license

fn Info::license(self : Info) -> License?

Source

Info::new

fn Info::new(title : String, version : String, description? : String?, terms_of_service? : @moonrockz/openrpc/reference.UriReference?, contact? : Contact?, license? : License?, extensions? : @moonrockz/openrpc/domain.Extensions, additional_fields? : Array[(String, @moonrockz/openrpc/json.Value)], limits? : @moonrockz/openrpc/json.Limits) -> Result[Info, @moonrockz/openrpc/json.Diagnostic]

Source

Info::terms_of_service

fn Info::terms_of_service(self : Info) -> @moonrockz/openrpc/reference.UriReference?

Source

Info::title

fn Info::title(self : Info) -> String

Source

Info::to_json

fn Info::to_json(self : Info) -> @moonrockz/openrpc/json.Value

Source

Info::to_repr

fn Info::to_repr(Info) -> @moonbitlang/core/debug.Repr

Source

Info::version

fn Info::version(self : Info) -> String

Source

InlineOrReference

pub(all) enum InlineOrReference[T] {
  Inline(T)
  Reference(@moonrockz/openrpc/reference.Reference)
} derive(@moonbitlang/core/debug.Debug)

Source

InlineOrReference::to_repr

fn[T : @moonbitlang/core/debug.Debug] InlineOrReference::to_repr(InlineOrReference[T]) -> @moonbitlang/core/debug.Repr

Source

License

pub struct License {
  value : @moonrockz/openrpc/json.Value
} derive(@moonbitlang/core/debug.Debug)

Source

License::additional_fields

fn License::additional_fields(self : License) -> Array[(String, @moonrockz/openrpc/json.Value)]

Source

License::extensions

fn License::extensions(self : License) -> @moonrockz/openrpc/domain.Extensions

Source

License::from_json

fn License::from_json(value : @moonrockz/openrpc/json.Value, limits? : @moonrockz/openrpc/json.Limits) -> Result[License, @moonrockz/openrpc/json.Diagnostic]

Source

License::name

fn License::name(self : License) -> String?

Source

License::new

fn License::new(name? : String?, url? : @moonrockz/openrpc/reference.UriReference?, extensions? : @moonrockz/openrpc/domain.Extensions, additional_fields? : Array[(String, @moonrockz/openrpc/json.Value)], limits? : @moonrockz/openrpc/json.Limits) -> Result[License, @moonrockz/openrpc/json.Diagnostic]

Source

License::to_json

fn License::to_json(self : License) -> @moonrockz/openrpc/json.Value

Source

License::to_repr

fn License::to_repr(License) -> @moonbitlang/core/debug.Repr

Source

License::url

fn License::url(self : License) -> @moonrockz/openrpc/reference.UriReference?

Source

pub struct Link {
  value : @moonrockz/openrpc/json.Value
} derive(@moonbitlang/core/debug.Debug)

Source

Link::additional_fields

fn Link::additional_fields(self : Link) -> Array[(String, @moonrockz/openrpc/json.Value)]

Source

Link::description

fn Link::description(self : Link) -> String?

Source

Link::extensions

fn Link::extensions(self : Link) -> @moonrockz/openrpc/domain.Extensions

Source

Link::from_json

fn Link::from_json(value : @moonrockz/openrpc/json.Value, limits? : @moonrockz/openrpc/json.Limits) -> Result[Link, @moonrockz/openrpc/json.Diagnostic]

Source

Link::name

fn Link::name(self : Link) -> String?

Source

Link::new

fn Link::new(name? : String?, summary? : String?, description? : String?, target_method? : MethodName?, params? : Array[(String, @moonrockz/openrpc/json.Value)]?, server? : Server?, extensions? : @moonrockz/openrpc/domain.Extensions, additional_fields? : Array[(String, @moonrockz/openrpc/json.Value)], limits? : @moonrockz/openrpc/json.Limits) -> Result[Link, @moonrockz/openrpc/json.Diagnostic]

Source

Link::params

fn Link::params(self : Link) -> Array[(String, @moonrockz/openrpc/json.Value)]?

Source

Link::server

fn Link::server(self : Link) -> Server?

Source

Link::summary

fn Link::summary(self : Link) -> String?

Source

Link::target_method

fn Link::target_method(self : Link) -> MethodName?

Source

Link::to_json

fn Link::to_json(self : Link) -> @moonrockz/openrpc/json.Value

Source

Link::to_repr

fn Link::to_repr(Link) -> @moonbitlang/core/debug.Repr

Source

Method

pub struct Method {
  name : MethodName
  params : Array[InlineOrReference[ContentDescriptor]]
  result : InlineOrReference[ContentDescriptor]?
  param_structure : ParamStructure?
  value : @moonrockz/openrpc/json.Value
} derive(@moonbitlang/core/debug.Debug)

Source

Method::additional_fields

fn Method::additional_fields(self : Method) -> Array[(String, @moonrockz/openrpc/json.Value)]

Source

Method::deprecated

fn Method::deprecated(self : Method) -> Bool?

Source

Method::description

fn Method::description(self : Method) -> String?

Source

Method::errors

fn Method::errors(self : Method) -> Array[InlineOrReference[ErrorObject]]?

Source

Method::examples

fn Method::examples(self : Method) -> Array[InlineOrReference[ExamplePairing]]?

Source

Method::extensions

fn Method::extensions(self : Method) -> @moonrockz/openrpc/domain.Extensions

Source

Method::external_docs

fn Method::external_docs(self : Method) -> ExternalDocumentation?

Source

Method::from_json

fn Method::from_json(value : @moonrockz/openrpc/json.Value, limits? : @moonrockz/openrpc/json.Limits) -> Result[Method, @moonrockz/openrpc/json.Diagnostic]

Source

fn Method::links(self : Method) -> Array[InlineOrReference[Link]]?

Source

Method::name

fn Method::name(self : Method) -> MethodName

Source

Method::new

fn Method::new(name : MethodName, params : Array[InlineOrReference[ContentDescriptor]], result? : InlineOrReference[ContentDescriptor]?, tags? : Array[InlineOrReference[Tag]]?, summary? : String?, description? : String?, external_docs? : ExternalDocumentation?, deprecated? : Bool?, servers? : Array[Server]?, errors? : Array[InlineOrReference[ErrorObject]]?, links? : Array[InlineOrReference[Link]]?, param_structure? : ParamStructure?, examples? : Array[InlineOrReference[ExamplePairing]]?, extensions? : @moonrockz/openrpc/domain.Extensions, additional_fields? : Array[(String, @moonrockz/openrpc/json.Value)], limits? : @moonrockz/openrpc/json.Limits) -> Result[Method, @moonrockz/openrpc/json.Diagnostic]

Source

Method::param_structure

fn Method::param_structure(self : Method) -> ParamStructure?

Source

Method::params

fn Method::params(self : Method) -> Array[InlineOrReference[ContentDescriptor]]

Source

Method::result

fn Method::result(self : Method) -> InlineOrReference[ContentDescriptor]?

Source

Method::servers

fn Method::servers(self : Method) -> Array[Server]?

Source

Method::summary

fn Method::summary(self : Method) -> String?

Source

Method::tags

fn Method::tags(self : Method) -> Array[InlineOrReference[Tag]]?

Source

Method::to_json

fn Method::to_json(self : Method) -> @moonrockz/openrpc/json.Value

Source

Method::to_repr

fn Method::to_repr(Method) -> @moonbitlang/core/debug.Repr

Source

MethodName

pub struct MethodName {
  text : String
} derive(Eq, @moonbitlang/core/debug.Debug)

Source

MethodName::equal

fn MethodName::equal(MethodName, MethodName) -> Bool

Source

MethodName::not_equal

fn MethodName::not_equal(x : MethodName, y : MethodName) -> Bool

Source

MethodName::parse

fn MethodName::parse(text : String) -> Result[MethodName, @moonrockz/openrpc/json.Diagnostic]

Source

MethodName::to_repr

fn MethodName::to_repr(MethodName) -> @moonbitlang/core/debug.Repr

Source

MethodName::to_string

fn MethodName::to_string(self : MethodName) -> String

Source

ObjectKind

pub(all) enum ObjectKind {
  DocumentObject
  InfoObject
  ContactObject
  LicenseObject
  ExternalDocumentationObject
  ServerVariableObject
  ServerObject
  MethodObject
  ContentDescriptorObject
  TagObject
  ErrorObjectKind
  ExampleObject
  ExamplePairingObject
  LinkObject
  ComponentsObject
  ReferenceObject
} derive(Eq, @moonbitlang/core/debug.Debug)

Source

ObjectKind::equal

fn ObjectKind::equal(ObjectKind, ObjectKind) -> Bool

Source

ObjectKind::name

fn ObjectKind::name(self : ObjectKind) -> String

Source

ObjectKind::not_equal

fn ObjectKind::not_equal(x : ObjectKind, y : ObjectKind) -> Bool

Source

ObjectKind::to_repr

fn ObjectKind::to_repr(ObjectKind) -> @moonbitlang/core/debug.Repr

Source

ParamStructure

pub(all) enum ParamStructure {
  ByName
  ByPosition
  Either
} derive(Eq, @moonbitlang/core/debug.Debug)

Source

ParamStructure::equal

fn ParamStructure::equal(ParamStructure, ParamStructure) -> Bool

Source

ParamStructure::not_equal

fn ParamStructure::not_equal(x : ParamStructure, y : ParamStructure) -> Bool

Source

ParamStructure::to_repr

fn ParamStructure::to_repr(ParamStructure) -> @moonbitlang/core/debug.Repr

Source

ParamStructure::to_string

fn ParamStructure::to_string(self : ParamStructure) -> String

Source

Phase

pub(all) enum Phase {
  Model
  SchemaDocument
  References
  Normative
  Artifact
} derive(Eq, @moonbitlang/core/debug.Debug)

Source

Phase::equal

fn Phase::equal(Phase, Phase) -> Bool

Source

Phase::not_equal

fn Phase::not_equal(x : Phase, y : Phase) -> Bool

Source

Phase::to_repr

fn Phase::to_repr(Phase) -> @moonbitlang/core/debug.Repr

Source

ReadResult

pub struct ReadResult {
  cst : @moonrockz/openrpc/json.CstDocument?
  document : Document?
  diagnostics : Array[@moonrockz/openrpc/json.Diagnostic]
} derive(@moonbitlang/core/debug.Debug)

Source

ReadResult::cst

fn ReadResult::cst(self : ReadResult) -> @moonrockz/openrpc/json.CstDocument?

Source

ReadResult::diagnostics

fn ReadResult::diagnostics(self : ReadResult) -> Array[@moonrockz/openrpc/json.Diagnostic]

Source

ReadResult::document

fn ReadResult::document(self : ReadResult) -> Document?

Source

ReadResult::source_map

fn ReadResult::source_map(self : ReadResult) -> @moonrockz/openrpc/json.SourceMap?

Source

ReadResult::to_repr

fn ReadResult::to_repr(ReadResult) -> @moonbitlang/core/debug.Repr

Source

Server

pub struct Server {
  value : @moonrockz/openrpc/json.Value
} derive(@moonbitlang/core/debug.Debug)

Source

Server::additional_fields

fn Server::additional_fields(self : Server) -> Array[(String, @moonrockz/openrpc/json.Value)]

Source

Server::description

fn Server::description(self : Server) -> String?

Source

Server::extensions

fn Server::extensions(self : Server) -> @moonrockz/openrpc/domain.Extensions

Source

Server::from_json

fn Server::from_json(value : @moonrockz/openrpc/json.Value, limits? : @moonrockz/openrpc/json.Limits) -> Result[Server, @moonrockz/openrpc/json.Diagnostic]

Source

Server::name

fn Server::name(self : Server) -> String?

Source

Server::new

fn Server::new(url : String, name? : String?, summary? : String?, description? : String?, variables? : Array[(String, ServerVariable)]?, extensions? : @moonrockz/openrpc/domain.Extensions, additional_fields? : Array[(String, @moonrockz/openrpc/json.Value)], limits? : @moonrockz/openrpc/json.Limits) -> Result[Server, @moonrockz/openrpc/json.Diagnostic]

Source

Server::summary

fn Server::summary(self : Server) -> String?

Source

Server::to_json

fn Server::to_json(self : Server) -> @moonrockz/openrpc/json.Value

Source

Server::to_repr

fn Server::to_repr(Server) -> @moonbitlang/core/debug.Repr

Source

Server::url

fn Server::url(self : Server) -> String

Source

Server::variables

fn Server::variables(self : Server) -> Array[(String, ServerVariable)]?

Source

ServerVariable

pub struct ServerVariable {
  value : @moonrockz/openrpc/json.Value
} derive(@moonbitlang/core/debug.Debug)

Source

ServerVariable::additional_fields

fn ServerVariable::additional_fields(self : ServerVariable) -> Array[(String, @moonrockz/openrpc/json.Value)]

Source

ServerVariable::default_value

fn ServerVariable::default_value(self : ServerVariable) -> String

Source

ServerVariable::description

fn ServerVariable::description(self : ServerVariable) -> String?

Source

ServerVariable::enum_values

fn ServerVariable::enum_values(self : ServerVariable) -> Array[String]?

Source

ServerVariable::extensions

fn ServerVariable::extensions(self : ServerVariable) -> @moonrockz/openrpc/domain.Extensions

Source

ServerVariable::from_json

fn ServerVariable::from_json(value : @moonrockz/openrpc/json.Value, limits? : @moonrockz/openrpc/json.Limits) -> Result[ServerVariable, @moonrockz/openrpc/json.Diagnostic]

Source

ServerVariable::new

fn ServerVariable::new(default_value : String, enum_values? : Array[String]?, description? : String?, extensions? : @moonrockz/openrpc/domain.Extensions, additional_fields? : Array[(String, @moonrockz/openrpc/json.Value)], limits? : @moonrockz/openrpc/json.Limits) -> Result[ServerVariable, @moonrockz/openrpc/json.Diagnostic]

Source

ServerVariable::to_json

fn ServerVariable::to_json(self : ServerVariable) -> @moonrockz/openrpc/json.Value

Source

ServerVariable::to_repr

fn ServerVariable::to_repr(ServerVariable) -> @moonbitlang/core/debug.Repr

Source

Severity

pub(all) enum Severity {
  Error
  Warning
  Information
} derive(Eq, @moonbitlang/core/debug.Debug)

Source

Severity::equal

fn Severity::equal(Severity, Severity) -> Bool

Source

Severity::not_equal

fn Severity::not_equal(x : Severity, y : Severity) -> Bool

Source

Severity::to_repr

fn Severity::to_repr(Severity) -> @moonbitlang/core/debug.Repr

Source

Tag

pub struct Tag {
  value : @moonrockz/openrpc/json.Value
} derive(@moonbitlang/core/debug.Debug)

Source

Tag::additional_fields

fn Tag::additional_fields(self : Tag) -> Array[(String, @moonrockz/openrpc/json.Value)]

Source

Tag::description

fn Tag::description(self : Tag) -> String?

Source

Tag::extensions

fn Tag::extensions(self : Tag) -> @moonrockz/openrpc/domain.Extensions

Source

Tag::external_docs

fn Tag::external_docs(self : Tag) -> ExternalDocumentation?

Source

Tag::from_json

fn Tag::from_json(value : @moonrockz/openrpc/json.Value, limits? : @moonrockz/openrpc/json.Limits) -> Result[Tag, @moonrockz/openrpc/json.Diagnostic]

Source

Tag::name

fn Tag::name(self : Tag) -> String

Source

Tag::new

fn Tag::new(name : String, summary? : String?, description? : String?, external_docs? : ExternalDocumentation?, extensions? : @moonrockz/openrpc/domain.Extensions, additional_fields? : Array[(String, @moonrockz/openrpc/json.Value)], limits? : @moonrockz/openrpc/json.Limits) -> Result[Tag, @moonrockz/openrpc/json.Diagnostic]

Source

Tag::summary

fn Tag::summary(self : Tag) -> String?

Source

Tag::to_json

fn Tag::to_json(self : Tag) -> @moonrockz/openrpc/json.Value

Source

Tag::to_repr

fn Tag::to_repr(Tag) -> @moonbitlang/core/debug.Repr

Source

ValidatedDocument

pub struct ValidatedDocument {
  document : Document
  report : ValidationReport
  // private fields
} derive(@moonbitlang/core/debug.Debug)

A document whose required facets all passed for one profile and one explicit resource snapshot.

Source

ValidatedDocument::document

fn ValidatedDocument::document(self : ValidatedDocument) -> Document

Source

ValidatedDocument::profile

fn ValidatedDocument::profile(self : ValidatedDocument) -> ValidationProfile

Source

ValidatedDocument::report

fn ValidatedDocument::report(self : ValidatedDocument) -> ValidationReport

Source

ValidatedDocument::resources

fn ValidatedDocument::resources(self : ValidatedDocument) -> Array[@moonrockz/openrpc/reference.UriReference]

Retrieval URIs of the resource snapshot the document was closed against.

Source

ValidatedDocument::to_repr

fn ValidatedDocument::to_repr(ValidatedDocument) -> @moonbitlang/core/debug.Repr

Source

ValidatedDocument::version

fn ValidatedDocument::version(self : ValidatedDocument) -> DocumentVersion

Source

ValidationProfile

pub(all) enum ValidationProfile {
  Specification
  MetaschemaCompatibility
} derive(Eq, @moonbitlang/core/debug.Debug)

Source

ValidationProfile::equal

fn ValidationProfile::equal(ValidationProfile, ValidationProfile) -> Bool

Source

ValidationProfile::not_equal

fn ValidationProfile::not_equal(x : ValidationProfile, y : ValidationProfile) -> Bool

Source

ValidationProfile::to_repr

fn ValidationProfile::to_repr(ValidationProfile) -> @moonbitlang/core/debug.Repr

Source

ValidationReport

pub struct ValidationReport {
  profile : ValidationProfile
  version : DocumentVersion
  findings : Array[Finding]
  model : Coverage
  schemas : Coverage
  references : Coverage
  normative : Coverage
  artifact : Coverage
} derive(@moonbitlang/core/debug.Debug)

Source

ValidationReport::artifact

fn ValidationReport::artifact(self : ValidationReport) -> Coverage

Source

ValidationReport::findings

fn ValidationReport::findings(self : ValidationReport) -> Array[Finding]

Findings in deterministic order: resource, pointer tokens, code, source occurrence, then message.

Source

ValidationReport::model

fn ValidationReport::model(self : ValidationReport) -> Coverage

Source

ValidationReport::normative

fn ValidationReport::normative(self : ValidationReport) -> Coverage

Source

ValidationReport::profile

fn ValidationReport::profile(self : ValidationReport) -> ValidationProfile

Source

ValidationReport::references

fn ValidationReport::references(self : ValidationReport) -> Coverage

Source

ValidationReport::schemas

fn ValidationReport::schemas(self : ValidationReport) -> Coverage

Source

ValidationReport::to_repr

fn ValidationReport::to_repr(ValidationReport) -> @moonbitlang/core/debug.Repr

Source

ValidationReport::version

fn ValidationReport::version(self : ValidationReport) -> DocumentVersion

Source

Type aliases

ComponentKey

using @moonrockz/openrpc/domain { type ComponentKey }

Shared checked values for OpenRPC documents and embedded schemas.

Source

ErrorCode

using @moonrockz/openrpc/domain { type ErrorCode }

Source

ExtensionName

using @moonrockz/openrpc/domain { type ExtensionName }

Source

Extensions

using @moonrockz/openrpc/domain { type Extensions }

Source

Format

using @moonrockz/openrpc/json { type Format }

Output layout. Compact is canonical; Pretty adds two-space indentation and changes nothing else.

Source

Values

compatibility_discrepancies

fn compatibility_discrepancies() -> Array[Discrepancy]

The frozen downgrade list. Adding an entry changes public behavior.

Source

field_names

fn field_names(kind : ObjectKind) -> Array[String]

Source

lower

fn lower(cst : @moonrockz/openrpc/json.CstDocument) -> ReadResult

Source

object_kinds

fn object_kinds() -> Array[ObjectKind]

Source

read

fn read(source : String, source_id? : String?, limits? : @moonrockz/openrpc/json.Limits) -> ReadResult

Source

replace_value

fn replace_value(cst : @moonrockz/openrpc/json.CstDocument, node : @moonrockz/openrpc/json.NodeId, value : @moonrockz/openrpc/json.Value, limits? : @moonrockz/openrpc/json.Limits) -> Result[ReadResult, @moonrockz/openrpc/json.Diagnostic]

Replace one existing value in a parsed document and read the result again. Diagnostics use the new source map; node handles from cst become stale.

Source

validate

fn validate(document : Document, profile? : ValidationProfile, resources? : @moonrockz/openrpc/reference.ResourceSet, base? : @moonrockz/openrpc/reference.UriReference?, source_map? : @moonrockz/openrpc/json.SourceMap?, limits? : @moonrockz/openrpc/json.Limits) -> ValidationReport

Validate a document against explicit resources. base is the document's retrieval URI; relative references and schema identifiers need it. Nothing is fetched. Unsupplied resources leave reference coverage incomplete. A source_map from reading the same document adds spans to its findings.

Source

validate_closed

fn validate_closed(document : Document, profile? : ValidationProfile, resources? : @moonrockz/openrpc/reference.ResourceSet, base? : @moonrockz/openrpc/reference.UriReference?, source_map? : @moonrockz/openrpc/json.SourceMap?, limits? : @moonrockz/openrpc/json.Limits) -> ClosedValidation

Source

write

fn write(document : Document, format? : @moonrockz/openrpc/json.Format, limits? : @moonrockz/openrpc/json.Limits) -> Result[String, @moonrockz/openrpc/json.Diagnostic]

Canonical JSON for a document. It is not source reproduction (see CstDocument::reproduce) and not RFC 8785 canonicalization.

Source