From 6d53625acd52dea25c89ba1c973c8d6a20ffd829 Mon Sep 17 00:00:00 2001 From: Ilayaperumal Gopinathan Date: Thu, 23 Feb 2017 12:07:51 +0530 Subject: [PATCH] Doc for schema server REST endpoint /schema/format Resolves #828 --- .../main/asciidoc/spring-cloud-stream-overview.adoc | 12 ++++++++++++ .../schema/server/SchemaRegistryServerAvroTests.java | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/spring-cloud-stream-core-docs/src/main/asciidoc/spring-cloud-stream-overview.adoc b/spring-cloud-stream-core-docs/src/main/asciidoc/spring-cloud-stream-overview.adoc index d56b5831d..ec5cbd28b 100644 --- a/spring-cloud-stream-core-docs/src/main/asciidoc/spring-cloud-stream-overview.adoc +++ b/spring-cloud-stream-core-docs/src/main/asciidoc/spring-cloud-stream-overview.adoc @@ -1376,6 +1376,18 @@ Response is a schema object in JSON format, with the following fields: * `version` the schema version; * `definition` the schema definition. +====== `GET /{subject}/{format}` + +Retrieve a list of existing schema by its subject and format. + +Response is a list of schemas with each schema object in JSON format, with the following fields: + +* `id` the schema id; +* `subject` the schema subject; +* `format` the schema format; +* `version` the schema version; +* `definition` the schema definition. + ====== `GET /schemas/{id}` Retrieve an existing schema by its id. diff --git a/spring-cloud-stream-schema-server/src/test/java/org/springframework/cloud/stream/schema/server/SchemaRegistryServerAvroTests.java b/spring-cloud-stream-schema-server/src/test/java/org/springframework/cloud/stream/schema/server/SchemaRegistryServerAvroTests.java index 787b59feb..754eac83a 100644 --- a/spring-cloud-stream-schema-server/src/test/java/org/springframework/cloud/stream/schema/server/SchemaRegistryServerAvroTests.java +++ b/spring-cloud-stream-schema-server/src/test/java/org/springframework/cloud/stream/schema/server/SchemaRegistryServerAvroTests.java @@ -248,7 +248,7 @@ public class SchemaRegistryServerAvroTests { } @Test - public void testFindSchemaBySubject() throws Exception { + public void testFindSchemasBySubjectAndVersion() throws Exception { Schema v1 = new Schema(); v1.setFormat("avro"); v1.setSubject("test");