rsmp_schema 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +6 -0
- data/.rspec +1 -0
- data/Gemfile +4 -0
- data/Gemfile.lock +49 -0
- data/LICENSE +7 -0
- data/README.md +73 -0
- data/Rakefile +18 -0
- data/examples/validate.rb +32 -0
- data/exe/rsmp_schema +4 -0
- data/lib/rsmp_schema/cli.rb +35 -0
- data/lib/rsmp_schema/convert/export/json_schema.rb +223 -0
- data/lib/rsmp_schema/convert/import/yaml.rb +41 -0
- data/lib/rsmp_schema/error.rb +13 -0
- data/lib/rsmp_schema/schema.rb +102 -0
- data/lib/rsmp_schema/version.rb +5 -0
- data/lib/rsmp_schema.rb +7 -0
- data/rsmp_schema.gemspec +40 -0
- data/schemas/core/3.1.1/aggregated_status.json +25 -0
- data/schemas/core/3.1.1/alarm.json +58 -0
- data/schemas/core/3.1.1/alarm_issue.json +47 -0
- data/schemas/core/3.1.1/alarm_suspend_resume.json +3 -0
- data/schemas/core/3.1.1/alarm_suspended_resumed.json +47 -0
- data/schemas/core/3.1.1/command_request.json +24 -0
- data/schemas/core/3.1.1/command_response.json +34 -0
- data/schemas/core/3.1.1/core.json +38 -0
- data/schemas/core/3.1.1/definitions.json +67 -0
- data/schemas/core/3.1.1/message_ack.json +11 -0
- data/schemas/core/3.1.1/message_not_ack.json +15 -0
- data/schemas/core/3.1.1/rsmp.json +124 -0
- data/schemas/core/3.1.1/status.json +21 -0
- data/schemas/core/3.1.1/status_request.json +5 -0
- data/schemas/core/3.1.1/status_response.json +30 -0
- data/schemas/core/3.1.1/status_subscribe.json +27 -0
- data/schemas/core/3.1.1/status_unsubscribe.json +5 -0
- data/schemas/core/3.1.1/status_update.json +30 -0
- data/schemas/core/3.1.1/version.json +47 -0
- data/schemas/core/3.1.1/watchdog.json +9 -0
- data/schemas/core/3.1.2/rsmp.json +3 -0
- data/schemas/core/3.1.3/rsmp.json +124 -0
- data/schemas/core/3.1.3/status_response.json +30 -0
- data/schemas/core/3.1.3/status_update.json +30 -0
- data/schemas/core/3.1.4/rsmp.json +3 -0
- data/schemas/core/3.1.5/aggregated_status_request.json +9 -0
- data/schemas/core/3.1.5/alarm.json +68 -0
- data/schemas/core/3.1.5/alarm_request.json +3 -0
- data/schemas/core/3.1.5/core.json +39 -0
- data/schemas/core/3.1.5/rsmp.json +133 -0
- data/schemas/core/3.1.5/status.json +21 -0
- data/schemas/core/3.1.5/status_subscribe.json +31 -0
- data/schemas/core/3.2/alarm.json +62 -0
- data/schemas/core/3.2/core.json +39 -0
- data/schemas/core/3.2/rsmp.json +133 -0
- data/schemas/tlc/1.0.10/alarms/A0001.json +7 -0
- data/schemas/tlc/1.0.10/alarms/A0002.json +7 -0
- data/schemas/tlc/1.0.10/alarms/A0003.json +7 -0
- data/schemas/tlc/1.0.10/alarms/A0004.json +7 -0
- data/schemas/tlc/1.0.10/alarms/A0005.json +7 -0
- data/schemas/tlc/1.0.10/alarms/A0006.json +7 -0
- data/schemas/tlc/1.0.10/alarms/A0007.json +7 -0
- data/schemas/tlc/1.0.10/alarms/A0008.json +40 -0
- data/schemas/tlc/1.0.10/alarms/A0009.json +7 -0
- data/schemas/tlc/1.0.10/alarms/A0101.json +7 -0
- data/schemas/tlc/1.0.10/alarms/A0201.json +39 -0
- data/schemas/tlc/1.0.10/alarms/A0202.json +39 -0
- data/schemas/tlc/1.0.10/alarms/A0301.json +111 -0
- data/schemas/tlc/1.0.10/alarms/A0302.json +137 -0
- data/schemas/tlc/1.0.10/alarms/alarms.json +238 -0
- data/schemas/tlc/1.0.10/commands/M0001.json +125 -0
- data/schemas/tlc/1.0.10/commands/M0002.json +91 -0
- data/schemas/tlc/1.0.10/commands/M0003.json +91 -0
- data/schemas/tlc/1.0.10/commands/M0004.json +64 -0
- data/schemas/tlc/1.0.10/commands/M0005.json +91 -0
- data/schemas/tlc/1.0.10/commands/M0006.json +91 -0
- data/schemas/tlc/1.0.10/commands/M0007.json +64 -0
- data/schemas/tlc/1.0.10/commands/M0008.json +91 -0
- data/schemas/tlc/1.0.10/commands/M0010.json +64 -0
- data/schemas/tlc/1.0.10/commands/M0011.json +64 -0
- data/schemas/tlc/1.0.10/commands/M0012.json +58 -0
- data/schemas/tlc/1.0.10/commands/M0013.json +58 -0
- data/schemas/tlc/1.0.10/commands/M0019.json +118 -0
- data/schemas/tlc/1.0.10/commands/M0103.json +82 -0
- data/schemas/tlc/1.0.10/commands/M0104.json +199 -0
- data/schemas/tlc/1.0.10/commands/command_requests.json +7 -0
- data/schemas/tlc/1.0.10/commands/command_responses.json +7 -0
- data/schemas/tlc/1.0.10/commands/commands.json +254 -0
- data/schemas/tlc/1.0.10/statuses/S0001.json +116 -0
- data/schemas/tlc/1.0.10/statuses/S0002.json +34 -0
- data/schemas/tlc/1.0.10/statuses/S0003.json +55 -0
- data/schemas/tlc/1.0.10/statuses/S0004.json +55 -0
- data/schemas/tlc/1.0.10/statuses/S0005.json +40 -0
- data/schemas/tlc/1.0.10/statuses/S0006.json +67 -0
- data/schemas/tlc/1.0.10/statuses/S0007.json +67 -0
- data/schemas/tlc/1.0.10/statuses/S0008.json +67 -0
- data/schemas/tlc/1.0.10/statuses/S0009.json +67 -0
- data/schemas/tlc/1.0.10/statuses/S0010.json +67 -0
- data/schemas/tlc/1.0.10/statuses/S0011.json +67 -0
- data/schemas/tlc/1.0.10/statuses/S0012.json +67 -0
- data/schemas/tlc/1.0.10/statuses/S0013.json +67 -0
- data/schemas/tlc/1.0.10/statuses/S0014.json +40 -0
- data/schemas/tlc/1.0.10/statuses/S0015.json +40 -0
- data/schemas/tlc/1.0.10/statuses/S0016.json +40 -0
- data/schemas/tlc/1.0.10/statuses/S0017.json +40 -0
- data/schemas/tlc/1.0.10/statuses/S0018.json +40 -0
- data/schemas/tlc/1.0.10/statuses/S0019.json +40 -0
- data/schemas/tlc/1.0.10/statuses/S0020.json +67 -0
- data/schemas/tlc/1.0.10/statuses/S0021.json +35 -0
- data/schemas/tlc/1.0.10/statuses/S0091.json +58 -0
- data/schemas/tlc/1.0.10/statuses/S0092.json +58 -0
- data/schemas/tlc/1.0.10/statuses/S0095.json +34 -0
- data/schemas/tlc/1.0.10/statuses/S0096.json +175 -0
- data/schemas/tlc/1.0.10/statuses/S0201.json +67 -0
- data/schemas/tlc/1.0.10/statuses/S0202.json +67 -0
- data/schemas/tlc/1.0.10/statuses/S0203.json +67 -0
- data/schemas/tlc/1.0.10/statuses/S0204.json +283 -0
- data/schemas/tlc/1.0.10/statuses/statuses.json +482 -0
- data/schemas/tlc/1.0.10/sxl.json +73 -0
- data/schemas/tlc/1.0.10/sxl.yaml +1059 -0
- data/schemas/tlc/1.0.13/alarms/A0001.json +7 -0
- data/schemas/tlc/1.0.13/alarms/A0002.json +7 -0
- data/schemas/tlc/1.0.13/alarms/A0003.json +7 -0
- data/schemas/tlc/1.0.13/alarms/A0004.json +7 -0
- data/schemas/tlc/1.0.13/alarms/A0005.json +7 -0
- data/schemas/tlc/1.0.13/alarms/A0006.json +7 -0
- data/schemas/tlc/1.0.13/alarms/A0007.json +7 -0
- data/schemas/tlc/1.0.13/alarms/A0008.json +40 -0
- data/schemas/tlc/1.0.13/alarms/A0009.json +7 -0
- data/schemas/tlc/1.0.13/alarms/A0101.json +7 -0
- data/schemas/tlc/1.0.13/alarms/A0201.json +39 -0
- data/schemas/tlc/1.0.13/alarms/A0202.json +39 -0
- data/schemas/tlc/1.0.13/alarms/A0301.json +111 -0
- data/schemas/tlc/1.0.13/alarms/A0302.json +137 -0
- data/schemas/tlc/1.0.13/alarms/alarms.json +238 -0
- data/schemas/tlc/1.0.13/commands/M0001.json +125 -0
- data/schemas/tlc/1.0.13/commands/M0002.json +91 -0
- data/schemas/tlc/1.0.13/commands/M0003.json +91 -0
- data/schemas/tlc/1.0.13/commands/M0004.json +64 -0
- data/schemas/tlc/1.0.13/commands/M0005.json +91 -0
- data/schemas/tlc/1.0.13/commands/M0006.json +91 -0
- data/schemas/tlc/1.0.13/commands/M0007.json +64 -0
- data/schemas/tlc/1.0.13/commands/M0008.json +91 -0
- data/schemas/tlc/1.0.13/commands/M0010.json +64 -0
- data/schemas/tlc/1.0.13/commands/M0011.json +64 -0
- data/schemas/tlc/1.0.13/commands/M0012.json +58 -0
- data/schemas/tlc/1.0.13/commands/M0013.json +58 -0
- data/schemas/tlc/1.0.13/commands/M0014.json +85 -0
- data/schemas/tlc/1.0.13/commands/M0015.json +91 -0
- data/schemas/tlc/1.0.13/commands/M0016.json +58 -0
- data/schemas/tlc/1.0.13/commands/M0017.json +58 -0
- data/schemas/tlc/1.0.13/commands/M0018.json +91 -0
- data/schemas/tlc/1.0.13/commands/M0019.json +118 -0
- data/schemas/tlc/1.0.13/commands/M0103.json +82 -0
- data/schemas/tlc/1.0.13/commands/M0104.json +199 -0
- data/schemas/tlc/1.0.13/commands/command_requests.json +7 -0
- data/schemas/tlc/1.0.13/commands/command_responses.json +7 -0
- data/schemas/tlc/1.0.13/commands/commands.json +334 -0
- data/schemas/tlc/1.0.13/statuses/S0001.json +116 -0
- data/schemas/tlc/1.0.13/statuses/S0002.json +34 -0
- data/schemas/tlc/1.0.13/statuses/S0003.json +55 -0
- data/schemas/tlc/1.0.13/statuses/S0004.json +55 -0
- data/schemas/tlc/1.0.13/statuses/S0005.json +40 -0
- data/schemas/tlc/1.0.13/statuses/S0006.json +67 -0
- data/schemas/tlc/1.0.13/statuses/S0007.json +67 -0
- data/schemas/tlc/1.0.13/statuses/S0008.json +67 -0
- data/schemas/tlc/1.0.13/statuses/S0009.json +67 -0
- data/schemas/tlc/1.0.13/statuses/S0010.json +67 -0
- data/schemas/tlc/1.0.13/statuses/S0011.json +67 -0
- data/schemas/tlc/1.0.13/statuses/S0012.json +67 -0
- data/schemas/tlc/1.0.13/statuses/S0013.json +67 -0
- data/schemas/tlc/1.0.13/statuses/S0014.json +40 -0
- data/schemas/tlc/1.0.13/statuses/S0015.json +40 -0
- data/schemas/tlc/1.0.13/statuses/S0016.json +40 -0
- data/schemas/tlc/1.0.13/statuses/S0017.json +40 -0
- data/schemas/tlc/1.0.13/statuses/S0018.json +40 -0
- data/schemas/tlc/1.0.13/statuses/S0019.json +40 -0
- data/schemas/tlc/1.0.13/statuses/S0020.json +67 -0
- data/schemas/tlc/1.0.13/statuses/S0021.json +35 -0
- data/schemas/tlc/1.0.13/statuses/S0022.json +34 -0
- data/schemas/tlc/1.0.13/statuses/S0023.json +35 -0
- data/schemas/tlc/1.0.13/statuses/S0024.json +35 -0
- data/schemas/tlc/1.0.13/statuses/S0025.json +229 -0
- data/schemas/tlc/1.0.13/statuses/S0026.json +34 -0
- data/schemas/tlc/1.0.13/statuses/S0027.json +34 -0
- data/schemas/tlc/1.0.13/statuses/S0028.json +34 -0
- data/schemas/tlc/1.0.13/statuses/S0029.json +34 -0
- data/schemas/tlc/1.0.13/statuses/S0091.json +58 -0
- data/schemas/tlc/1.0.13/statuses/S0092.json +58 -0
- data/schemas/tlc/1.0.13/statuses/S0095.json +34 -0
- data/schemas/tlc/1.0.13/statuses/S0096.json +175 -0
- data/schemas/tlc/1.0.13/statuses/S0201.json +67 -0
- data/schemas/tlc/1.0.13/statuses/S0202.json +67 -0
- data/schemas/tlc/1.0.13/statuses/S0203.json +67 -0
- data/schemas/tlc/1.0.13/statuses/S0204.json +283 -0
- data/schemas/tlc/1.0.13/statuses/statuses.json +610 -0
- data/schemas/tlc/1.0.13/sxl.json +73 -0
- data/schemas/tlc/1.0.13/sxl.yaml +1376 -0
- data/schemas/tlc/1.0.14/alarms/A0001.json +7 -0
- data/schemas/tlc/1.0.14/alarms/A0002.json +7 -0
- data/schemas/tlc/1.0.14/alarms/A0003.json +7 -0
- data/schemas/tlc/1.0.14/alarms/A0004.json +7 -0
- data/schemas/tlc/1.0.14/alarms/A0005.json +7 -0
- data/schemas/tlc/1.0.14/alarms/A0006.json +7 -0
- data/schemas/tlc/1.0.14/alarms/A0007.json +7 -0
- data/schemas/tlc/1.0.14/alarms/A0008.json +40 -0
- data/schemas/tlc/1.0.14/alarms/A0009.json +7 -0
- data/schemas/tlc/1.0.14/alarms/A0101.json +7 -0
- data/schemas/tlc/1.0.14/alarms/A0201.json +39 -0
- data/schemas/tlc/1.0.14/alarms/A0202.json +39 -0
- data/schemas/tlc/1.0.14/alarms/A0301.json +111 -0
- data/schemas/tlc/1.0.14/alarms/A0302.json +137 -0
- data/schemas/tlc/1.0.14/alarms/alarms.json +238 -0
- data/schemas/tlc/1.0.14/commands/M0001.json +125 -0
- data/schemas/tlc/1.0.14/commands/M0002.json +91 -0
- data/schemas/tlc/1.0.14/commands/M0003.json +91 -0
- data/schemas/tlc/1.0.14/commands/M0004.json +64 -0
- data/schemas/tlc/1.0.14/commands/M0005.json +91 -0
- data/schemas/tlc/1.0.14/commands/M0006.json +91 -0
- data/schemas/tlc/1.0.14/commands/M0007.json +64 -0
- data/schemas/tlc/1.0.14/commands/M0008.json +91 -0
- data/schemas/tlc/1.0.14/commands/M0010.json +64 -0
- data/schemas/tlc/1.0.14/commands/M0011.json +64 -0
- data/schemas/tlc/1.0.14/commands/M0012.json +58 -0
- data/schemas/tlc/1.0.14/commands/M0013.json +58 -0
- data/schemas/tlc/1.0.14/commands/M0014.json +85 -0
- data/schemas/tlc/1.0.14/commands/M0015.json +91 -0
- data/schemas/tlc/1.0.14/commands/M0016.json +58 -0
- data/schemas/tlc/1.0.14/commands/M0017.json +58 -0
- data/schemas/tlc/1.0.14/commands/M0018.json +91 -0
- data/schemas/tlc/1.0.14/commands/M0019.json +118 -0
- data/schemas/tlc/1.0.14/commands/M0103.json +82 -0
- data/schemas/tlc/1.0.14/commands/M0104.json +199 -0
- data/schemas/tlc/1.0.14/commands/command_requests.json +7 -0
- data/schemas/tlc/1.0.14/commands/command_responses.json +7 -0
- data/schemas/tlc/1.0.14/commands/commands.json +334 -0
- data/schemas/tlc/1.0.14/statuses/S0001.json +116 -0
- data/schemas/tlc/1.0.14/statuses/S0002.json +34 -0
- data/schemas/tlc/1.0.14/statuses/S0003.json +55 -0
- data/schemas/tlc/1.0.14/statuses/S0004.json +55 -0
- data/schemas/tlc/1.0.14/statuses/S0005.json +40 -0
- data/schemas/tlc/1.0.14/statuses/S0006.json +67 -0
- data/schemas/tlc/1.0.14/statuses/S0007.json +67 -0
- data/schemas/tlc/1.0.14/statuses/S0008.json +67 -0
- data/schemas/tlc/1.0.14/statuses/S0009.json +67 -0
- data/schemas/tlc/1.0.14/statuses/S0010.json +67 -0
- data/schemas/tlc/1.0.14/statuses/S0011.json +67 -0
- data/schemas/tlc/1.0.14/statuses/S0012.json +67 -0
- data/schemas/tlc/1.0.14/statuses/S0013.json +67 -0
- data/schemas/tlc/1.0.14/statuses/S0014.json +40 -0
- data/schemas/tlc/1.0.14/statuses/S0015.json +40 -0
- data/schemas/tlc/1.0.14/statuses/S0016.json +40 -0
- data/schemas/tlc/1.0.14/statuses/S0017.json +40 -0
- data/schemas/tlc/1.0.14/statuses/S0018.json +40 -0
- data/schemas/tlc/1.0.14/statuses/S0019.json +40 -0
- data/schemas/tlc/1.0.14/statuses/S0020.json +67 -0
- data/schemas/tlc/1.0.14/statuses/S0021.json +35 -0
- data/schemas/tlc/1.0.14/statuses/S0022.json +34 -0
- data/schemas/tlc/1.0.14/statuses/S0023.json +35 -0
- data/schemas/tlc/1.0.14/statuses/S0024.json +35 -0
- data/schemas/tlc/1.0.14/statuses/S0025.json +229 -0
- data/schemas/tlc/1.0.14/statuses/S0026.json +34 -0
- data/schemas/tlc/1.0.14/statuses/S0027.json +34 -0
- data/schemas/tlc/1.0.14/statuses/S0028.json +34 -0
- data/schemas/tlc/1.0.14/statuses/S0029.json +34 -0
- data/schemas/tlc/1.0.14/statuses/S0091.json +58 -0
- data/schemas/tlc/1.0.14/statuses/S0092.json +58 -0
- data/schemas/tlc/1.0.14/statuses/S0095.json +34 -0
- data/schemas/tlc/1.0.14/statuses/S0096.json +175 -0
- data/schemas/tlc/1.0.14/statuses/S0201.json +67 -0
- data/schemas/tlc/1.0.14/statuses/S0202.json +67 -0
- data/schemas/tlc/1.0.14/statuses/S0203.json +67 -0
- data/schemas/tlc/1.0.14/statuses/S0204.json +283 -0
- data/schemas/tlc/1.0.14/statuses/S0205.json +61 -0
- data/schemas/tlc/1.0.14/statuses/S0206.json +61 -0
- data/schemas/tlc/1.0.14/statuses/S0207.json +61 -0
- data/schemas/tlc/1.0.14/statuses/S0208.json +229 -0
- data/schemas/tlc/1.0.14/statuses/statuses.json +674 -0
- data/schemas/tlc/1.0.14/sxl.json +73 -0
- data/schemas/tlc/1.0.14/sxl.yaml +1514 -0
- data/schemas/tlc/1.0.15/alarms/A0001.json +7 -0
- data/schemas/tlc/1.0.15/alarms/A0002.json +7 -0
- data/schemas/tlc/1.0.15/alarms/A0003.json +7 -0
- data/schemas/tlc/1.0.15/alarms/A0004.json +7 -0
- data/schemas/tlc/1.0.15/alarms/A0005.json +7 -0
- data/schemas/tlc/1.0.15/alarms/A0006.json +7 -0
- data/schemas/tlc/1.0.15/alarms/A0007.json +7 -0
- data/schemas/tlc/1.0.15/alarms/A0008.json +40 -0
- data/schemas/tlc/1.0.15/alarms/A0009.json +7 -0
- data/schemas/tlc/1.0.15/alarms/A0010.json +7 -0
- data/schemas/tlc/1.0.15/alarms/A0101.json +7 -0
- data/schemas/tlc/1.0.15/alarms/A0201.json +39 -0
- data/schemas/tlc/1.0.15/alarms/A0202.json +39 -0
- data/schemas/tlc/1.0.15/alarms/A0301.json +111 -0
- data/schemas/tlc/1.0.15/alarms/A0302.json +137 -0
- data/schemas/tlc/1.0.15/alarms/alarms.json +254 -0
- data/schemas/tlc/1.0.15/commands/M0001.json +125 -0
- data/schemas/tlc/1.0.15/commands/M0002.json +91 -0
- data/schemas/tlc/1.0.15/commands/M0003.json +91 -0
- data/schemas/tlc/1.0.15/commands/M0004.json +64 -0
- data/schemas/tlc/1.0.15/commands/M0005.json +91 -0
- data/schemas/tlc/1.0.15/commands/M0006.json +91 -0
- data/schemas/tlc/1.0.15/commands/M0007.json +64 -0
- data/schemas/tlc/1.0.15/commands/M0008.json +91 -0
- data/schemas/tlc/1.0.15/commands/M0010.json +64 -0
- data/schemas/tlc/1.0.15/commands/M0011.json +64 -0
- data/schemas/tlc/1.0.15/commands/M0012.json +58 -0
- data/schemas/tlc/1.0.15/commands/M0013.json +58 -0
- data/schemas/tlc/1.0.15/commands/M0014.json +85 -0
- data/schemas/tlc/1.0.15/commands/M0015.json +91 -0
- data/schemas/tlc/1.0.15/commands/M0016.json +58 -0
- data/schemas/tlc/1.0.15/commands/M0017.json +58 -0
- data/schemas/tlc/1.0.15/commands/M0018.json +91 -0
- data/schemas/tlc/1.0.15/commands/M0019.json +118 -0
- data/schemas/tlc/1.0.15/commands/M0020.json +118 -0
- data/schemas/tlc/1.0.15/commands/M0021.json +58 -0
- data/schemas/tlc/1.0.15/commands/M0103.json +82 -0
- data/schemas/tlc/1.0.15/commands/M0104.json +199 -0
- data/schemas/tlc/1.0.15/commands/command_requests.json +7 -0
- data/schemas/tlc/1.0.15/commands/command_responses.json +7 -0
- data/schemas/tlc/1.0.15/commands/commands.json +366 -0
- data/schemas/tlc/1.0.15/statuses/S0001.json +116 -0
- data/schemas/tlc/1.0.15/statuses/S0002.json +34 -0
- data/schemas/tlc/1.0.15/statuses/S0003.json +55 -0
- data/schemas/tlc/1.0.15/statuses/S0004.json +55 -0
- data/schemas/tlc/1.0.15/statuses/S0005.json +40 -0
- data/schemas/tlc/1.0.15/statuses/S0006.json +67 -0
- data/schemas/tlc/1.0.15/statuses/S0007.json +67 -0
- data/schemas/tlc/1.0.15/statuses/S0008.json +67 -0
- data/schemas/tlc/1.0.15/statuses/S0009.json +67 -0
- data/schemas/tlc/1.0.15/statuses/S0010.json +67 -0
- data/schemas/tlc/1.0.15/statuses/S0011.json +67 -0
- data/schemas/tlc/1.0.15/statuses/S0012.json +67 -0
- data/schemas/tlc/1.0.15/statuses/S0013.json +67 -0
- data/schemas/tlc/1.0.15/statuses/S0014.json +40 -0
- data/schemas/tlc/1.0.15/statuses/S0015.json +40 -0
- data/schemas/tlc/1.0.15/statuses/S0016.json +40 -0
- data/schemas/tlc/1.0.15/statuses/S0017.json +40 -0
- data/schemas/tlc/1.0.15/statuses/S0018.json +40 -0
- data/schemas/tlc/1.0.15/statuses/S0019.json +40 -0
- data/schemas/tlc/1.0.15/statuses/S0020.json +67 -0
- data/schemas/tlc/1.0.15/statuses/S0021.json +35 -0
- data/schemas/tlc/1.0.15/statuses/S0022.json +34 -0
- data/schemas/tlc/1.0.15/statuses/S0023.json +35 -0
- data/schemas/tlc/1.0.15/statuses/S0024.json +35 -0
- data/schemas/tlc/1.0.15/statuses/S0025.json +229 -0
- data/schemas/tlc/1.0.15/statuses/S0026.json +34 -0
- data/schemas/tlc/1.0.15/statuses/S0027.json +34 -0
- data/schemas/tlc/1.0.15/statuses/S0028.json +34 -0
- data/schemas/tlc/1.0.15/statuses/S0029.json +34 -0
- data/schemas/tlc/1.0.15/statuses/S0030.json +34 -0
- data/schemas/tlc/1.0.15/statuses/S0031.json +34 -0
- data/schemas/tlc/1.0.15/statuses/S0091.json +58 -0
- data/schemas/tlc/1.0.15/statuses/S0092.json +58 -0
- data/schemas/tlc/1.0.15/statuses/S0095.json +34 -0
- data/schemas/tlc/1.0.15/statuses/S0096.json +175 -0
- data/schemas/tlc/1.0.15/statuses/S0097.json +61 -0
- data/schemas/tlc/1.0.15/statuses/S0098.json +82 -0
- data/schemas/tlc/1.0.15/statuses/S0201.json +67 -0
- data/schemas/tlc/1.0.15/statuses/S0202.json +67 -0
- data/schemas/tlc/1.0.15/statuses/S0203.json +67 -0
- data/schemas/tlc/1.0.15/statuses/S0204.json +283 -0
- data/schemas/tlc/1.0.15/statuses/S0205.json +61 -0
- data/schemas/tlc/1.0.15/statuses/S0206.json +61 -0
- data/schemas/tlc/1.0.15/statuses/S0207.json +61 -0
- data/schemas/tlc/1.0.15/statuses/S0208.json +229 -0
- data/schemas/tlc/1.0.15/statuses/statuses.json +738 -0
- data/schemas/tlc/1.0.15/sxl.json +73 -0
- data/schemas/tlc/1.0.15/sxl.yaml +1660 -0
- data/schemas/tlc/1.0.7/alarms/A0001.json +7 -0
- data/schemas/tlc/1.0.7/alarms/A0002.json +7 -0
- data/schemas/tlc/1.0.7/alarms/A0003.json +7 -0
- data/schemas/tlc/1.0.7/alarms/A0004.json +7 -0
- data/schemas/tlc/1.0.7/alarms/A0005.json +7 -0
- data/schemas/tlc/1.0.7/alarms/A0006.json +7 -0
- data/schemas/tlc/1.0.7/alarms/A0007.json +7 -0
- data/schemas/tlc/1.0.7/alarms/A0008.json +40 -0
- data/schemas/tlc/1.0.7/alarms/A0009.json +7 -0
- data/schemas/tlc/1.0.7/alarms/A0101.json +7 -0
- data/schemas/tlc/1.0.7/alarms/A0201.json +39 -0
- data/schemas/tlc/1.0.7/alarms/A0202.json +39 -0
- data/schemas/tlc/1.0.7/alarms/A0301.json +111 -0
- data/schemas/tlc/1.0.7/alarms/A0302.json +137 -0
- data/schemas/tlc/1.0.7/alarms/alarms.json +238 -0
- data/schemas/tlc/1.0.7/commands/M0001.json +125 -0
- data/schemas/tlc/1.0.7/commands/M0002.json +91 -0
- data/schemas/tlc/1.0.7/commands/M0003.json +91 -0
- data/schemas/tlc/1.0.7/commands/M0004.json +64 -0
- data/schemas/tlc/1.0.7/commands/M0005.json +91 -0
- data/schemas/tlc/1.0.7/commands/M0006.json +91 -0
- data/schemas/tlc/1.0.7/commands/M0007.json +64 -0
- data/schemas/tlc/1.0.7/commands/M0008.json +91 -0
- data/schemas/tlc/1.0.7/commands/M0010.json +64 -0
- data/schemas/tlc/1.0.7/commands/M0011.json +64 -0
- data/schemas/tlc/1.0.7/commands/M0019.json +118 -0
- data/schemas/tlc/1.0.7/commands/M0103.json +82 -0
- data/schemas/tlc/1.0.7/commands/M0104.json +199 -0
- data/schemas/tlc/1.0.7/commands/command_requests.json +7 -0
- data/schemas/tlc/1.0.7/commands/command_responses.json +7 -0
- data/schemas/tlc/1.0.7/commands/commands.json +222 -0
- data/schemas/tlc/1.0.7/statuses/S0001.json +116 -0
- data/schemas/tlc/1.0.7/statuses/S0002.json +34 -0
- data/schemas/tlc/1.0.7/statuses/S0003.json +55 -0
- data/schemas/tlc/1.0.7/statuses/S0004.json +55 -0
- data/schemas/tlc/1.0.7/statuses/S0005.json +40 -0
- data/schemas/tlc/1.0.7/statuses/S0006.json +67 -0
- data/schemas/tlc/1.0.7/statuses/S0007.json +67 -0
- data/schemas/tlc/1.0.7/statuses/S0008.json +67 -0
- data/schemas/tlc/1.0.7/statuses/S0009.json +67 -0
- data/schemas/tlc/1.0.7/statuses/S0010.json +67 -0
- data/schemas/tlc/1.0.7/statuses/S0011.json +67 -0
- data/schemas/tlc/1.0.7/statuses/S0012.json +67 -0
- data/schemas/tlc/1.0.7/statuses/S0013.json +67 -0
- data/schemas/tlc/1.0.7/statuses/S0014.json +40 -0
- data/schemas/tlc/1.0.7/statuses/S0015.json +40 -0
- data/schemas/tlc/1.0.7/statuses/S0016.json +40 -0
- data/schemas/tlc/1.0.7/statuses/S0017.json +40 -0
- data/schemas/tlc/1.0.7/statuses/S0018.json +40 -0
- data/schemas/tlc/1.0.7/statuses/S0019.json +40 -0
- data/schemas/tlc/1.0.7/statuses/S0020.json +67 -0
- data/schemas/tlc/1.0.7/statuses/S0021.json +35 -0
- data/schemas/tlc/1.0.7/statuses/S0025.json +229 -0
- data/schemas/tlc/1.0.7/statuses/S0091.json +58 -0
- data/schemas/tlc/1.0.7/statuses/S0092.json +58 -0
- data/schemas/tlc/1.0.7/statuses/S0095.json +34 -0
- data/schemas/tlc/1.0.7/statuses/S0096.json +175 -0
- data/schemas/tlc/1.0.7/statuses/S0201.json +67 -0
- data/schemas/tlc/1.0.7/statuses/S0202.json +67 -0
- data/schemas/tlc/1.0.7/statuses/S0203.json +67 -0
- data/schemas/tlc/1.0.7/statuses/S0204.json +283 -0
- data/schemas/tlc/1.0.7/statuses/statuses.json +498 -0
- data/schemas/tlc/1.0.7/sxl.json +73 -0
- data/schemas/tlc/1.0.7/sxl.yaml +1026 -0
- data/schemas/tlc/1.0.8/alarms/A0001.json +7 -0
- data/schemas/tlc/1.0.8/alarms/A0002.json +7 -0
- data/schemas/tlc/1.0.8/alarms/A0003.json +7 -0
- data/schemas/tlc/1.0.8/alarms/A0004.json +7 -0
- data/schemas/tlc/1.0.8/alarms/A0005.json +7 -0
- data/schemas/tlc/1.0.8/alarms/A0006.json +7 -0
- data/schemas/tlc/1.0.8/alarms/A0007.json +7 -0
- data/schemas/tlc/1.0.8/alarms/A0008.json +40 -0
- data/schemas/tlc/1.0.8/alarms/A0009.json +7 -0
- data/schemas/tlc/1.0.8/alarms/A0101.json +7 -0
- data/schemas/tlc/1.0.8/alarms/A0201.json +39 -0
- data/schemas/tlc/1.0.8/alarms/A0202.json +39 -0
- data/schemas/tlc/1.0.8/alarms/A0301.json +111 -0
- data/schemas/tlc/1.0.8/alarms/A0302.json +137 -0
- data/schemas/tlc/1.0.8/alarms/alarms.json +238 -0
- data/schemas/tlc/1.0.8/commands/M0001.json +125 -0
- data/schemas/tlc/1.0.8/commands/M0002.json +91 -0
- data/schemas/tlc/1.0.8/commands/M0003.json +91 -0
- data/schemas/tlc/1.0.8/commands/M0004.json +64 -0
- data/schemas/tlc/1.0.8/commands/M0005.json +91 -0
- data/schemas/tlc/1.0.8/commands/M0006.json +91 -0
- data/schemas/tlc/1.0.8/commands/M0007.json +64 -0
- data/schemas/tlc/1.0.8/commands/M0008.json +91 -0
- data/schemas/tlc/1.0.8/commands/M0010.json +64 -0
- data/schemas/tlc/1.0.8/commands/M0011.json +64 -0
- data/schemas/tlc/1.0.8/commands/M0012.json +58 -0
- data/schemas/tlc/1.0.8/commands/M0013.json +58 -0
- data/schemas/tlc/1.0.8/commands/M0019.json +118 -0
- data/schemas/tlc/1.0.8/commands/M0103.json +82 -0
- data/schemas/tlc/1.0.8/commands/M0104.json +199 -0
- data/schemas/tlc/1.0.8/commands/command_requests.json +7 -0
- data/schemas/tlc/1.0.8/commands/command_responses.json +7 -0
- data/schemas/tlc/1.0.8/commands/commands.json +254 -0
- data/schemas/tlc/1.0.8/statuses/S0001.json +116 -0
- data/schemas/tlc/1.0.8/statuses/S0002.json +34 -0
- data/schemas/tlc/1.0.8/statuses/S0003.json +55 -0
- data/schemas/tlc/1.0.8/statuses/S0004.json +55 -0
- data/schemas/tlc/1.0.8/statuses/S0005.json +40 -0
- data/schemas/tlc/1.0.8/statuses/S0006.json +67 -0
- data/schemas/tlc/1.0.8/statuses/S0007.json +67 -0
- data/schemas/tlc/1.0.8/statuses/S0008.json +67 -0
- data/schemas/tlc/1.0.8/statuses/S0009.json +67 -0
- data/schemas/tlc/1.0.8/statuses/S0010.json +67 -0
- data/schemas/tlc/1.0.8/statuses/S0011.json +67 -0
- data/schemas/tlc/1.0.8/statuses/S0012.json +67 -0
- data/schemas/tlc/1.0.8/statuses/S0013.json +67 -0
- data/schemas/tlc/1.0.8/statuses/S0014.json +40 -0
- data/schemas/tlc/1.0.8/statuses/S0015.json +40 -0
- data/schemas/tlc/1.0.8/statuses/S0016.json +40 -0
- data/schemas/tlc/1.0.8/statuses/S0017.json +40 -0
- data/schemas/tlc/1.0.8/statuses/S0018.json +40 -0
- data/schemas/tlc/1.0.8/statuses/S0019.json +40 -0
- data/schemas/tlc/1.0.8/statuses/S0020.json +67 -0
- data/schemas/tlc/1.0.8/statuses/S0021.json +35 -0
- data/schemas/tlc/1.0.8/statuses/S0025.json +181 -0
- data/schemas/tlc/1.0.8/statuses/S0091.json +58 -0
- data/schemas/tlc/1.0.8/statuses/S0092.json +58 -0
- data/schemas/tlc/1.0.8/statuses/S0095.json +34 -0
- data/schemas/tlc/1.0.8/statuses/S0096.json +175 -0
- data/schemas/tlc/1.0.8/statuses/S0201.json +67 -0
- data/schemas/tlc/1.0.8/statuses/S0202.json +67 -0
- data/schemas/tlc/1.0.8/statuses/S0203.json +67 -0
- data/schemas/tlc/1.0.8/statuses/S0204.json +283 -0
- data/schemas/tlc/1.0.8/statuses/statuses.json +482 -0
- data/schemas/tlc/1.0.8/sxl.json +73 -0
- data/schemas/tlc/1.0.8/sxl.yaml +1059 -0
- data/schemas/tlc/1.0.9/alarms/A0001.json +7 -0
- data/schemas/tlc/1.0.9/alarms/A0002.json +7 -0
- data/schemas/tlc/1.0.9/alarms/A0003.json +7 -0
- data/schemas/tlc/1.0.9/alarms/A0004.json +7 -0
- data/schemas/tlc/1.0.9/alarms/A0005.json +7 -0
- data/schemas/tlc/1.0.9/alarms/A0006.json +7 -0
- data/schemas/tlc/1.0.9/alarms/A0007.json +7 -0
- data/schemas/tlc/1.0.9/alarms/A0008.json +40 -0
- data/schemas/tlc/1.0.9/alarms/A0009.json +7 -0
- data/schemas/tlc/1.0.9/alarms/A0101.json +7 -0
- data/schemas/tlc/1.0.9/alarms/A0201.json +39 -0
- data/schemas/tlc/1.0.9/alarms/A0202.json +39 -0
- data/schemas/tlc/1.0.9/alarms/A0301.json +111 -0
- data/schemas/tlc/1.0.9/alarms/A0302.json +137 -0
- data/schemas/tlc/1.0.9/alarms/alarms.json +238 -0
- data/schemas/tlc/1.0.9/commands/M0001.json +125 -0
- data/schemas/tlc/1.0.9/commands/M0002.json +91 -0
- data/schemas/tlc/1.0.9/commands/M0003.json +91 -0
- data/schemas/tlc/1.0.9/commands/M0004.json +64 -0
- data/schemas/tlc/1.0.9/commands/M0005.json +91 -0
- data/schemas/tlc/1.0.9/commands/M0006.json +91 -0
- data/schemas/tlc/1.0.9/commands/M0007.json +64 -0
- data/schemas/tlc/1.0.9/commands/M0008.json +91 -0
- data/schemas/tlc/1.0.9/commands/M0010.json +64 -0
- data/schemas/tlc/1.0.9/commands/M0011.json +64 -0
- data/schemas/tlc/1.0.9/commands/M0012.json +58 -0
- data/schemas/tlc/1.0.9/commands/M0013.json +58 -0
- data/schemas/tlc/1.0.9/commands/M0019.json +118 -0
- data/schemas/tlc/1.0.9/commands/M0103.json +82 -0
- data/schemas/tlc/1.0.9/commands/M0104.json +199 -0
- data/schemas/tlc/1.0.9/commands/command_requests.json +7 -0
- data/schemas/tlc/1.0.9/commands/command_responses.json +7 -0
- data/schemas/tlc/1.0.9/commands/commands.json +254 -0
- data/schemas/tlc/1.0.9/statuses/S0001.json +116 -0
- data/schemas/tlc/1.0.9/statuses/S0002.json +34 -0
- data/schemas/tlc/1.0.9/statuses/S0003.json +55 -0
- data/schemas/tlc/1.0.9/statuses/S0004.json +55 -0
- data/schemas/tlc/1.0.9/statuses/S0005.json +40 -0
- data/schemas/tlc/1.0.9/statuses/S0006.json +67 -0
- data/schemas/tlc/1.0.9/statuses/S0007.json +67 -0
- data/schemas/tlc/1.0.9/statuses/S0008.json +67 -0
- data/schemas/tlc/1.0.9/statuses/S0009.json +67 -0
- data/schemas/tlc/1.0.9/statuses/S0010.json +67 -0
- data/schemas/tlc/1.0.9/statuses/S0011.json +67 -0
- data/schemas/tlc/1.0.9/statuses/S0012.json +67 -0
- data/schemas/tlc/1.0.9/statuses/S0013.json +67 -0
- data/schemas/tlc/1.0.9/statuses/S0014.json +40 -0
- data/schemas/tlc/1.0.9/statuses/S0015.json +40 -0
- data/schemas/tlc/1.0.9/statuses/S0016.json +40 -0
- data/schemas/tlc/1.0.9/statuses/S0017.json +40 -0
- data/schemas/tlc/1.0.9/statuses/S0018.json +40 -0
- data/schemas/tlc/1.0.9/statuses/S0019.json +40 -0
- data/schemas/tlc/1.0.9/statuses/S0020.json +67 -0
- data/schemas/tlc/1.0.9/statuses/S0021.json +35 -0
- data/schemas/tlc/1.0.9/statuses/S0025.json +181 -0
- data/schemas/tlc/1.0.9/statuses/S0091.json +58 -0
- data/schemas/tlc/1.0.9/statuses/S0092.json +58 -0
- data/schemas/tlc/1.0.9/statuses/S0095.json +34 -0
- data/schemas/tlc/1.0.9/statuses/S0096.json +175 -0
- data/schemas/tlc/1.0.9/statuses/S0201.json +67 -0
- data/schemas/tlc/1.0.9/statuses/S0202.json +67 -0
- data/schemas/tlc/1.0.9/statuses/S0203.json +67 -0
- data/schemas/tlc/1.0.9/statuses/S0204.json +283 -0
- data/schemas/tlc/1.0.9/statuses/statuses.json +482 -0
- data/schemas/tlc/1.0.9/sxl.json +73 -0
- data/schemas/tlc/1.0.9/sxl.yaml +1059 -0
- data/schemas/tlc/1.1/alarms/A0001.json +7 -0
- data/schemas/tlc/1.1/alarms/A0002.json +7 -0
- data/schemas/tlc/1.1/alarms/A0003.json +7 -0
- data/schemas/tlc/1.1/alarms/A0004.json +7 -0
- data/schemas/tlc/1.1/alarms/A0005.json +7 -0
- data/schemas/tlc/1.1/alarms/A0006.json +7 -0
- data/schemas/tlc/1.1/alarms/A0007.json +38 -0
- data/schemas/tlc/1.1/alarms/A0008.json +40 -0
- data/schemas/tlc/1.1/alarms/A0009.json +7 -0
- data/schemas/tlc/1.1/alarms/A0010.json +7 -0
- data/schemas/tlc/1.1/alarms/A0101.json +7 -0
- data/schemas/tlc/1.1/alarms/A0201.json +39 -0
- data/schemas/tlc/1.1/alarms/A0202.json +39 -0
- data/schemas/tlc/1.1/alarms/A0301.json +111 -0
- data/schemas/tlc/1.1/alarms/A0302.json +137 -0
- data/schemas/tlc/1.1/alarms/alarms.json +254 -0
- data/schemas/tlc/1.1/commands/M0001.json +125 -0
- data/schemas/tlc/1.1/commands/M0002.json +91 -0
- data/schemas/tlc/1.1/commands/M0003.json +91 -0
- data/schemas/tlc/1.1/commands/M0004.json +64 -0
- data/schemas/tlc/1.1/commands/M0005.json +91 -0
- data/schemas/tlc/1.1/commands/M0006.json +91 -0
- data/schemas/tlc/1.1/commands/M0007.json +64 -0
- data/schemas/tlc/1.1/commands/M0008.json +91 -0
- data/schemas/tlc/1.1/commands/M0010.json +64 -0
- data/schemas/tlc/1.1/commands/M0011.json +64 -0
- data/schemas/tlc/1.1/commands/M0012.json +58 -0
- data/schemas/tlc/1.1/commands/M0013.json +58 -0
- data/schemas/tlc/1.1/commands/M0014.json +85 -0
- data/schemas/tlc/1.1/commands/M0015.json +91 -0
- data/schemas/tlc/1.1/commands/M0016.json +58 -0
- data/schemas/tlc/1.1/commands/M0017.json +58 -0
- data/schemas/tlc/1.1/commands/M0018.json +91 -0
- data/schemas/tlc/1.1/commands/M0019.json +118 -0
- data/schemas/tlc/1.1/commands/M0020.json +118 -0
- data/schemas/tlc/1.1/commands/M0021.json +58 -0
- data/schemas/tlc/1.1/commands/M0103.json +82 -0
- data/schemas/tlc/1.1/commands/M0104.json +199 -0
- data/schemas/tlc/1.1/commands/command_requests.json +7 -0
- data/schemas/tlc/1.1/commands/command_responses.json +7 -0
- data/schemas/tlc/1.1/commands/commands.json +366 -0
- data/schemas/tlc/1.1/statuses/S0001.json +116 -0
- data/schemas/tlc/1.1/statuses/S0002.json +34 -0
- data/schemas/tlc/1.1/statuses/S0003.json +55 -0
- data/schemas/tlc/1.1/statuses/S0004.json +55 -0
- data/schemas/tlc/1.1/statuses/S0005.json +40 -0
- data/schemas/tlc/1.1/statuses/S0006.json +67 -0
- data/schemas/tlc/1.1/statuses/S0007.json +95 -0
- data/schemas/tlc/1.1/statuses/S0008.json +95 -0
- data/schemas/tlc/1.1/statuses/S0009.json +95 -0
- data/schemas/tlc/1.1/statuses/S0010.json +95 -0
- data/schemas/tlc/1.1/statuses/S0011.json +95 -0
- data/schemas/tlc/1.1/statuses/S0012.json +95 -0
- data/schemas/tlc/1.1/statuses/S0013.json +67 -0
- data/schemas/tlc/1.1/statuses/S0014.json +68 -0
- data/schemas/tlc/1.1/statuses/S0015.json +68 -0
- data/schemas/tlc/1.1/statuses/S0016.json +40 -0
- data/schemas/tlc/1.1/statuses/S0017.json +40 -0
- data/schemas/tlc/1.1/statuses/S0018.json +40 -0
- data/schemas/tlc/1.1/statuses/S0019.json +40 -0
- data/schemas/tlc/1.1/statuses/S0020.json +67 -0
- data/schemas/tlc/1.1/statuses/S0021.json +35 -0
- data/schemas/tlc/1.1/statuses/S0022.json +34 -0
- data/schemas/tlc/1.1/statuses/S0023.json +35 -0
- data/schemas/tlc/1.1/statuses/S0024.json +35 -0
- data/schemas/tlc/1.1/statuses/S0025.json +229 -0
- data/schemas/tlc/1.1/statuses/S0026.json +34 -0
- data/schemas/tlc/1.1/statuses/S0027.json +34 -0
- data/schemas/tlc/1.1/statuses/S0028.json +34 -0
- data/schemas/tlc/1.1/statuses/S0029.json +34 -0
- data/schemas/tlc/1.1/statuses/S0030.json +34 -0
- data/schemas/tlc/1.1/statuses/S0031.json +34 -0
- data/schemas/tlc/1.1/statuses/S0091.json +45 -0
- data/schemas/tlc/1.1/statuses/S0092.json +45 -0
- data/schemas/tlc/1.1/statuses/S0095.json +34 -0
- data/schemas/tlc/1.1/statuses/S0096.json +175 -0
- data/schemas/tlc/1.1/statuses/S0097.json +61 -0
- data/schemas/tlc/1.1/statuses/S0098.json +82 -0
- data/schemas/tlc/1.1/statuses/S0201.json +67 -0
- data/schemas/tlc/1.1/statuses/S0202.json +67 -0
- data/schemas/tlc/1.1/statuses/S0203.json +67 -0
- data/schemas/tlc/1.1/statuses/S0204.json +283 -0
- data/schemas/tlc/1.1/statuses/S0205.json +61 -0
- data/schemas/tlc/1.1/statuses/S0206.json +61 -0
- data/schemas/tlc/1.1/statuses/S0207.json +61 -0
- data/schemas/tlc/1.1/statuses/S0208.json +229 -0
- data/schemas/tlc/1.1/statuses/statuses.json +738 -0
- data/schemas/tlc/1.1/sxl.json +73 -0
- data/schemas/tlc/1.1/sxl.yaml +1749 -0
- metadata +784 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 07e5fccae77303733072ab27976c1cb1991ea9cd1add360dbac63e8da97baf8b
|
4
|
+
data.tar.gz: 364e6d5569d3fa262a96de68b80bec855d4fd3bb06c754ee47c5bcc3ea9300c4
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: d9a41e3ef2a8f1ce2ed30b701867b118fdaad9fc7f2bced0ca3637a65f242bb69735715e1d41d5bf7ea20690c2280cad7bdbd3b33ce2d0e137f218517967f3d8
|
7
|
+
data.tar.gz: 9885c98876461dab7abc379206ee2617ffb6747fe96a91dec3c382d9111029b3a98ad9a389a6b2ea311db1d4d98e66ead63bf8baf5a7b020c3f520878bad4d54
|
data/.gitignore
ADDED
data/.rspec
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
--require spec_helper
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,49 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
rsmp_schema (0.1.0)
|
5
|
+
json_schemer (~> 0.2.21)
|
6
|
+
thor (~> 1.2.1)
|
7
|
+
|
8
|
+
GEM
|
9
|
+
remote: https://rubygems.org/
|
10
|
+
specs:
|
11
|
+
diff-lcs (1.5.0)
|
12
|
+
ecma-re-validator (0.4.0)
|
13
|
+
regexp_parser (~> 2.2)
|
14
|
+
hana (1.3.7)
|
15
|
+
json_schemer (0.2.21)
|
16
|
+
ecma-re-validator (~> 0.3)
|
17
|
+
hana (~> 1.3)
|
18
|
+
regexp_parser (~> 2.0)
|
19
|
+
uri_template (~> 0.7)
|
20
|
+
rake (13.0.6)
|
21
|
+
regexp_parser (2.5.0)
|
22
|
+
rspec (3.11.0)
|
23
|
+
rspec-core (~> 3.11.0)
|
24
|
+
rspec-expectations (~> 3.11.0)
|
25
|
+
rspec-mocks (~> 3.11.0)
|
26
|
+
rspec-core (3.11.0)
|
27
|
+
rspec-support (~> 3.11.0)
|
28
|
+
rspec-expectations (3.11.0)
|
29
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
30
|
+
rspec-support (~> 3.11.0)
|
31
|
+
rspec-mocks (3.11.1)
|
32
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
33
|
+
rspec-support (~> 3.11.0)
|
34
|
+
rspec-support (3.11.0)
|
35
|
+
thor (1.2.1)
|
36
|
+
uri_template (0.7.0)
|
37
|
+
|
38
|
+
PLATFORMS
|
39
|
+
ruby
|
40
|
+
|
41
|
+
DEPENDENCIES
|
42
|
+
bundler (~> 2.3.19)
|
43
|
+
rake (~> 13.0.6)
|
44
|
+
rsmp_schema!
|
45
|
+
rspec (~> 3.11.0)
|
46
|
+
rspec-expectations (~> 3.11.0)
|
47
|
+
|
48
|
+
BUNDLED WITH
|
49
|
+
2.3.19
|
data/LICENSE
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
Copyright 2019 The City Copenhagen
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
4
|
+
|
5
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
6
|
+
|
7
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,73 @@
|
|
1
|
+
# About
|
2
|
+
JSON Schema for RSMP messages. The schema can be used to automatically validate RSMP messages.
|
3
|
+
|
4
|
+
The schema so far covers the core specifiation and the SXL for Trafic Light Controllers:
|
5
|
+
https://github.com/rsmp-nordic/rsmp_core
|
6
|
+
https://github.com/rsmp-nordic/rsmp_sxl_traffic_lights
|
7
|
+
|
8
|
+
More about JSON Schema:
|
9
|
+
https://json-schema.org/
|
10
|
+
|
11
|
+
## Schema organisation
|
12
|
+
The schema consists of a core schema shared by all equipment types, and an SXL schema for each supported equipment type. At the only SXL supported is for Traffic Light Controllers. An SXL defines massages specific to a particular type of equipment, but they all rely on the core part of the RSMP specification.
|
13
|
+
|
14
|
+
Both core and SXL schemas exist in different version, for validation agaist a particular version of the spec.
|
15
|
+
|
16
|
+
For example, to validate against the SXL for Trafic Light Controllers (TLCs), version 1.0.15, use the file schemas/tcl/1.0.15/sxl.json.
|
17
|
+
|
18
|
+
Depending on the message type, relevant JSON Schema elements will be included to validate the detailed parameters, arguments, etc.
|
19
|
+
|
20
|
+
For example, validating a CommandRequest M0001 message will include these parts:
|
21
|
+
|
22
|
+
```
|
23
|
+
sxl.json
|
24
|
+
commands.json
|
25
|
+
M0001.json
|
26
|
+
```
|
27
|
+
|
28
|
+
## Usage
|
29
|
+
The JSON Schema can be used from any language that provides a suitable JSON Schema validation library.
|
30
|
+
|
31
|
+
For example, to validate a JSON message with Ruby using the json_schemer gem:
|
32
|
+
|
33
|
+
```ruby
|
34
|
+
require 'json_schemer'
|
35
|
+
|
36
|
+
message = {
|
37
|
+
"mType" => "rSMsg",
|
38
|
+
"mId" => "4173c2c8-a933-43cb-9425-66d4613731ed",
|
39
|
+
"type" => "CommandRequest",
|
40
|
+
"siteId" => [
|
41
|
+
{ "sId" => "RN+SI0001" }
|
42
|
+
],
|
43
|
+
"cId" => "O+14439=481WA001",
|
44
|
+
"arg" => [
|
45
|
+
{
|
46
|
+
"cCI" => "M0001",
|
47
|
+
"n" => "status",
|
48
|
+
"cO" => "setValue",
|
49
|
+
"v" => "YellowFlash"
|
50
|
+
}
|
51
|
+
]
|
52
|
+
}
|
53
|
+
|
54
|
+
# try validating a message against our schema
|
55
|
+
schema = Pathname.new('schemas/tlc/1.1/sxl.json')
|
56
|
+
schemer = JSONSchemer.schema(schema)
|
57
|
+
puts schemer.valid? message # => true
|
58
|
+
```
|
59
|
+
|
60
|
+
## RSpec tests
|
61
|
+
The reposity includes RSpec test written in Ruby that checks the schema, by testing the result of validating a set of RSMP messages using the json_schemer gem.
|
62
|
+
|
63
|
+
To run the tests, you need Ruby installed. Then run bundler to ensure you have rspec. Then run use the rspec command to run tests:
|
64
|
+
|
65
|
+
```
|
66
|
+
$ bundle # install gems
|
67
|
+
$ bundle exec rspec # run rspec tests
|
68
|
+
```
|
69
|
+
|
70
|
+
## Schema maintenance
|
71
|
+
The SXL JSON Schemas are generated automatically from their corresponding YAML source, and should therefore not be edited by hand. Instead, edit the YAML source and regenerate the schema files.
|
72
|
+
|
73
|
+
The core schemas has no YAML sources and are maintained by hand.
|
data/Rakefile
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
require "bundler/gem_tasks"
|
3
|
+
require "bundler/setup"
|
4
|
+
require "rsmp_schema"
|
5
|
+
|
6
|
+
|
7
|
+
task default: %i[]
|
8
|
+
|
9
|
+
# Regenerate all SXL JSON Schemas.
|
10
|
+
# Warning: This will destructively override all relevant files. Any changes will be lost!
|
11
|
+
task :regenerate do
|
12
|
+
puts "Regenerating SXL JSON Schemas:"
|
13
|
+
Dir.glob('schemas/tlc/*/sxl.yaml').each do |path|
|
14
|
+
puts " #{File.dirname(path)}"
|
15
|
+
sxl = RSMP::Convert::Import::YAML.read path
|
16
|
+
RSMP::Convert::Export::JSONSchema.write sxl, File.dirname(path)
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
require 'json_schemer'
|
2
|
+
|
3
|
+
message = {
|
4
|
+
"mType" => "rSMsg",
|
5
|
+
"mId" => "4173c2c8-a933-43cb-9425-66d4613731ed",
|
6
|
+
"type" => "CommandRequest",
|
7
|
+
"siteId" => [
|
8
|
+
{ "sId" => "RN+SI0001" }
|
9
|
+
],
|
10
|
+
"cId" => "O+14439=481WA001",
|
11
|
+
"arg" => [
|
12
|
+
{
|
13
|
+
"cCI" => "M0002",
|
14
|
+
"n" => "timeplan",
|
15
|
+
"cO" => "setPlan",
|
16
|
+
"v" => "1"
|
17
|
+
}
|
18
|
+
]
|
19
|
+
}
|
20
|
+
|
21
|
+
# try validating a message against our schema
|
22
|
+
schema = Pathname.new('schema/tlc/sxl.json')
|
23
|
+
schemer = JSONSchemer.schema(schema)
|
24
|
+
if schemer.valid? message
|
25
|
+
puts 'ok'
|
26
|
+
else
|
27
|
+
schemer.validate(message).each do |item|
|
28
|
+
puts [item['data_pointer'],item['type'],item['details']].compact.join(' ')
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
|
data/exe/rsmp_schema
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
require 'thor'
|
2
|
+
require 'rsmp_schema'
|
3
|
+
|
4
|
+
module RSMP::Schema
|
5
|
+
class CLI < Thor
|
6
|
+
desc "convert", "Convert SXL from YAML to JSON Schema"
|
7
|
+
method_option :in, :type => :string, :aliases => "-i", banner: 'Path to YAML input file'
|
8
|
+
method_option :out, :type => :string, :aliases => "-o", banner: 'Path to JSON Schema output file'
|
9
|
+
def convert
|
10
|
+
unless options[:in]
|
11
|
+
puts "Error: Input option missing"
|
12
|
+
exit
|
13
|
+
end
|
14
|
+
|
15
|
+
unless options[:out]
|
16
|
+
puts "Error: Output option missing"
|
17
|
+
exit
|
18
|
+
end
|
19
|
+
|
20
|
+
unless File.exist? options[:in]
|
21
|
+
puts "Error: Input path file #{options[:in]} not found"
|
22
|
+
exit
|
23
|
+
end
|
24
|
+
|
25
|
+
sxl = RSMP::Convert::Import::YAML.read options[:in]
|
26
|
+
RSMP::Convert::Export::JSONSchema.write sxl, options[:out]
|
27
|
+
end
|
28
|
+
|
29
|
+
# avoid Thor returnin 0 on failures, see
|
30
|
+
# https://github.com/coinbase/salus/pull/380/files
|
31
|
+
def self.exit_on_failure?
|
32
|
+
true
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
@@ -0,0 +1,223 @@
|
|
1
|
+
# Import SXL from YAML format
|
2
|
+
|
3
|
+
require 'yaml'
|
4
|
+
require 'json'
|
5
|
+
require 'fileutils'
|
6
|
+
|
7
|
+
module RSMP
|
8
|
+
module Convert
|
9
|
+
module Export
|
10
|
+
module JSONSchema
|
11
|
+
|
12
|
+
@@json_options = {
|
13
|
+
array_nl: "\n",
|
14
|
+
object_nl: "\n",
|
15
|
+
indent: ' ',
|
16
|
+
space_before: ' ',
|
17
|
+
space: ' '
|
18
|
+
}
|
19
|
+
|
20
|
+
def self.output_json item
|
21
|
+
JSON.generate(item,@@json_options)
|
22
|
+
end
|
23
|
+
|
24
|
+
def self.build_value item
|
25
|
+
out = {}
|
26
|
+
|
27
|
+
if item['description']
|
28
|
+
out["description"] = item['description']
|
29
|
+
end
|
30
|
+
|
31
|
+
if item['list']
|
32
|
+
case item['type']
|
33
|
+
when "boolean"
|
34
|
+
out["$ref"] = "../../../core/3.1.1/definitions.json#/boolean_list"
|
35
|
+
when "integer", "ordinal", "unit", "scale", "long"
|
36
|
+
out["$ref"] = "../../../core/3.1.1/definitions.json#/integer_list"
|
37
|
+
when "string"
|
38
|
+
out["$ref"] = "../../../core/3.1.1/definitions.json#/string_list"
|
39
|
+
else
|
40
|
+
raise "Error: List of #{item['type']} is not supported: #{item.inspect}"
|
41
|
+
end
|
42
|
+
|
43
|
+
if item["values"]
|
44
|
+
value_list = item["values"].keys.join('|')
|
45
|
+
out['pattern'] = /(?-mix:^(#{value_list})(?:,(#{value_list}))*$)/
|
46
|
+
end
|
47
|
+
|
48
|
+
if item["pattern"]
|
49
|
+
puts "Warning: Pattern not support for lists: #{item.inspect}"
|
50
|
+
end
|
51
|
+
else
|
52
|
+
case item['type']
|
53
|
+
when "string", "base64"
|
54
|
+
out["type"] = "string"
|
55
|
+
when "boolean"
|
56
|
+
out["$ref"] = "../../../core/3.1.1/definitions.json#/boolean"
|
57
|
+
when "timestamp"
|
58
|
+
out["$ref"] = "../../../core/3.1.1/definitions.json#/timestamp"
|
59
|
+
when "integer", "ordinal", "unit", "scale", "long"
|
60
|
+
out["$ref"] = "../../../core/3.1.1/definitions.json#/integer"
|
61
|
+
else
|
62
|
+
out["type"] = "string"
|
63
|
+
end
|
64
|
+
|
65
|
+
if item["values"]
|
66
|
+
case item["values"]
|
67
|
+
when Hash
|
68
|
+
out["enum"] = item["values"].keys.sort
|
69
|
+
when Array
|
70
|
+
out["enum"] = item["values"].sort
|
71
|
+
else
|
72
|
+
raise "Error: Values must be specified as either a Hash or an Array"
|
73
|
+
end
|
74
|
+
|
75
|
+
end
|
76
|
+
|
77
|
+
if item["pattern"]
|
78
|
+
out["pattern"] = item["pattern"]
|
79
|
+
end
|
80
|
+
end
|
81
|
+
|
82
|
+
# with draft-07 and older, using a $ref mean all other properties are ignored.
|
83
|
+
# to avoid this we need to use an allOf.
|
84
|
+
# this is changed from draft-08, but unfortunately, there is still no Ruby validator for that
|
85
|
+
if out.keys.include? '$ref'
|
86
|
+
ref = out.delete '$ref'
|
87
|
+
{ "allOf" => [out,{"$ref"=>ref}]}
|
88
|
+
else
|
89
|
+
out
|
90
|
+
end
|
91
|
+
end
|
92
|
+
|
93
|
+
def self.build_item item, property_key: 'v'
|
94
|
+
json = { "allOf" => [ { "description" => item['description'] } ] }
|
95
|
+
if item['arguments']
|
96
|
+
json["allOf"].first["properties"] = { "n" => { "enum" => item['arguments'].keys.sort } }
|
97
|
+
item['arguments'].each_pair do |key,argument|
|
98
|
+
json["allOf"] << {
|
99
|
+
"if" => { "required" => ["n"], "properties" => { "n" => { "const" => key }}},
|
100
|
+
"then" => { "properties" => { property_key => build_value(argument) } }
|
101
|
+
}
|
102
|
+
end
|
103
|
+
end
|
104
|
+
json
|
105
|
+
end
|
106
|
+
|
107
|
+
def self.output_alarms out, items
|
108
|
+
list = items.keys.sort.map do |key|
|
109
|
+
{
|
110
|
+
"if" => { "required" => ["aCId"], "properties" => { "aCId" => { "const" => key }}},
|
111
|
+
"then" => { "$ref" => "#{key}.json" }
|
112
|
+
}
|
113
|
+
end
|
114
|
+
json = {
|
115
|
+
"properties" => {
|
116
|
+
"aCId" => { "enum" => items.keys.sort },
|
117
|
+
"rvs" => { "items" => { "allOf" => list } }
|
118
|
+
}
|
119
|
+
}
|
120
|
+
out['alarms/alarms.json'] = output_json json
|
121
|
+
items.each_pair { |key,item| output_alarm out, key, item }
|
122
|
+
end
|
123
|
+
|
124
|
+
def self.output_alarm out, key, item
|
125
|
+
json = build_item item
|
126
|
+
out["alarms/#{key}.json"] = output_json json
|
127
|
+
end
|
128
|
+
|
129
|
+
def self.output_statuses out, items
|
130
|
+
list = [ { "properties" => { "sCI" => { "enum"=> items.keys.sort }}} ]
|
131
|
+
items.keys.sort.each do |key|
|
132
|
+
list << {
|
133
|
+
"if"=> { "required" => ["sCI"], "properties" => { "sCI"=> { "const"=> key }}},
|
134
|
+
"then" => { "$ref" => "#{key}.json" }
|
135
|
+
}
|
136
|
+
end
|
137
|
+
json = { "properties" => { "sS" => { "items" => { "allOf" => list }}}}
|
138
|
+
out['statuses/statuses.json'] = output_json json
|
139
|
+
items.each_pair { |key,item| output_status out, key, item }
|
140
|
+
end
|
141
|
+
|
142
|
+
def self.output_status out, key, item
|
143
|
+
json = build_item item, property_key:'s'
|
144
|
+
out["statuses/#{key}.json"] = output_json json
|
145
|
+
end
|
146
|
+
|
147
|
+
def self.output_commands out, items
|
148
|
+
list = [ { "properties" => { "cCI" => { "enum"=> items.keys.sort }}} ]
|
149
|
+
items.keys.sort.each do |key|
|
150
|
+
list << {
|
151
|
+
"if" => { "required" => ["cCI"], "properties" => { "cCI"=> { "const"=> key }}},
|
152
|
+
"then" => { "$ref" => "#{key}.json" }
|
153
|
+
}
|
154
|
+
end
|
155
|
+
json = { "items" => { "allOf" => list }}
|
156
|
+
out['commands/commands.json'] = output_json json
|
157
|
+
|
158
|
+
json = { "properties" => { "arg" => { "$ref" => "commands.json" }}}
|
159
|
+
out['commands/command_requests.json'] = output_json json
|
160
|
+
|
161
|
+
json = { "properties" => { "rvs" => { "$ref" => "commands.json" }}}
|
162
|
+
out['commands/command_responses.json'] = output_json json
|
163
|
+
|
164
|
+
items.each_pair { |key,item| output_command out, key, item }
|
165
|
+
end
|
166
|
+
|
167
|
+
def self.output_command out, key, item
|
168
|
+
json = build_item item
|
169
|
+
json["allOf"].first["properties"]['cO'] = { "const" => item['command'] }
|
170
|
+
out["commands/#{key}.json"] = output_json json
|
171
|
+
end
|
172
|
+
|
173
|
+
def self.output_root out, meta
|
174
|
+
json = {
|
175
|
+
"name"=> meta['name'],
|
176
|
+
"description"=> meta['description'],
|
177
|
+
"version"=> meta['version'],
|
178
|
+
"allOf" => [
|
179
|
+
{
|
180
|
+
"if" => { "required" => ["type"], "properties" => { "type" => { "const" => "CommandRequest" }}},
|
181
|
+
"then" => { "$ref" => "commands/command_requests.json" }
|
182
|
+
},
|
183
|
+
{
|
184
|
+
"if" => { "required" => ["type"], "properties" => { "type" => { "const" => "CommandResponse" }}},
|
185
|
+
"then" => { "$ref" => "commands/command_responses.json" }
|
186
|
+
},
|
187
|
+
{
|
188
|
+
"if" => { "required" => ["type"], "properties" => { "type" => { "enum" => ["StatusRequest","StatusResponse","StatusSubscribe","StatusUnsubscribe","StatusUpdate"] }}},
|
189
|
+
"then" => { "$ref" => "statuses/statuses.json" }
|
190
|
+
},
|
191
|
+
{
|
192
|
+
"if" => { "required" => ["type"], "properties" => { "type" => { "const" => "Alarm" }}},
|
193
|
+
"then" => { "$ref" => "alarms/alarms.json" }
|
194
|
+
}
|
195
|
+
]
|
196
|
+
}
|
197
|
+
out["sxl.json"] = output_json json
|
198
|
+
end
|
199
|
+
|
200
|
+
def self.generate sxl
|
201
|
+
out = {}
|
202
|
+
output_root out, sxl[:meta]
|
203
|
+
output_alarms out, sxl[:alarms]
|
204
|
+
output_statuses out, sxl[:statuses]
|
205
|
+
output_commands out, sxl[:commands]
|
206
|
+
out
|
207
|
+
end
|
208
|
+
|
209
|
+
def self.write sxl, folder
|
210
|
+
out = generate sxl
|
211
|
+
out.each_pair do |relative_path,str|
|
212
|
+
path = File.join(folder, relative_path)
|
213
|
+
FileUtils.mkdir_p File.dirname(path) # create folders if needed
|
214
|
+
file = File.open(path, 'w+') # w+ means truncate or create new file
|
215
|
+
file.puts str
|
216
|
+
end
|
217
|
+
end
|
218
|
+
|
219
|
+
end
|
220
|
+
|
221
|
+
end
|
222
|
+
end
|
223
|
+
end
|
@@ -0,0 +1,41 @@
|
|
1
|
+
# Import SXL from YAML format
|
2
|
+
|
3
|
+
require 'yaml'
|
4
|
+
require 'json'
|
5
|
+
require 'fileutils'
|
6
|
+
|
7
|
+
module RSMP
|
8
|
+
module Convert
|
9
|
+
module Import
|
10
|
+
module YAML
|
11
|
+
|
12
|
+
def self.read path
|
13
|
+
convert ::YAML.load_file(path)
|
14
|
+
end
|
15
|
+
|
16
|
+
def self.parse str
|
17
|
+
convert ::YAML.load(str)
|
18
|
+
end
|
19
|
+
|
20
|
+
def self.convert yaml
|
21
|
+
sxl = {
|
22
|
+
meta: {},
|
23
|
+
alarms: {},
|
24
|
+
statuses: {},
|
25
|
+
commands: {}
|
26
|
+
}
|
27
|
+
|
28
|
+
sxl[:meta] = yaml['meta']
|
29
|
+
|
30
|
+
yaml['objects'].each_pair do |type,object|
|
31
|
+
object["alarms"].each { |id,item| sxl[:alarms][id] = item } if object["alarms"]
|
32
|
+
object["statuses"].each { |id,item| sxl[:statuses][id] = item } if object["statuses"]
|
33
|
+
object["commands"].each { |id,item| sxl[:commands][id] = item } if object["commands"]
|
34
|
+
end
|
35
|
+
sxl
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
@@ -0,0 +1,102 @@
|
|
1
|
+
require 'json_schemer'
|
2
|
+
|
3
|
+
module RSMP
|
4
|
+
end
|
5
|
+
|
6
|
+
module RSMP::Schema
|
7
|
+
@@schemas = nil
|
8
|
+
|
9
|
+
def self.schemas
|
10
|
+
return @@schemas if @@schemas
|
11
|
+
schemas_path = File.expand_path( File.join(__dir__,'..','..','schemas') )
|
12
|
+
@@schemas = {
|
13
|
+
core: {
|
14
|
+
'3.1.1' => JSONSchemer.schema( Pathname.new(File.join(schemas_path, 'core','3.1.1','rsmp.json')) ),
|
15
|
+
'3.1.2' => JSONSchemer.schema( Pathname.new(File.join(schemas_path, 'core','3.1.2','rsmp.json')) ),
|
16
|
+
'3.1.3' => JSONSchemer.schema( Pathname.new(File.join(schemas_path, 'core','3.1.3','rsmp.json')) ),
|
17
|
+
'3.1.4' => JSONSchemer.schema( Pathname.new(File.join(schemas_path, 'core','3.1.4','rsmp.json')) ),
|
18
|
+
'3.1.5' => JSONSchemer.schema( Pathname.new(File.join(schemas_path, 'core','3.1.5','rsmp.json')) ),
|
19
|
+
'3.2' => JSONSchemer.schema( Pathname.new(File.join(schemas_path, 'core','3.2', 'rsmp.json')) )
|
20
|
+
},
|
21
|
+
# note that tlc 1.0.11 and 1.0.12 does not exist (unreleased drafts)
|
22
|
+
tlc: {
|
23
|
+
'1.0.7' => JSONSchemer.schema( Pathname.new(File.join(schemas_path, 'tlc','1.0.7' ,'sxl.json')) ),
|
24
|
+
'1.0.8' => JSONSchemer.schema( Pathname.new(File.join(schemas_path, 'tlc','1.0.8' ,'sxl.json')) ),
|
25
|
+
'1.0.9' => JSONSchemer.schema( Pathname.new(File.join(schemas_path, 'tlc','1.0.9' ,'sxl.json')) ),
|
26
|
+
'1.0.10' => JSONSchemer.schema( Pathname.new(File.join(schemas_path, 'tlc','1.0.10','sxl.json')) ),
|
27
|
+
'1.0.13' => JSONSchemer.schema( Pathname.new(File.join(schemas_path, 'tlc','1.0.13','sxl.json')) ),
|
28
|
+
'1.0.14' => JSONSchemer.schema( Pathname.new(File.join(schemas_path, 'tlc','1.0.14','sxl.json')) ),
|
29
|
+
'1.0.15' => JSONSchemer.schema( Pathname.new(File.join(schemas_path, 'tlc','1.0.15','sxl.json')) ),
|
30
|
+
'1.1' => JSONSchemer.schema( Pathname.new(File.join(schemas_path, 'tlc','1.1', 'sxl.json')) )
|
31
|
+
}
|
32
|
+
}
|
33
|
+
end
|
34
|
+
|
35
|
+
def self.validate_using_schema message, schema
|
36
|
+
raise ArgumentError.new("message missing") unless message
|
37
|
+
raise ArgumentError.new("schema missing") unless schema
|
38
|
+
unless schema.valid? message
|
39
|
+
schema.validate(message).map do |item|
|
40
|
+
[item['data_pointer'],item['type'],item['details']]
|
41
|
+
end
|
42
|
+
else
|
43
|
+
[]
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
def self.find_schemas type
|
48
|
+
raise ArgumentError.new("type missing") unless type
|
49
|
+
schemas[type.to_sym]
|
50
|
+
end
|
51
|
+
|
52
|
+
def self.find_schemas! type
|
53
|
+
schemas = find_schemas type
|
54
|
+
raise UnknownSchemaTypeError.new("Unknown schema type #{type}") unless schemas
|
55
|
+
schemas
|
56
|
+
end
|
57
|
+
|
58
|
+
def self.find_schema type, version, options={}
|
59
|
+
raise ArgumentError.new("version missing") unless version
|
60
|
+
version = sanitize_version version if options[:lenient]
|
61
|
+
if version
|
62
|
+
schemas = find_schemas type
|
63
|
+
return schemas[version] if schemas
|
64
|
+
end
|
65
|
+
nil
|
66
|
+
end
|
67
|
+
|
68
|
+
def self.sanitize_version version
|
69
|
+
matched = /^\d+\.\d+(\.\d+)?/.match version
|
70
|
+
matched.to_s if matched
|
71
|
+
end
|
72
|
+
|
73
|
+
def self.find_schema! type, version, options={}
|
74
|
+
schema = find_schema type, version, options
|
75
|
+
raise ArgumentError.new("version missing") unless version
|
76
|
+
version = sanitize_version version if options[:lenient]
|
77
|
+
if version
|
78
|
+
schemas = find_schemas! type
|
79
|
+
schema = schemas[version]
|
80
|
+
return schema if schema
|
81
|
+
end
|
82
|
+
raise UnknownSchemaVersionError.new("Unknown schema version #{type} #{version}")
|
83
|
+
end
|
84
|
+
|
85
|
+
def self.has_schema? type, version, options={}
|
86
|
+
find_schema(type,version, options) != nil
|
87
|
+
end
|
88
|
+
|
89
|
+
def self.validate message, schemas, options={}
|
90
|
+
raise ArgumentError.new("message missing") unless message
|
91
|
+
raise ArgumentError.new("schemas missing") unless schemas
|
92
|
+
raise ArgumentError.new("schemas must be a Hash") unless schemas.is_a?(Hash)
|
93
|
+
raise ArgumentError.new("schemas cannot be empty") unless schemas.any?
|
94
|
+
errors = schemas.flat_map do |type, version|
|
95
|
+
schema = find_schema! type, version, options
|
96
|
+
validate_using_schema(message, schema)
|
97
|
+
end
|
98
|
+
return nil if errors.empty?
|
99
|
+
errors
|
100
|
+
end
|
101
|
+
|
102
|
+
end
|