8000 Java support for literals in unions proposal by ajgateno · Pull Request #6822 · fern-api/fern · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Java support for literals in unions proposal #6822

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
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 @@ -214,8 +214,22 @@ public String visitSet(TypeReference set) {

@Override
public String visitLiteral(Literal literal) {
throw new RuntimeException(
"Unexpected attempt to get name of type literal: " + literal); // todo: finalize this
return literal.visit(new Literal.Visitor<String>() {
@Override
public String visitString(String s) {
return "String";
}

@Override
public String visitBoolean(boolean b) {
return "Boolean";
}

@Override
public String _visitUnknown(Object o) {
throw new RuntimeException("Unknown literal type " + o);
}
});
}

@Override
Expand Down
9 changes: 9 additions & 0 deletions seed/java-sdk/literal/.mock/definition/inlined.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 0 additions & 22 deletions seed/java-sdk/literal/src/main/java/com/snippets/Example0.java

This file was deleted.

22 changes: 0 additions & 22 deletions seed/java-sdk/literal/src/main/java/com/snippets/Example1.java

This file was deleted.

Loading
Loading
0