Skip to content

Teams schemas versions 1.23 and 1.24 fails to compile with jsonschema-jv #477

@qha

Description

@qha

https://developer.microsoft.com/json-schemas/teams/v1.23/MicrosoftTeams.schema.json and https://developer.microsoft.com/json-schemas/teams/v1.24/MicrosoftTeams.schema.json which seem to correspond to teams/v1.23/MicrosoftTeams.schema.json and teams/v1.24/MicrosoftTeams.schema.json in this repo will not be compiled with jsonschema-jv.

Instead of validating a supplied manifest jsonschema-jv complains:

jsonschema file:///home/qha/projects/teamshub/fudge/teams.schema.json compilation failed
[I#] [S#] doesn't validate with http://json-schema.org/draft-04/schema#
  [I#/definitions/extensionXllCustomFunctions] [S#/properties/definitions/additionalProperties/$ref] doesn't validate with ''
    [I#/definitions/extensionXllCustomFunctions/properties/fileName] [S#/properties/properties/additionalProperties/$ref] doesn't validate with ''
      [I#/definitions/extensionXllCustomFunctions/properties/fileName/pattern] [S#/properties/pattern/format] '^(?!.*[\\r\\n\\f\\b\\v\\a\\t])[\\S]*\\.xll$' is not valid 'regex'

Versions 1.19 and 1.22 however work.

This script illustrates the problem (output follows):

#! /bin/bash

# On Debian 13 this script needs packages curl, uuid, sed, jq and
# jsonschema-jv.

set -euo pipefail

rm -f manifest.json
curl --silent --location --output manifest.json https://github.com/OfficeDev/Microsoft-Teams-Samples/raw/refs/heads/main/samples/app-hello-world/python/appManifest/manifest.json

fudgedid="$(uuid)"

sed -i \
    -e "s,[$]{{TEAMS_APP_ID}},${fudgedid}," \
    -e "s,[$]{{AAD_APP_CLIENT_ID}},${fudgedid}," \
    manifest.json

schemauri="$(jq --raw-output '.["$schema"]' manifest.json)"
curl -o teams.schema.json "${schemauri}"
jv teams.schema.json manifest.json

sed -i -e 's,1[.]19,1.22,' manifest.json
schemauri="$(jq --raw-output '.["$schema"]' manifest.json)"
curl -o teams.schema.json "${schemauri}"
jv teams.schema.json manifest.json

sed -i -e 's,1[.]22,1.23,' manifest.json
schemauri="$(jq --raw-output '.["$schema"]' manifest.json)"
curl -o teams.schema.json "${schemauri}"
jv teams.schema.json manifest.json|| : schema compilation failed

sed -i -e 's,1[.]23,1.24,' manifest.json
schemauri="$(jq --raw-output '.["$schema"]' manifest.json)"
curl -o teams.schema.json "${schemauri}"
jv teams.schema.json manifest.json|| : schema compilation failed

Output on a Debian 13 host:

% bash -x schema-validation-fail 
+ set -euo pipefail
+ rm -f manifest.json
+ curl --silent --location --output manifest.json https://github.com/OfficeDev/Microsoft-Teams-Samples/raw/refs/heads/main/samples/app-hello-world/python/appManifest/manifest.json
++ uuid
+ fudgedid=95a13bf0-cc61-11f0-bca5-10b6764d3d98
+ sed -i -e 's,[$]{{TEAMS_APP_ID}},95a13bf0-cc61-11f0-bca5-10b6764d3d98,' -e 's,[$]{{AAD_APP_CLIENT_ID}},95a13bf0-cc61-11f0-bca5-10b6764d3d98,' manifest.json
++ jq --raw-output '.["$schema"]' manifest.json
+ schemauri=https://developer.microsoft.com/json-schemas/teams/v1.19/MicrosoftTeams.schema.json
+ curl -o teams.schema.json https://developer.microsoft.com/json-schemas/teams/v1.19/MicrosoftTeams.schema.json
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 72000    0 72000    0     0  1713k      0 --:--:-- --:--:-- --:--:-- 1757k
+ jv teams.schema.json manifest.json
+ sed -i -e 's,1[.]19,1.22,' manifest.json
++ jq --raw-output '.["$schema"]' manifest.json
+ schemauri=https://developer.microsoft.com/json-schemas/teams/v1.22/MicrosoftTeams.schema.json
+ curl -o teams.schema.json https://developer.microsoft.com/json-schemas/teams/v1.22/MicrosoftTeams.schema.json
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 90664    0 90664    0     0  1170k      0 --:--:-- --:--:-- --:--:-- 1180k
+ jv teams.schema.json manifest.json
+ sed -i -e 's,1[.]22,1.23,' manifest.json
++ jq --raw-output '.["$schema"]' manifest.json
+ schemauri=https://developer.microsoft.com/json-schemas/teams/v1.23/MicrosoftTeams.schema.json
+ curl -o teams.schema.json https://developer.microsoft.com/json-schemas/teams/v1.23/MicrosoftTeams.schema.json
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  103k    0  103k    0     0  2071k      0 --:--:-- --:--:-- --:--:-- 2113k
+ jv teams.schema.json manifest.json
jsonschema file:///home/qha/projects/teamshub/fudge/teams.schema.json compilation failed
[I#] [S#] doesn't validate with http://json-schema.org/draft-04/schema#
  [I#/definitions/extensionXllCustomFunctions] [S#/properties/definitions/additionalProperties/$ref] doesn't validate with ''
    [I#/definitions/extensionXllCustomFunctions/properties/fileName] [S#/properties/properties/additionalProperties/$ref] doesn't validate with ''
      [I#/definitions/extensionXllCustomFunctions/properties/fileName/pattern] [S#/properties/pattern/format] '^(?!.*[\\r\\n\\f\\b\\v\\a\\t])[\\S]*\\.xll$' is not valid 'regex'
+ : schema compilation failed
+ sed -i -e 's,1[.]23,1.24,' manifest.json
++ jq --raw-output '.["$schema"]' manifest.json
+ schemauri=https://developer.microsoft.com/json-schemas/teams/v1.24/MicrosoftTeams.schema.json
+ curl -o teams.schema.json https://developer.microsoft.com/json-schemas/teams/v1.24/MicrosoftTeams.schema.json
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  108k    0  108k    0     0  2875k      0 --:--:-- --:--:-- --:--:-- 2931k
+ jv teams.schema.json manifest.json
jsonschema file:///home/qha/projects/teamshub/fudge/teams.schema.json compilation failed
[I#] [S#] doesn't validate with http://json-schema.org/draft-04/schema#
  [I#/definitions/extensionXllCustomFunctions] [S#/properties/definitions/additionalProperties/$ref] doesn't validate with ''
    [I#/definitions/extensionXllCustomFunctions/properties/fileName] [S#/properties/properties/additionalProperties/$ref] doesn't validate with ''
      [I#/definitions/extensionXllCustomFunctions/properties/fileName/pattern] [S#/properties/pattern/format] '^(?!.*[\\r\\n\\f\\b\\v\\a\\t])[\\S]*\\.xll$' is not valid 'regex'
+ : schema compilation failed

Metadata

Metadata

Assignees

No one assigned

    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