Skip to content

Instantly share code, notes, and snippets.

Avatar

Mike Amundsen mamund

View GitHub Profile
@mamund
mamund / code-interfaces.js
Last active Jul 21, 2022
prototype for a composable service
View code-interfaces.js
var jobInterface(args) {
function init(args) {}
function stateRead(args) {}
function stateWrite(args) {}
function JobStart(args) {}
function JobCancel(args) {}
function JobRestart(args) {}
function JobRevert(args) {}
}
@mamund
mamund / CWAD-46-README-Mocking-Bookstore-API.md
Created Mar 3, 2022
CWAD-46-README-Mocking-Bookstore-API
View CWAD-46-README-Mocking-Bookstore-API.md

Bookstore README Mocking

Simple README Mock for the Bookstore API

listBooks()

*** REQUEST ***
GET /books
Accept: application/json
View bookstore-mock.md

Bookstore README Mocking

listBooks()

*** REQUEST ***
GET /books
Accept: application/json

*** RESPONSE ***
200 OK
View shopping-profile-modeled-resources.md

Shopping API Modeled Resources

Book

Property Name Description
title The book title
isbn The unique ISBN of the book
authors List of Book Author resources
View shopping-profile-operations.md

Shopping API

  • Supports the book browsing experience and cart management
  • Scope: Public

Add Operations

Place these operations on the proper lines in the table below.

  • viewCart()
  • clearCart()
View shopping-profile-resources.md

Shopping API

  • Supports the book browsing experience and cart management
  • Scope: Public

Add Resources

Place the resource(s) on the proper line in the table below

  • Book (two lines)
  • CartItem, Cart (two lines)
View shopping-profile-events.md

Shopping API

  • Supports the book browsing experience and cart management
  • Scope: Public

Add Events

Place the events on the proper line in the table

  • Cart.ItemAdded
  • Cart.ItemRemoved
View shopping-profile-traits.md

Shopping API

  • Supports the book browsing experience and cart management
  • Scope: Public

Add Read/Write Traits

Place the read/write traits on the proper lines in the table below.

  • read (three lines)
  • write (three lines)
View shoppping-profile-complete.md

Shopping API

  • Supports the book browsing experience and cart management
  • Scope: Public

Complete Shopping Profile

Operation Name Description Participants Resource(s) Emitted Events Operation Details Traits
listBooks() List books by category or release date Customer, Call Center Book Books.Listed Request Parameters: categoryId, releaseDate Returns: Books[] read
@mamund
mamund / suggest-working.md
Last active Mar 12, 2021
Working Skeleton for HAL-FORMS SUGGEST control
View suggest-working.md

Below is an updated workinging model for HAL-FORMS options control. See notes below for details. Comments welcome.

{
  "_templates" : {
    "default" : {
      ...
      "properties" : [
        {
 "name" : "...",