-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(java): expose list_known_features #197
Conversation
@Test | ||
public void testClientSpec() throws Exception { | ||
ObjectMapper objectMapper = new ObjectMapper(); | ||
objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); | ||
File basePath = Paths.get("../client-specification/specifications").toFile(); | ||
File indexFile = new File(basePath, "index.json"); | ||
List<String> testSuites = | ||
objectMapper.readValue(indexFile, new TypeReference<List<String>>() {}); | ||
List<String> testSuites = objectMapper.readValue(indexFile, new TypeReference<List<String>>() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line and everything below is formatter, sorry
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No worries
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Except for the Q about optional this LGTM
return name; | ||
} | ||
|
||
public Optional<String> getType() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why an optional when your constructor takes a string?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So I'd like the constructor to take an Optional too but apparently Jackson hates that so I figured me wanting that was wrong for some reason.
@Test | ||
public void testClientSpec() throws Exception { | ||
ObjectMapper objectMapper = new ObjectMapper(); | ||
objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); | ||
File basePath = Paths.get("../client-specification/specifications").toFile(); | ||
File indexFile = new File(basePath, "index.json"); | ||
List<String> testSuites = | ||
objectMapper.readValue(indexFile, new TypeReference<List<String>>() {}); | ||
List<String> testSuites = objectMapper.readValue(indexFile, new TypeReference<List<String>>() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No worries
…ods can be exposed and do memory management that should work on Java 18 and above (#198) * refactor(java): rework java engine so that static methods can be exposed cleanly * feat(java): expose core version in java engine layer (#199) * fix(java): force native encoding to utf-8 so windows doesn't set it to something horrible (#200)
Exposes list_known_features in the Java layer so we can start to swap out
MoreOperations
in the Java SDK