department-for-transport-public / D-TRO

Digital Traffic Regulation Orders (D-TRO)
MIT License
3 stars 1 forks source link

The only active `schemaVersion` in the Integration Environment is the `3.2.1` #10

Closed ruipinge closed 1 month ago

ruipinge commented 1 month ago

Steps to reproduce the behavior:

  1. Get the current available schemas:
    curl -X GET -H "Authorization: Bearer $TOKEN" -H "X-Correlation-ID: $APP_ID" "https://$INTEGRATION_ENV_HOST/v1/schemas" | jq '.[] | {schemaVersion, isActive}'

The (filtered) result is as follows:

{
  "schemaVersion": "3.2.2",
  "isActive": false
}
{
  "schemaVersion": "5.4.2",
  "isActive": false
}
{
  "schemaVersion": "3.2.3",
  "isActive": false
}
{
  "schemaVersion": "3.2.11",
  "isActive": false
}
{
  "schemaVersion": "3.2.0",
  "isActive": false
}
{
  "schemaVersion": "3.21.1",
  "isActive": false
}
{
  "schemaVersion": "3.2.9",
  "isActive": false
}
{
  "schemaVersion": "4.0.0",
  "isActive": false
}
{
  "schemaVersion": "4.1.0",
  "isActive": false
}
{
  "schemaVersion": "3.2.1",
  "isActive": true
}
  1. Create a new D-TRO (using a provided official example):
    curl -X POST "https://$INTEGRATION_ENV_HOST/v1/dtros/createFromBody" -H "Authorization: Bearer $TOKEN" -H "X-Correlation-ID: $APP_ID" -H "accept: application/json"  -H "Content-Type: application/json" --data @./JSON-3.2.3-example-linear-dtro.json

The response is as follows:

{"requestComparedToSchemaVersion":{"message":"Not found","error":"Schema version is not active"}}%

Since the current schemaVersion is 3.2.3 it would be expected for that to be supported already.

stm-john-cooper commented 1 month ago

Thanks Rui. The 3.2.3 schema is now active. We will clean up the other test schemas.

ruipinge commented 1 month ago

@stm-john-cooper, Thanks for the quick turnaround!