// IsEmpty returns true if no members of the Schema are specified. func (schema *Schema) IsEmpty() bool { … } // IsEqual returns true if two schemas are equal. func (schema *Schema) IsEqual(schema2 *Schema) bool { … } type SchemaOperation … // Applies a specified function to a Schema and all of the Schemas that it contains. func (schema *Schema) applyToSchemas(operation SchemaOperation, context string) { … } // CopyProperties copies all non-nil properties from the source Schema to the schema Schema. func (schema *Schema) CopyProperties(source *Schema) { … } // TypeIs returns true if the Type of a Schema includes the specified type func (schema *Schema) TypeIs(typeName string) bool { … } // ResolveRefs resolves "$ref" elements in a Schema and its children. // But if a reference refers to an object type, is inside a oneOf, or contains a oneOf, // the reference is kept and we expect downstream tools to separately model these // referenced schemas. func (schema *Schema) ResolveRefs() { … } // resolveJSONPointer resolves JSON pointers. // This current implementation is very crude and custom for OpenAPI 2.0 schemas. // It panics for any pointer that it is unable to resolve. func (schema *Schema) resolveJSONPointer(ref string) (result *Schema, err error) { … } // ResolveAllOfs replaces "allOf" elements by merging their properties into the parent Schema. func (schema *Schema) ResolveAllOfs() { … } // ResolveAnyOfs replaces all "anyOf" elements with "oneOf". func (schema *Schema) ResolveAnyOfs() { … } // return a pointer to a copy of a passed-in string func stringptr(input string) (output *string) { … } // CopyOfficialSchemaProperty copies a named property from the official JSON Schema definition func (schema *Schema) CopyOfficialSchemaProperty(name string) { … } // CopyOfficialSchemaProperties copies named properties from the official JSON Schema definition func (schema *Schema) CopyOfficialSchemaProperties(names []string) { … }