This gist is an open-ended template for defining a Domain Model for the Chain Links application that accompanies The Language of API design series in API Design Matters. Below are several key elements of a Domain Model, with a brief desccription of each, and some content to spark your own responses. Download a copy of this template as Markdown and fill in each section with your understanding and interpretation of the domain model.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
components: | |
schemas: | |
chainLink: | |
title: A Chain Link | |
description: >- | |
Representation of one chain link which can be used | |
in multiple story chains. | |
allOf: | |
- $ref: '#/components/schemas/chainLinkItem' | |
- type: object |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
components: | |
schemas: | |
newChainLink: | |
title: New Chain Link | |
description: >- | |
Representation used to create a new chain link. | |
type: object | |
required: | |
- type | |
properties: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
components: | |
schemas: | |
chainLinks: | |
title: Chain Links | |
description: A page of chain link items from a | |
collection of chain links. | |
type: object | |
required: [ items ] | |
properties: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Chain Links | |
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) | |
* | |
* OpenAPI spec version: 1.0.0 | |
* | |
* | |
* NOTE: This class is auto generated by the swagger code generator program. | |
* https://github.com/swagger-api/swagger-codegen.git | |
* Do not edit the class manually. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
paths: | |
/chainLinks: | |
get: | |
responses: | |
'200': ... as seen above ... | |
'400': | |
description: Bad Request. | |
content: | |
application/problem+json: | |
schema: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
title: API Problem | |
description: 'API problem response, as per [RFC 7807 application/problem+json](https://tools.ietf.org/html/rfc7807).' | |
type: object | |
properties: | |
type: | |
description: 'A URI reference [RFC3986] that identifies the problem type.' | |
type: string | |
format: uri-reference | |
maxLength: 128 | |
title: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
openapi: '3.1.0' | |
info: | |
title: listChainLinks with default 200 OK response | |
description: Part of the Chain Links API. | |
contact: | |
name: David Biesack | |
url: https://gist.github.com/DavidBiesack | |
version: 0.0.0 | |
tags: | |
- name: Chain Links |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
openapi: 3.1.0 | |
info: | |
title: Your API Title | |
summary: One sentence description of the API | |
description: >- | |
Place a longer description of your API here. Use Markdown for richer text. | |
Describe the API use cases, who uses it, and for what purpose. Highlight | |
the significant resources and operations in the API. | |
You can write multiple paragraphs and link to additional documentation, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
openapi: 3.0.3 | |
info: | |
title: Apiture Digital Banking | |
description: >- | |
APIs for digital banking client applications. | |
## Customer Accounts | |