Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ private static final class GithubModelResolver implements ModelResolver {
@Override
public String getModel(String serviceName) throws Exception {
return CLIENT.send(HttpRequest.newBuilder()
.uri(URI.create("https://raw.githubusercontent.com/aws/api-models-aws/refs/heads/main/"
.uri(URI.create("https://raw.githubusercontent.com/aws/api-models-aws/refs/heads/main/models/"
+ Objects.requireNonNull(GH_URIS_BY_SERVICE.get(serviceName),
"No known service name " + serviceName)))
.build(), HttpResponse.BodyHandlers.ofString())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ public Builder serializeTypeInDocuments(boolean serializeTypeInDocuments) {
settingsBuilder.serializeTypeInDocuments(serializeTypeInDocuments);
return this;
}

/**
* Whether to format the JSON output with pretty printing (indentation and line breaks).
* Default is false.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ public void writesDunderTypeForEmptyStruct() throws Exception {
assertThat(result, equalTo("{\"__type\":\"smithy.example#Nested\"}"));
}
}

@Test
public void testPrettyPrinting() throws Exception {
try (var codec = JsonCodec.builder().prettyPrint(true).build(); var output = new ByteArrayOutputStream()) {
Expand Down Expand Up @@ -282,10 +282,10 @@ public <T> T getMemberValue(Schema member) {
var result = output.toString(StandardCharsets.UTF_8);
// Expected format with Jackson's default pretty printer
String expectedFormat = """
{
"name" : "Toucan",
"color" : "red"
}""";
{
"name" : "Toucan",
"color" : "red"
}""";
assertThat(result, equalTo(expectedFormat));
}
}
Expand Down