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

Allow custom attributes in .ksy files #76

Closed
scallacs opened this issue Nov 29, 2018 · 2 comments
Closed

Allow custom attributes in .ksy files #76

scallacs opened this issue Nov 29, 2018 · 2 comments

Comments

@scallacs
Copy link

It would be nice to allow custom attributes in the .ksy definition file.

We could prefix these attributes with x- like OpenAPI does.

meta:
  id: my_id
seq:
  - id: myfield
    type: u4
    x-custom: my custom value

This is usefull to easily add extra informations and develop extensions.

Currently IDE throws an error when a non expected attribute is found is .ksy file:

io.kaitai.struct.format.YAMLParseException: /seq/0/x-custom: unknown key found, expected: consume, doc, doc-ref, eos-error, id, if, include, repeat,

@KOLANICH
Copy link

KOLANICH commented Nov 29, 2018

Custom attrs are prefixed with -.

-custom: my custom value

and the bug tracker about the language itself is kaitai-io/kaitai_struct , this one is webide-related.

@scallacs
Copy link
Author

Oups a did not search enough! Thanks!

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

No branches or pull requests

2 participants