Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update schemas to the draft-07 version #131

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion priv/blocks/filter.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

"schema": {
"$id": "https://astarte-platform.org/specs/astarte_flow/blocks/filter.json",
"$schema": "http://json-schema.org/draft-04/schema#",
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "FilterOptions",
"type": "object",

Expand Down
2 changes: 1 addition & 1 deletion priv/blocks/http_sink.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

"schema": {
"$id": "https://astarte-platform.org/specs/astarte_flow/blocks/http_sink.json",
"$schema": "http://json-schema.org/draft-04/schema#",
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "HttpSinkOptions",
"type": "object",

Expand Down
2 changes: 1 addition & 1 deletion priv/blocks/http_source.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

"schema": {
"$id": "https://astarte-platform.org/specs/astarte_flow/blocks/http_source.json",
"$schema": "http://json-schema.org/draft-04/schema#",
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "HttpSourceOptions",
"type": "object",

Expand Down
2 changes: 1 addition & 1 deletion priv/blocks/json_path_map.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

"schema": {
"$id": "https://astarte-platform.org/specs/astarte_flow/blocks/json_path_map.json",
"$schema": "http://json-schema.org/draft-04/schema#",
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "JSONPathMapOptions",
"type": "object",

Expand Down
2 changes: 1 addition & 1 deletion priv/blocks/lua_map.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

"schema": {
"$id": "https://astarte-platform.org/specs/astarte_flow/blocks/lua_map.json",
"$schema": "http://json-schema.org/draft-04/schema#",
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "LuaMapOptions",
"type": "object",

Expand Down
2 changes: 1 addition & 1 deletion priv/blocks/modbus_tcp_source.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

"schema": {
"$id": "https://astarte-platform.org/specs/astarte_flow/blocks/modbus_tcp_source.json",
"$schema": "http://json-schema.org/draft-04/schema#",
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Modbus TCP Source options",
"description": "An Astarte Flow source that produces data by polling a Modbus device.",
"type": "object",
Expand Down
2 changes: 1 addition & 1 deletion priv/blocks/mqtt_sink.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

"schema": {
"$id": "https://astarte-platform.org/specs/astarte_flow/blocks/mqtt_source.json",
"$schema": "http://json-schema.org/draft-04/schema#",
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "MQTT Sink options",
"description": "An Astarte Flow sink that publishes MQTT messages.",
"type": "object",
Expand Down
2 changes: 1 addition & 1 deletion priv/blocks/mqtt_source.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

"schema": {
"$id": "https://astarte-platform.org/specs/astarte_flow/blocks/mqtt_source.json",
"$schema": "http://json-schema.org/draft-04/schema#",
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "MQTT Source options",
"description": "An Astarte Flow source that produces data from an MQTT connection.",
"type": "object",
Expand Down
2 changes: 1 addition & 1 deletion priv/blocks/random_source.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

"schema": {
"$id": "https://astarte-platform.org/specs/astarte_flow/blocks/random_source.json",
"$schema": "http://json-schema.org/draft-04/schema#",
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "RandomSourceOptions",
"type": "object",

Expand Down
2 changes: 1 addition & 1 deletion priv/blocks/sort.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

"schema": {
"$id": "https://astarte-platform.org/specs/astarte_flow/blocks/sort.json",
"$schema": "http://json-schema.org/draft-04/schema#",
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "SortOptions",
"type": "object",

Expand Down
2 changes: 1 addition & 1 deletion priv/blocks/to_json.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

"schema": {
"$id": "https://astarte-platform.org/specs/astarte_flow/blocks/to_json.json",
"$schema": "http://json-schema.org/draft-04/schema#",
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "ToJSONOptions",
"type": "object",

Expand Down
4 changes: 2 additions & 2 deletions priv/static/astarte_flow_api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -451,11 +451,11 @@ components:
ConfigSchema:
type: object
description: >-
A JSON Schema object (implementing this schema http://json-schema.org/draft-04/schema#)
A JSON Schema object (implementing this schema http://json-schema.org/draft-07/schema#)
used to validate a pipeline (or block) configuration.
example:
$id: https://example.com/specs/astarte_flow/blocks/my_custom_block.json
$schema: http://json-schema.org/draft-04/schema#
$schema: http://json-schema.org/draft-07/schema#
title: "MyCustomBlockOptions"
type: "object"
additionalProperties: false
Expand Down
2 changes: 1 addition & 1 deletion test/astarte_flow/blocks_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ defmodule Astarte.Flow.BlocksTest do
@block_type "producer_consumer"
@schema %{
"$id" => "https://example.com/blocks/interface_filter.json",
"$schema" => "http://json-schema.org/draft-04/schema#",
"$schema" => "http://json-schema.org/draft-07/schema#",
"title" => "InterfaceFilterOptions",
"type" => "object",
"additionalProperties" => false,
Expand Down
2 changes: 1 addition & 1 deletion test/astarte_flow/pipelines_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ defmodule Astarte.Flow.PipelinesTest do
test "creates a pipeline with a schema" do
schema = %{
"$id" => "https://astarte-platform.org/specs/astarte_flow/to_json.json",
"$schema" => "http://json-schema.org/draft-04/schema#",
"$schema" => "http://json-schema.org/draft-07/schema#",
"title" => "PipelineConfig",
"type" => "object",
"additionalProperties" => false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ defmodule Astarte.FlowWeb.BlockControllerTest do
@block_type "producer_consumer"
@schema %{
"$id" => "https://example.com/blocks/interface_filter.json",
"$schema" => "http://json-schema.org/draft-04/schema#",
"$schema" => "http://json-schema.org/draft-07/schema#",
"title" => "InterfaceFilterOptions",
"type" => "object",
"additionalProperties" => false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ defmodule Astarte.FlowWeb.PipelineControllerTest do
@description "My super useful pipeline"
@schema %{
"$id" => "https://astarte-platform.org/specs/astarte_flow/to_json.json",
"$schema" => "http://json-schema.org/draft-04/schema#",
"$schema" => "http://json-schema.org/draft-07/schema#",
"title" => "PipelineConfig",
"type" => "object",
"additionalProperties" => false,
Expand Down