Conch API

Logo

Datacenter build and management service

View the Project on GitHub joyent/conch-api

NAME

Conch::Controller::Schema

METHODS

get

Get the json-schema in JSON format.

_extract_schema_definition

Given a JSON::Validator object containing a schema definition, extract the requested portion out of the “definitions” section, including any named references, and add some standard headers.

TODO: this (plus addition of the header fields) could mostly be replaced with just:

my $new_defs = $jv->bundle({
    schema => $jv->get('/definitions/'.$title),
    ref_key => 'definitions',
});

..except circular refs are not handled there, and the definition renaming leaks local path info.

LICENSING

Copyright Joyent, Inc.

This Source Code Form is subject to the terms of the Mozilla Public License, v.2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.