# Interface OS3Schema

Interface
Module
import { OS3Schema } from "@tsed/openspec"
Source/packages/specs/openspec/src/types/openspec3/OS3Schema.ts

# Overview

interface OS3Schema extends OpenSpecJsonSchema<OS3Schema> {
oneOf?<span class="token punctuation">:</span> <span class="token punctuation">(</span>OS3Schema | <a href="/api/specs/openspec/types/common/OpenSpecRef.html"><span class="token">OpenSpecRef</span></a><span class="token punctuation">)</span><span class="token punctuation">[</span><span class="token punctuation">]</span><span class="token punctuation">;</span>

anyOf?<span class="token punctuation">:</span> <span class="token punctuation">(</span>OS3Schema | <a href="/api/specs/openspec/types/common/OpenSpecRef.html"><span class="token">OpenSpecRef</span></a><span class="token punctuation">)</span><span class="token punctuation">[</span><span class="token punctuation">]</span><span class="token punctuation">;</span>

not?<span class="token punctuation">:</span> OS3Schema | <a href="/api/specs/openspec/types/common/OpenSpecRef.html"><span class="token">OpenSpecRef</span></a><span class="token punctuation">;</span>

nullable?<span class="token punctuation">:</span> <span class="token keyword">boolean</span><span class="token punctuation">;</span>

discriminator?<span class="token punctuation">:</span> <span class="token keyword">string</span><span class="token punctuation">;</span>

readOnly?<span class="token punctuation">:</span> <span class="token keyword">boolean</span><span class="token punctuation">;</span>

writeOnly?<span class="token punctuation">:</span> <span class="token keyword">boolean</span><span class="token punctuation">;</span>

xml?<span class="token punctuation">:</span> <a href="/api/specs/openspec/types/common/OpenSpecXML.html"><span class="token">OpenSpecXML</span></a><span class="token punctuation">;</span>

externalDocs?<span class="token punctuation">:</span> <a href="/api/specs/openspec/types/common/OpenSpecExternalDocs.html"><span class="token">OpenSpecExternalDocs</span></a><span class="token punctuation">;</span>

}

# Members

oneOf?: (OS3Schema | OpenSpecRef)[];

Inline or referenced schema MUST be of a Schema Object and not a standard JSON Schema.


anyOf?: (OS3Schema | OpenSpecRef)[];

Inline or referenced schema MUST be of a Schema Object and not a standard JSON Schema.


Inline or referenced schema MUST be of a Schema Object and not a standard JSON Schema.


nullable?: boolean;

Allows sending a null value for the defined schema. Default value is false.


discriminator?: string;

Adds support for polymorphism. The discriminator is the schema property name that is used to differentiate between other schema that inherit this schema. The property name used MUST be defined at this schema and it MUST be in the required property list. When used, the value MUST be the name of this schema or any schema that inherits it.


readOnly?: boolean;

Relevant only for Schema "properties" definitions. Declares the property as "read only". This means that it MAY be sent as part of a response but MUST NOT be sent as part of the request. Properties marked as readOnly being true SHOULD NOT be in the required list of the defined schema. Default value is false.


writeOnly?: boolean;

Relevant only for Schema "properties" definitions. Declares the property as "write only". Therefore, it MAY be sent as part of a request but SHOULD NOT be sent as part of the response. If the property is marked as writeOnly being true and is in the required list, the required will take effect on the request only. A property MUST NOT be marked as both readOnly and writeOnly being true. Default value is false.


This MAY be used only on properties schemas. It has no effect on root schemas. Adds Additional metadata to describe the XML representation format of this property.


externalDocs?: OpenSpecExternalDocs;

Additional external documentation for this schema.