DisableMapper implements JsonSchemaMapper { @Override public Schema.Builder updateSchema(Shape shape, Schema.Builder schema, JsonSchemaConfig config) { for (String feature : config.getDisableFeatures()) { schema.disableProperty(feature); } return schema; }  @Override byte getOrder(); @Override Schema.Builder updateSchema(Shape shape, Schema.Builder schema, JsonSchemaConfig config);  }
@Test public void removesDisabledKeywords() { StringShape shape = StringShape.builder().id("smithy.example#String").build(); Schema.Builder builder = Schema.builder().type("string").format("foo"); JsonSchemaConfig config = new JsonSchemaConfig(); config.setDisableFeatures(SetUtils.of("format")); Schema schema = new DisableMapper().updateSchema(shape, builder, config).build(); assertThat(schema.getType().get(), equalTo("string")); assertFalse(schema.getFormat().isPresent()); }