Skip to content

Create DD and Web API Config JSON Schema #1

Open
@darnjo

Description

@darnjo

For this item, we want to create the following JSON Schema models. They will be used on the Certification frontend, API, and ETL and Cloud backends.

Data Dictionary

See sample config for further information.

Data Dictionary 1.7. See sample config for schema to validate. Note that one of Bearer Token or Client Credentials is required.

Web API Core

For Web API, this is currently an XML Config, but there is a ticket in the reso-certification library with a sample.

Similar to the Data Dictionary tests, the config supports both Bearer Tokens (with the token parameter) or Client Credentials (with the clientCredentials parameter). It should be one or the other in this case but not both.

The format should be as follows:

{
  "providerUoi": "M00000001",
  "providerUsi": "50024",
  "recipientUoi": "T00000052",
  "serviceRootUri": "https://some.api.com",
  "token": "bearerToken",
  "clientCredentials": {
    "clientId": "1233456",
    "clientSecret": "123123abc",
    "tokenUri": "uri.com",
    "scope": "scope"
  },
  "parameters": [
    { 
      "name": "Resource", 
      "value": "Property"
    },
    {
      "name": "Key Field",
      "value": "ListingKey"
      "defaultValue": "abc123"
    },
    {
      "name": "Integer Field",
      "value": "BedroomsTotal",
      "defaultValueLow": "1",
      "defaultValueHigh": "15"
    },
    {
      "name": "Decimal Field",
      "value": "ListPrice",
      "defaultValueLow": "1",
      "defaultValueHigh": "15"
    },
    {
      "name": "Single Lookup Field",
      "value": "StandardStatus",
      "defaultValue": "ActiveUnderContract",
      "defaultNamespace": "org.reso.metadata.enums.StandardStatus"
    },
    {
      "name": "Multiple Lookup Field",
      "value": "AccessibilityFeatures",
      "defaultValue1": "AccessibleApproachWithRamp",
      "defaultValue2": "Visitable",
      "defaultNamespace": "org.reso.metadata.enums.AccessibilityFeatures"
    },
    {
      "name": "Date Field",
      "value": "ListingContractDate",
      "defaultValue": "2023-01-01"
    },
    {
      "name": "Timestamp Field",
      "value": "ModificationTimestamp",
      "defaultValue": "2023-03-07T15:22:46Z"
    }
  ]
}

The Cert UI can possibly use this component to build its forms and validation from JSON Schema.

The Cert backend Node JS processes will use AJV.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions