From 3ba58f22e26d70ef277cc58b533fe7985b2218fa Mon Sep 17 00:00:00 2001 From: Wolfgang Werner Date: Sat, 19 Oct 2019 00:05:41 +0200 Subject: [PATCH] Add http calls to reproduce #55 --- src/test/resources/rest-api-calls.http | 83 ++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) diff --git a/src/test/resources/rest-api-calls.http b/src/test/resources/rest-api-calls.http index 7b0fc2bb..75df0fa7 100644 --- a/src/test/resources/rest-api-calls.http +++ b/src/test/resources/rest-api-calls.http @@ -108,4 +108,87 @@ Accept: application/json GET http://localhost:9019/schema/categories Accept: application/json +### + + +// Reproduce https://github.com/vlingo/vlingo-schemata/issues/55 +POST http://localhost:9019/organizations +Content-Type: application/json + +{ + "organizationId": "", + "name": "org", + "description": "My organization." +} +> {% client.global.set('orgId', response.body.organizationId) %} + + +### Create Unit +POST http://localhost:9019/organizations/{{orgId}}/units +Content-Type: application/json + +{ + "organizationId": "{{orgId}}", + "unitId": "", + "name": "unit", + "description": "My unit." +} + +> {% client.global.set('unitId', response.body.unitId) %} + +### Create Context +POST http://localhost:9019/organizations/{{orgId}}/units/{{unitId}}/contexts +Content-Type: application/json + +{ + "organizationId": "{{orgId}}", + "unitId": "{{unitId}}", + "contextId": "", + "namespace": "context", + "description": "Schemata Context." +} + +> {% client.global.set('contextId', response.body.contextId) %} + +### Create Schema +POST http://localhost:9019/organizations/{{orgId}}/units/{{unitId}}/contexts/{{contextId}}/schemas +Content-Type: application/json + +{ + "organizationId": "{{orgId}}", + "unitId": "{{unitId}}", + "contextId": "{{contextId}}", + "schemaId": "", + "category": "Event", + "name": "SchemaDefinedFoo", + "scope": "Private", + "description": "Schemata was defined event." +} + +> {% client.global.set('schemaId', response.body.schemaId) %} + + +### Create Schema Version +POST http://localhost:9019/organizations/{{orgId}}/units/{{unitId}}/contexts/{{contextId}}/schemas/{{schemaId}}/versions +Content-Type: application/json + +{ + "organizationId": "{{orgId}}", + "unitId": "{{unitId}}", + "contextId": "{{contextId}}", + "schemaId": "{{schemaId}}", + "schemaVersionId": "", + "description": "Initial revision.", + "specification": "event SchemaDefined { type eventType }", + "status": "Published", + "previousVersion": "0.0.0", + "currentVersion": "1.0.0" +} +> {% client.global.set('schemaVersionId', response.body.schemaVersionId) %} + + +### this crashes the compiler +GET http://localhost:9019/code/org:unit:context:schema:1.0.0/java +Accept: application/json + ### \ No newline at end of file