diff --git a/README.md b/README.md index 4c9271b..5a5989b 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # TinyIoT Thing Directory -This is an implementation of the [W3C WoT Thing Description Directory (TDD)](https://w3c.github.io/wot-discovery/), a registry of [Thing Descriptions](https://www.w3.org/TR/wot-thing-description/). This project is an independent fork of [LinkSmart Thing Directory](https://github.com/linksmart/thing-directory). +This is an implementation of the [W3C Web of Things (WoT) Thing Description Directory (TDD)](https://w3c.github.io/wot-discovery/), a registry of [Thing Descriptions](https://www.w3.org/TR/wot-thing-description/). ## Getting Started Visit the following pages to get started: @@ -14,8 +14,9 @@ Visit the following pages to get started: * [DNS-SD registration](../../wiki/Discovery-with-DNS-SD) * RESTful API * [HTTP API][1] - * Thing Description (TD) CRUD, catalog, and validation - * XPath 3.0 and JSONPath [query languages](../../wiki/Query-Language) + * Things API - TD creation, read, update (put/patch), deletion, and listing (pagination) + * Search API - [JSONPath query language](../../wiki/Query-Language) + * Events API * TD validation with JSON Schema(s) * Request [authentication](https://github.com/linksmart/go-sec/wiki/Authentication) and [authorization](https://github.com/linksmart/go-sec/wiki/Authorization) * JSON-LD response format @@ -23,10 +24,9 @@ Visit the following pages to get started: * LevelDB * CI/CD ([Github Actions](https://github.com/tinyiot/thing-directory/actions?query=workflow:CICD)) * Automated testing - * Automated builds and releases ([Docker images - TBA](#), [binaries](https://github.com/tinyiot/thing-directory/releases)) + * Automated builds and releases ## Development -The dependencies of this package are managed by [Go Modules](https://github.com/golang/go/wiki/Modules). Clone this repo: ```bash diff --git a/apidoc/openapi-spec.yml b/apidoc/openapi-spec.yml index 0f5c249..610a537 100644 --- a/apidoc/openapi-spec.yml +++ b/apidoc/openapi-spec.yml @@ -4,7 +4,7 @@ openapi: 3.0.3 # - url: http://localhost:8081 info: - version: "1.0.0-beta.24" + version: "1.0.0-beta.26" title: TinyIoT Thing Directory description: API documentation of the [TinyIoT Thing Directory](https://github.com/tinyiot/thing-directory) license: @@ -13,7 +13,7 @@ info: tags: - name: things - description: Registration API + description: Things API - name: search description: Search API - name: events diff --git a/main.go b/main.go index 52561cb..a39aa79 100644 --- a/main.go +++ b/main.go @@ -204,17 +204,7 @@ func setupHTTPRouter(config *HTTPConfig, api *catalog.HTTPAPI, notifAPI *notific r.get("/openapi-spec-proxy", commonHandlers.ThenFunc(apiSpecProxy)) r.get("/openapi-spec-proxy/{basepath:.+}", commonHandlers.ThenFunc(apiSpecProxy)) - // Deprecated: use /things and /search instead - // TD CRUD, listing, filtering - // r.get("/td", commonHandlers.ThenFunc(api.GetMany)) - // r.get("/td-chunked", commonHandlers.ThenFunc(api.GetAll)) - // r.post("/td", commonHandlers.ThenFunc(api.Post)) - // r.get("/td/{id:.+}", commonHandlers.ThenFunc(api.Get)) - // r.put("/td/{id:.+}", commonHandlers.ThenFunc(api.Put)) - // r.patch("/td/{id:.+}", commonHandlers.ThenFunc(api.Patch)) - // r.delete("/td/{id:.+}", commonHandlers.ThenFunc(api.Delete)) - - // CRUDL + // Things API (CRUDL) r.post("/things", commonHandlers.ThenFunc(api.Post)) // create anonymous r.put("/things/{id:.+}", commonHandlers.ThenFunc(api.Put)) // create or update r.get("/things/{id:.+}", commonHandlers.ThenFunc(api.Get)) // retrieve @@ -222,10 +212,10 @@ func setupHTTPRouter(config *HTTPConfig, api *catalog.HTTPAPI, notifAPI *notific r.delete("/things/{id:.+}", commonHandlers.ThenFunc(api.Delete)) // delete r.get("/things", commonHandlers.ThenFunc(api.List)) // listing - // search + // Search API r.get("/search/jsonpath", commonHandlers.ThenFunc(api.SearchJSONPath)) - //TD notification + // Events API r.get("/events", commonHandlers.ThenFunc(notifAPI.SubscribeEvent)) r.get("/events/{type}", commonHandlers.ThenFunc(notifAPI.SubscribeEvent))