Skip to content
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

Can't use binary as a base type #579

Open
mglazer opened this issue Mar 27, 2020 · 0 comments
Open

Can't use binary as a base type #579

mglazer opened this issue Mar 27, 2020 · 0 comments

Comments

@mglazer
Copy link
Contributor

mglazer commented Mar 27, 2020

What happened?

I tried:

types:
  imports:
    Response:
      base-type: binary
      external:
        java: javax.ws.rs.core.Response

It failed with:

  Caused by: java.lang.IllegalArgumentException: TypeNames must be a primitive type [any, string, integer, double, boolean, safelong, rid, bearertoken, uuid] or match pattern ^[A-Z][a-z0-9]+([A-Z][a-z0-9]+)*$: binary
        at com.google.common.base.Preconditions.checkArgument(Preconditions.java:455)
        at com.palantir.conjure.parser.types.names.TypeName.check(TypeName.java:46)
        at com.palantir.conjure.parser.types.names.ImmutableTypeName.validate(ImmutableTypeName.java:110)
        at com.palantir.conjure.parser.types.names.ImmutableTypeName.access$200(ImmutableTypeName.java:30)
        at com.palantir.conjure.parser.types.names.ImmutableTypeName$Builder.build(ImmutableTypeName.java:197)
        at com.palantir.conjure.parser.types.names.TypeName.of(TypeName.java:54)
        at com.palantir.conjure.parser.types.primitive.PrimitiveType.fromString(PrimitiveType.java:70)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at com.fasterxml.jackson.databind.introspect.AnnotatedMethod.callOnWith(AnnotatedMethod.java:122)
        at com.fasterxml.jackson.databind.deser.std.FactoryBasedEnumDeserializer.deserialize(FactoryBasedEnumDeserializer.java:138)
        ... 64 more

What did you want to happen?

I want a binary base type to be supported.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant