toJson method

Map<String, Object?> toJson()

Serializes the contract to stable JSON.

Implementation

Map<String, Object?> toJson() {
  return <String, Object?>{
    'schemaVersion': schemaVersion,
    'type': documentType,
    'contractVersion': contractVersion,
    'appId': appId,
    'backendBaseUrl': backendBaseUri.toString(),
    'accessMode': accessMode,
    'healthEndpoint': healthEndpoint,
    'smokeTests': smokeTests.map((test) => test.toJson()).toList(),
  };
}