Search in sources :

Example 16 with DataSchemaResolver

use of com.linkedin.data.schema.DataSchemaResolver in project rest.li by linkedin.

the class DefaultDocumentationRequestHandler method initializeRenderers.

private void initializeRenderers() {
    final DataSchemaResolver schemaResolver = new ClasspathResourceDataSchemaResolver();
    final ResourceSchemaCollection resourceSchemas = ResourceSchemaCollection.loadOrCreateResourceSchema(_rootResources);
    final RestLiResourceRelationship relationships = new RestLiResourceRelationship(resourceSchemas, schemaResolver);
    _htmlRenderer = getHtmlDocumentationRenderer(schemaResolver, relationships);
    _jsonRenderer = getJsonDocumentationRenderer(schemaResolver, relationships);
}
Also used : ClasspathResourceDataSchemaResolver(com.linkedin.data.schema.resolver.ClasspathResourceDataSchemaResolver) DataSchemaResolver(com.linkedin.data.schema.DataSchemaResolver) ClasspathResourceDataSchemaResolver(com.linkedin.data.schema.resolver.ClasspathResourceDataSchemaResolver)

Aggregations

DataSchemaResolver (com.linkedin.data.schema.DataSchemaResolver)16 NamedDataSchema (com.linkedin.data.schema.NamedDataSchema)5 MultiFormatDataSchemaResolver (com.linkedin.data.schema.resolver.MultiFormatDataSchemaResolver)5 IOException (java.io.IOException)5 DataMap (com.linkedin.data.DataMap)4 FileInputStream (java.io.FileInputStream)4 RecordDataSchema (com.linkedin.data.schema.RecordDataSchema)3 PdlSchemaParser (com.linkedin.data.schema.grammar.PdlSchemaParser)3 ClasspathResourceDataSchemaResolver (com.linkedin.data.schema.resolver.ClasspathResourceDataSchemaResolver)3 ValidationOptions (com.linkedin.data.schema.validation.ValidationOptions)3 ResourceSchema (com.linkedin.restli.restspec.ResourceSchema)3 File (java.io.File)3 Map (java.util.Map)3 Test (org.testng.annotations.Test)3 AbstractSchemaParser (com.linkedin.data.schema.AbstractSchemaParser)2 DataSchema (com.linkedin.data.schema.DataSchema)2 DefaultDataSchemaResolver (com.linkedin.data.schema.resolver.DefaultDataSchemaResolver)2 ValidationResult (com.linkedin.data.schema.validation.ValidationResult)2 CompatibilityInfoMap (com.linkedin.restli.tools.compatibility.CompatibilityInfoMap)2 ResourceCompatibilityChecker (com.linkedin.restli.tools.compatibility.ResourceCompatibilityChecker)2