swagger-core icon indicating copy to clipboard operation
swagger-core copied to clipboard

Support proper mapping of the byte array

Open reta opened this issue 4 years ago • 8 comments

An attempt to properly map byte[] to the ByteArraySchema or BinarySchema depending on the format specified (if any). The idea here is to introduce the support in PrimitiveType of types which could be mapped to multiple schemas, depending on the format, with the first one being the default in case format is omitted. Closes https://github.com/swagger-api/swagger-core/issues/3944 and https://github.com/swagger-api/swagger-core/issues/3511.

Specification snippets generated:

        bytes:
          type: string
          format: byte
        binary:
          type: string
          format: binary

@webron would really appreciate the feedback if this change make sense, test cases are include, thanks a lot.

reta avatar May 13 '21 02:05 reta

My apologies @webron , any interest or feedback on this pull request would be much appreciated, thank you :-)

reta avatar May 24 '21 20:05 reta

@reta, I created a pull request for your branch to add support for base64 encoded string examples for byte and binary format. Please, consider including it. Thanks.

martin-tarjanyi avatar Jul 02 '21 21:07 martin-tarjanyi

thanks @martin-tarjanyi , included, hopefully we could get some attention from the team

reta avatar Jul 04 '21 21:07 reta

@frantuma @HugoMario guys, mind please taking a look? thank you!

reta avatar Aug 17 '21 01:08 reta

@HugoMario @frantuma hey guys, any chance someone could look at it? thank you!

reta avatar Apr 02 '22 18:04 reta

hey @reta , sure. I'll take a time this week to check your PR

HugoMario avatar Apr 04 '22 13:04 HugoMario

hey @HugoMario , any chances to have a pair of eyes on it? :-) Thank you!

reta avatar Jun 02 '22 21:06 reta

@HugoMario did you have a chance to look at this PR yet?

RInverid avatar Sep 19 '22 08:09 RInverid

Hey @reta Is the jetty version update related to changs in byte array? BTW, PR looks good to me. I'll sync up again with my team to check this again.

Sorry for so much delay

HugoMario avatar Apr 02 '23 05:04 HugoMario

Hey @HugoMario !

Hey @reta Is the jetty version update related to changs in byte array?

No, it shouldn't be (AFAIK)

BTW, PR looks good to me. I'll sync up again with my team to check this again.

Thanks a mill, really appreciate it!

reta avatar Apr 02 '23 13:04 reta