davidlang42 / roland-rds

Library for working with Roland RDS files (live set keyboard patches)
GNU Affero General Public License v3.0
3 stars 0 forks source link

JSON schema incorrect for all Bits<N> fields #19

Closed davidlang42 closed 1 year ago

davidlang42 commented 1 year ago

Bits should be of type string but it currently an array of Bit, could use pattern regex: "^(?:[01]{8} ){X}[01]{Y}$" where Y is the number of bits in the last byte (1-8) and X is the number of whole bytes BEFORE the last byte N > 0 Y = (N - 1) % 8 + 1 X = (N - Y) / 8

Specifically this bug exists wherever serialize_fromstr_display is used

davidlang42 commented 1 year ago

Fixed by https://github.com/davidlang42/roland-rds/commit/a94af9bb0c75abb48e90985f1cb51c9e1083996f