Skip to content

Properties are not serialized in "order" #130

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

Closed
antmendoza opened this issue Jul 22, 2021 · 3 comments · Fixed by #159
Closed

Properties are not serialized in "order" #130

antmendoza opened this issue Jul 22, 2021 · 3 comments · Fixed by #159
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@antmendoza
Copy link
Contributor

What would you like to be added:
Would be nice to have a way to define the order in witch are serialized the properties.

For example, for eventstate, type and exclusive properties are always printed in first place:

    "states": [
        {
          "type": "event",
          "exclusive": true,
          "name": "StoreCarAuctionBid",
          "onEvents": [
.....    
]

Instead should be:

    "states": [
        {
          "name": "StoreCarAuctionBid",
          "type": "event",
          "exclusive": true,
          "onEvents": [
.....    
]

Why is this needed:

@antmendoza antmendoza added enhancement New feature or request good first issue Good for newcomers labels Jul 22, 2021
@tsurdilo
Copy link
Contributor

@antmendoza yeah for states please make id(if defined), name ,and type the first three params no matter which state it is

@tsurdilo
Copy link
Contributor

@antmendoza also we should define the order of top level properties across all sdks.

some rules that could be applied now:

  • id, name, version, description, specversion should go first
  • start property should go right above the states array
  • states[] go before functions[] events[], retries[], timeouts ... (and all other reusable definitions)

@tsurdilo
Copy link
Contributor

@antmendoza also for things like function definitions, on output we should group them by type, same for events (kinda - produced/consumed). this can be applied to many other definitions (in reusable defs)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
2 participants