private static JsonSchema BuildResults(OperationsBuilder builder) { return(new JsonSchema { Properties = { ["total"] = SchemaBuilder.NumberProperty("The total number of content items.", true), ["items"] = SchemaBuilder.ArrayProperty(builder.ContentSchema, "The content items.", true) }, Type = JsonObjectType.Object }); }
private static JsonSchema CreateContentsSchema(string schemaName, JsonSchema contentSchema) { var schema = new JsonSchema { Properties = { ["total"] = SchemaBuilder.NumberProperty($"The total number of {schemaName} contents.", true), ["items"] = SchemaBuilder.ArrayProperty(contentSchema, $"The {schemaName} contents.", true) }, Type = JsonObjectType.Object }; return(schema); }