Working towards the next version of the SWIM Supporting Material

Page tree

Working towards the next version of the SWIM Supporting Material

Skip to end of metadata
Go to start of metadata
Page Table of Content

Version

This page concerns v2.0 of the Specification. Supporting material on v1.0 is SWIM-SERV-029 Examples of code

Requirement

Title

Examples of code

Identifier

SWIM-SERV-340 

Requirement

A service description should include or refer to examples of code exemplifying the implementation of the consuming service interface.

Rationale

Providing example code is a best practice to speed up prototyping.

Verification

Completeness: Not Applicable.

Consistency: If provided, verify that the provided examples correspond to the described service.

Correctness: Not Applicable.

Examples/Notes

Examples include source code in a given programming language, input and output messages.

Level of Implementation

Recommended

Guidance

Verification Support

Consistency

Check that:

[  ] The provided examples correspond to the described service.

Examples

The following example shows the content as a table.

examples of codepublic:/2019-09/MessageExamples.txt


The following example shows an extract of the content of a JSON file that conforms to the Service Metadata Schema

Example of SWIM-SERV-340 using Service Metadata Schema
"references": {
 "serviceDocument": [{
  "documentType": "CODE_EXAMPLE",
  "title": "Example of messages",
  "version": "1.0",
  "description": "A set of message examples",
  "reference": {
   "url": "public:/2019-09/MessageExamples.txt"
  }
 },
 {
  "documentType": "CODE_EXAMPLE",
  "title": "Service Implementation Manual",
  "version": "24.0",
  "description": "The manual to be used by service consumers when implementing the service. It includes code examples.",
  "reference": {
   "url": "public:/2019-09/ServiceImplementationManual.html"
  }
 }]
}

Complete examples are available at Example service description.


  • No labels