Skip to content

filmReel is a format for encoding API state flow expectations.

License

Notifications You must be signed in to change notification settings

Bestowinc/filmReel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

filmReel

A format for encoding API state flow expectations.

The filmReel specification aims to move the source of truth for how an API should behave from the service itself and into a series of linear state diagrams. This allows one to set loosely coupled and human readable expectations for an API.

By having filmReel be the source of truth for how an API should behave one can:

  • Identify regressions in service logic.
  • Determine whether mocks or stubs that mimic a service have become outdated.
  • Aggregate data to support stateful integration tests.

filmReel concepts:

  • The Frame - the JSON file where input an output expectations are set
  • The Reel - the file naming system tying Frames together
  • The Cut - the data sharing system allowing one Frame to pass messages to the next Frame

Example: annotated

usr.01s.createuser.fr.json naming a file

{
  "protocol": "gRPC",
  "cut": {
    "to": {
      "USER_ID": "'response'.'body'.'message'"
    }
  },
  "request": {
    "body": {
      "email": "new_user@humanmail.com"
    },
    "uri": "user_api.User/CreateUser"
  },
  "response": {
    "body": {
      "message": "created user: ${USER_ID}"
    },
    "status": 0
  }
}

About

filmReel is a format for encoding API state flow expectations.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •