@Test public void usesDefaultPointer() { RefStrategy ref = RefStrategy.createDefaultStrategy( Model.builder().build(), new JsonSchemaConfig(), propertyNamingStrategy); String pointer = ref.toPointer(ShapeId.from("smithy.example#Foo")); assertThat(pointer, equalTo("#/definitions/Foo")); }
@Override public String toPointer(ShapeId id) { if (id.getMember().isPresent()) { MemberShape member = model.expectShape(id, MemberShape.class); return createMemberPointer(member); } return rootPointer + stripNonAlphaNumericCharsIfNecessary(id.getName()); }
DefaultRefStrategy implements RefStrategy { @Override public String toPointer(ShapeId id) { if (id.getMember().isPresent()) { MemberShape member = model.expectShape(id, MemberShape.class); return createMemberPointer(member); } return rootPointer + stripNonAlphaNumericCharsIfNecessary(id.getName()); } }
DefaultRefStrategy implements RefStrategy { @Override public String toPointer(ShapeId id) { if (id.getMember().isPresent()) { MemberShape member = model.expectShape(id, MemberShape.class); return createMemberPointer(member); } return rootPointer + stripNonAlphaNumericCharsIfNecessary(id.getName()); } DefaultRefStrategy(Model model, JsonSchemaConfig config, PropertyNamingStrategy propertyNamingStrategy); }
DefaultRefStrategy implements RefStrategy { @Override public String toPointer(ShapeId id) { if (id.getMember().isPresent()) { MemberShape member = model.expectShape(id, MemberShape.class); return createMemberPointer(member); } return rootPointer + stripNonAlphaNumericCharsIfNecessary(id.getName()); } DefaultRefStrategy(Model model, JsonSchemaConfig config, PropertyNamingStrategy propertyNamingStrategy); @Override String toPointer(ShapeId id); @Override boolean isInlined(Shape shape); }
DefaultRefStrategy implements RefStrategy { @Override public String toPointer(ShapeId id) { if (id.getMember().isPresent()) { MemberShape member = model.expectShape(id, MemberShape.class); return createMemberPointer(member); } return rootPointer + stripNonAlphaNumericCharsIfNecessary(id.getName()); } DefaultRefStrategy(Model model, JsonSchemaConfig config, PropertyNamingStrategy propertyNamingStrategy); @Override String toPointer(ShapeId id); @Override boolean isInlined(Shape shape);  }