Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
NGSI Linked Data
NGSI-LD
Commits
726dce2f
Commit
726dce2f
authored
Nov 21, 2018
by
canterafonsj
Browse files
Csource Registrations
parent
f0a137fe
Changes
4
Hide whitespace changes
Inline
Side-by-side
schema/registrations/ContextSourceRegistration.json
View file @
726dce2f
...
...
@@ -50,68 +50,93 @@
"format"
:
"date-time"
}
}
}
},
"type"
:
"object"
,
"properties"
:
{
"id"
:
{
"type"
:
"string"
,
"format"
:
"uri"
},
"type"
:
{
"type"
:
"string"
,
"const"
:
"ContextSourceRegistration"
},
"@context"
:
{
"$ref"
:
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/LdContext"
},
"information"
:
{
"type"
:
"array"
,
"minItems"
:
1
,
"items"
:
{
"$ref"
:
"#/definitions/RegistrationInfo"
}
},
"timestamp"
:
{
"type"
:
"array"
,
"minItems"
:
1
,
"items"
:
{
"$ref"
:
"#/definitions/TimeInterval"
"ContextSourceRegistrationFragment"
:
{
"type"
:
"object"
,
"properties"
:
{
"@context"
:
{
"$ref"
:
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/LdContext"
},
"information"
:
{
"type"
:
"array"
,
"minItems"
:
1
,
"items"
:
{
"$ref"
:
"#/definitions/RegistrationInfo"
}
},
"timestamp"
:
{
"type"
:
"array"
,
"minItems"
:
1
,
"items"
:
{
"$ref"
:
"#/definitions/TimeInterval"
}
},
"location"
:
{
"$ref"
:
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/geometry-schema.json#"
},
"expires"
:
{
"type"
:
"string"
,
"format"
:
"date-time"
},
"name"
:
{
"type"
:
"string"
,
"minLength"
:
1
},
"description"
:
{
"type"
:
"string"
,
"minLength"
:
1
},
"endpoint"
:
{
"type"
:
"string"
,
"format"
:
"uri"
}
},
"additionalProperties"
:
{
"type"
:
[
"string"
,
"number"
,
"boolean"
,
"array"
,
"object"
]
}
},
"location"
:
{
"$ref"
:
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/geometry-schema.json#"
},
"expires"
:
{
"type"
:
"string"
,
"format"
:
"date-time"
},
"name"
:
{
"type"
:
"string"
,
"minLength"
:
1
},
"description"
:
{
"type"
:
"string"
,
"minLength"
:
1
},
"endpoint"
:
{
"type"
:
"string"
,
"format"
:
"uri"
},
"createdAt"
:
{
"$ref"
:
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/createdAt"
},
"modifiedAt"
:
{
"$ref"
:
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/modifiedAt"
"ContextSourceRegistration"
:
{
"allOf"
:
[
{
"$ref"
:
"#/definitions/ContextSourceRegistrationFragment"
},
{
"type"
:
"object"
,
"properties"
:
{
"id"
:
{
"type"
:
"string"
,
"format"
:
"uri"
},
"type"
:
{
"type"
:
"string"
,
"const"
:
"ContextSourceRegistration"
},
"createdAt"
:
{
"$ref"
:
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/createdAt"
},
"modifiedAt"
:
{
"$ref"
:
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/modifiedAt"
}
},
"required"
:
[
"id"
,
"type"
,
"endpoint"
,
"information"
]
}
]
}
},
"additionalProperties"
:
{
"type"
:
[
"string"
,
"number"
,
"boolean"
,
"array"
,
"object"
]
},
"required"
:
[
"id"
,
"type"
,
"endpoint"
,
"information"
"allOf"
:
[
{
"$ref"
:
"#/definitions/ContextSourceRegistration"
}
]
}
}
\ No newline at end of file
schema/registrations/ContextSourceRegistrationList.json
0 → 100644
View file @
726dce2f
{
"$schema"
:
"http://json-schema.org/schema#"
,
"id"
:
"https://uri.etsi.org/ngsi-ld/schema/ContextSourceRegistrationList.json"
,
"title"
:
"NGSI-LD Registration List"
,
"description"
:
"NGSI-LD Registration List"
,
"definitions"
:
{
"ContextSourceRegistrationList"
:
{
"type"
:
"array"
,
"items"
:
{
"$ref"
:
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/registrations/ContextSourceRegistration.json#/definitions/ContextSourceRegistration"
}
}
},
"allOf"
:
[{
"$ref"
:
"#/definitions/ContextSourceRegistrationList"
}]
}
scripts/validate_schema.sh
View file @
726dce2f
...
...
@@ -16,6 +16,8 @@ ajv compile -s $SCHEMAS/EntityList.json -r $SCHEMAS/common.json -r $SCHEMAS/geom
ajv compile
-s
$SCHEMAS
/subscriptions/SubscriptionList.json
-r
$SCHEMAS
/common.json
-r
$SCHEMAS
/geometry-schema.json
-r
$SCHEMAS
/subscriptions/Subscription.json
ajv compile
-s
$SCHEMAS
/registrations/ContextSourceRegistrationList.json
-r
$SCHEMAS
/common.json
-r
$SCHEMAS
/geometry-schema.json
-r
$SCHEMAS
/registrations/ContextSourceRegistration.json
ajv compile
-s
$SCHEMAS
/temporal/EntityTemporalList.json
-r
$SCHEMAS
/temporal/EntityTemporal.json
-r
$SCHEMAS
/Entity.json
-r
$SCHEMAS
/common.json
-r
$SCHEMAS
/geometry-schema.json
ajv compile
-s
$SCHEMAS
/BatchOperationResult.json
-r
$SCHEMAS
/common.json
...
...
spec/updated/csource-registrations-spec.json
0 → 100644
View file @
726dce2f
{
"openapi"
:
"3.0.1"
,
"info"
:
{
"title"
:
"NGSI-LD Registrations"
,
"version"
:
"latest"
},
"components"
:
{
"parameters"
:
{
}
},
"paths"
:
{
"/csourceRegistrations/"
:
{
"get"
:
{
"description"
:
"Retrieve a set of context sources which matches a specific query from an NGSI-LD system"
,
"operationId"
:
"queryCsources"
,
"parameters"
:
[
{
"$ref"
:
"#/components/parameters/limit"
}
],
"responses"
:
{
"200"
:
{
"description"
:
"OK"
,
"content"
:
{
"application/json;application/ld+json"
:
{
"schema"
:
{
"$ref"
:
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/registrations/ContextSourceRegistrationList.json#/definitions/ContextSourceRegistrationList"
},
"examples"
:
{
"simple"
:
{
"externalValue"
:
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/examples/ContextSourceRegistrationList-example.json"
}
}
}
}
},
"400"
:
{
"description"
:
"Bad request"
,
"content"
:
{
"application/json;application/ld+json"
:
{
"schema"
:
{
"$ref"
:
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/ProblemDetails"
}
}
}
}
}
},
"post"
:
{
"description"
:
"Registers a new context source within an NGSI-LD system"
,
"operationId"
:
"registerCsource"
,
"requestBody"
:
{
"required"
:
true
,
"content"
:
{
"application/json;application/ld+json"
:
{
"schema"
:
{
"$ref"
:
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/registrations/ContextSourceRegistration.json#/definitions/ContextSourceRegistration"
}
}
}
},
"responses"
:
{
"201"
:
{
"description"
:
"Created. Contains the resource URI of the created Registration"
},
"400"
:
{
"description"
:
"Bad request"
,
"content"
:
{
"application/json;application/ld+json"
:
{
"schema"
:
{
"$ref"
:
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/ProblemDetails"
}
}
}
},
"409"
:
{
"description"
:
"Already exists"
,
"content"
:
{
"application/json;application/ld+json"
:
{
"schema"
:
{
"$ref"
:
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/ProblemDetails"
}
}
}
}
}
}
}
}
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment