Search in sources :

Example 1 with ExternalDocumentation

use of io.apicurio.datamodels.core.models.common.ExternalDocumentation in project apicurio-data-models by Apicurio.

the class Oas20Operation method createExternalDocumentation.

/**
 * @see io.apicurio.datamodels.core.models.common.Operation#createExternalDocumentation()
 */
@Override
public ExternalDocumentation createExternalDocumentation() {
    ExternalDocumentation externalDocs = new Oas20ExternalDocumentation();
    externalDocs._ownerDocument = this.ownerDocument();
    externalDocs._parent = this;
    return externalDocs;
}
Also used : ExternalDocumentation(io.apicurio.datamodels.core.models.common.ExternalDocumentation)

Example 2 with ExternalDocumentation

use of io.apicurio.datamodels.core.models.common.ExternalDocumentation in project apicurio-data-models by Apicurio.

the class DataModelReader method readTag.

/**
 * Reads an tag object into a data model instance (tag node).
 * @param json
 * @param node
 */
public void readTag(Object json, Tag node) {
    String name = JsonCompat.consumePropertyString(json, Constants.PROP_NAME);
    String description = JsonCompat.consumePropertyString(json, Constants.PROP_DESCRIPTION);
    Object externalDocs = JsonCompat.consumeProperty(json, Constants.PROP_EXTERNAL_DOCS);
    node.name = name;
    node.description = description;
    if (externalDocs != null) {
        ExternalDocumentation externalDocsModel = node.createExternalDocumentation();
        this.readExternalDocumentation(externalDocs, externalDocsModel);
        node.externalDocs = externalDocsModel;
    }
    this.readExtensions(json, node);
    this.readExtraProperties(json, node);
}
Also used : ExternalDocumentation(io.apicurio.datamodels.core.models.common.ExternalDocumentation)

Example 3 with ExternalDocumentation

use of io.apicurio.datamodels.core.models.common.ExternalDocumentation in project apicurio-data-models by Apicurio.

the class Aai20Schema method createExternalDocumentation.

@Override
public ExternalDocumentation createExternalDocumentation() {
    ExternalDocumentation rval = new Aai20ExternalDocumentation();
    rval._ownerDocument = this.ownerDocument();
    rval._parent = this;
    return rval;
}
Also used : ExternalDocumentation(io.apicurio.datamodels.core.models.common.ExternalDocumentation)

Example 4 with ExternalDocumentation

use of io.apicurio.datamodels.core.models.common.ExternalDocumentation in project apicurio-data-models by Apicurio.

the class Document method setExternalDocumentation.

/**
 * Sets the external documentation information.
 * @param description
 * @param url
 */
public ExternalDocumentation setExternalDocumentation(String description, String url) {
    ExternalDocumentation ed = this.createExternalDocumentation();
    ed.description = description;
    ed.url = url;
    this.externalDocs = ed;
    return ed;
}
Also used : ExternalDocumentation(io.apicurio.datamodels.core.models.common.ExternalDocumentation)

Example 5 with ExternalDocumentation

use of io.apicurio.datamodels.core.models.common.ExternalDocumentation in project apicurio-data-models by Apicurio.

the class Oas20Document method createExternalDocumentation.

/**
 * @see io.apicurio.datamodels.core.models.Document#createExternalDocumentation()
 */
@Override
public ExternalDocumentation createExternalDocumentation() {
    ExternalDocumentation ed = new Oas20ExternalDocumentation();
    ed._ownerDocument = this.ownerDocument();
    ed._parent = this;
    return ed;
}
Also used : ExternalDocumentation(io.apicurio.datamodels.core.models.common.ExternalDocumentation)

Aggregations

ExternalDocumentation (io.apicurio.datamodels.core.models.common.ExternalDocumentation)10