-
Notifications
You must be signed in to change notification settings - Fork 279
Closed
Labels
V2-Enhancementtype:breaking-changeAn issue that will result in dependent client projects failing.An issue that will result in dependent client projects failing.
Milestone
Description
This test has been removed in v2. We need to investigate how to properly check for unresolve JSON Schema refs and skip validation.
public void UnresolvedReferenceSchemaShouldNotBeValidated()
{
// Arrange
var sharedSchema = new JsonSchemaBuilder().Type(SchemaValueType.String).Ref("test").Build();
OpenApiDocument document = new OpenApiDocument();
document.Components = new OpenApiComponents()
{
Schemas = new Dictionary<string, JsonSchema>()
{
["test"] = sharedSchema
}
};
// Act
var rules = new Dictionary<string, IList<ValidationRule>>()
{
{ typeof(JsonSchema).Name,
new List<ValidationRule>() { new AlwaysFailRule<JsonSchema>() }
}
};
var errors = document.Validate(new ValidationRuleSet(rules));
// Assert
Assert.True(!errors.Any());
}Metadata
Metadata
Assignees
Labels
V2-Enhancementtype:breaking-changeAn issue that will result in dependent client projects failing.An issue that will result in dependent client projects failing.