From c4394b1ef886031e5fb4a84ed2ade756f8c1e9e7 Mon Sep 17 00:00:00 2001 From: Clemens Vasters Date: Mon, 26 Jun 2023 10:40:00 +0200 Subject: [PATCH] xregistry rename --- .github/workflows/build.yml | 6 +- .gitignore | 2 +- .vscode/launch.json | 34 +- MANIFEST.in | 2 +- README.md | 18 +- docs/authoring_templates.md | 2 +- pyproject.toml | 6 +- .../producer/test_asyncapi_producer.py | 16 +- test/core/test_exit.py | 2 +- test/core/test_jinja_filters.py | 2 +- .../amqp_end_to_end/test_amqp_end_to_end.py | 12 +- test/cs/http_azfn_http/test_azfn_http.py | 10 +- .../http_end_to_end/test_http_end_to_end.py | 12 +- .../test_http_end_to_end_proto.py | 12 +- .../test_inmemory_end_to_end.py | 12 +- .../mqtt_end_to_end/test_mqtt_end_to_end.py | 12 +- .../test_mqtt_end_to_end_java.py | 12 +- .../openapi/producer/test_openapi_producer.py | 8 +- .../subscriber/test_openapi_subscriber.py | 8 +- test/validate/test_validate.py | 12 +- {ceregistry => xregistry}/__init__.py | 0 {ceregistry => xregistry}/__main__.py | 0 {ceregistry => xregistry}/cli.py | 0 .../commands/__init__.py | 0 {ceregistry => xregistry}/commands/core.py | 0 .../commands/generate_code.py | 0 .../commands/list_templates.py | 0 .../commands/validate_definitions.py | 0 .../_xregistry_messaging_catalog_types.json | 0 .../schemas/generate_openapis.sh | 0 .../xregistry_endpoint_protocol_options.json | 0 .../schemas/xregistry_endpoint_registry.json | 0 .../xregistry_endpoint_registry_amqp.json | 0 .../xregistry_endpoint_registry_http.json | 0 .../xregistry_endpoint_registry_kafka.json | 0 .../xregistry_endpoint_registry_mqtt.json | 0 .../xregistry_endpoint_registry_nats.json | 0 ...registry_messagedefinition_definition.json | 0 .../xregistry_messagedefinition_registry.json | 0 ...istry_messagedefinition_registry_amqp.json | 0 ...essagedefinition_registry_cloudevents.json | 0 ...istry_messagedefinition_registry_http.json | 0 ...stry_messagedefinition_registry_kafka.json | 0 ...istry_messagedefinition_registry_mqtt.json | 0 .../schemas/xregistry_messaging_catalog.json | 0 .../schemas/xregistry_openapi.json | 612 +++++++++-------- .../schemas/xregistry_openapi_endpoint.json | 618 ++++++++++------- .../xregistry_openapi_messagedefinition.json | 618 ++++++++++------- .../schemas/xregistry_openapi_schema.json | 620 +++++++++++------- .../schemas/xregistry_openapi_template.json | 620 +++++++++++------- ...pi_template_endpoint_registry_sed_args.txt | 0 ...te_messagedefinition_registry_sed_args.txt | 0 ...napi_template_schema_registry_sed_args.txt | 0 .../schemas/xregistry_resources.json | 0 .../schemas/xregistry_schema_registry.json | 0 .../asaql/_schemas/_json.asaql.jinja | 0 .../templates/asaql/_templateinfo.json | 0 .../asaql/dispatch/JobConfig.json.jinja | 0 .../dispatch/SampleEvents/sampleevents.jinja | 0 .../asaql/dispatch/_templateinfo.json | 0 .../asaql/dispatch/{projectname}.asaql.jinja | 0 .../asaql/dispatch/{projectname}.json.jinja | 0 .../dispatchpayload/JobConfig.json.jinja | 0 .../SampleEvents/sampleevents.jinja | 0 .../asaql/dispatchpayload/_templateinfo.json | 0 .../_{projectname}.asaql.jinja | 0 .../dispatchpayload/{projectname}.json.jinja | 0 .../templates/asyncapi/_templateinfo.json | 0 .../asyncapi/producer/_templateinfo.json | 0 .../asyncapi/producer/{projectname}.yml.jinja | 2 +- .../templates/cs/_common/amqp.jinja.include | 0 .../cs/_common/cloudevents.jinja.include | 0 .../templates/cs/_common/mqtt.jinja.include | 0 .../templates/cs/_schemas/_templateinfo.json | 0 .../cs/_schemas/data/SchemaConstants.cs.jinja | 0 .../cs/_schemas/data/_avro.avsc.jinja | 0 .../templates/cs/_schemas/data/_avro.cs.jinja | 0 .../templates/cs/_schemas/data/_json.cs.jinja | 0 .../cs/_schemas/data/_proto.cs.jinja | 0 .../cs/_schemas/data/_proto.proto.jinja | 0 .../templates/cs/_templateinfo.json | 0 .../DispatchInterfaces.cs.jinja | 0 .../cs/azfunctioneventgrid/Function.cs.jinja | 0 .../cs/azfunctioneventgrid/_templateinfo.json | 0 .../cs/azfunctioneventgrid/host.json.jinja | 0 .../local.settings.json.jinja | 0 .../cs/azfunctioneventgrid/nuget.config.jinja | 0 .../{projectname}.csproj.jinja | 0 .../DispatchInterfaces.cs.jinja | 0 .../EventDataCloudEventsExtensions.cs.jinja | 0 .../cs/azfunctioneventhubs/Function.cs.jinja | 0 .../cs/azfunctioneventhubs/_templateinfo.json | 0 .../cs/azfunctioneventhubs/host.json.jinja | 0 .../local.settings.json.jinja | 0 .../cs/azfunctioneventhubs/nuget.config.jinja | 0 .../{projectname}.csproj.jinja | 0 .../DispatchInterfaces.cs.jinja | 0 .../cs/azfunctionhttp/Function.cs.jinja | 0 .../cs/azfunctionhttp/_templateinfo.json | 0 .../cs/azfunctionhttp/host.json.jinja | 0 .../azfunctionhttp/local.settings.json.jinja | 0 .../cs/azfunctionhttp/nuget.config.jinja | 0 .../azfunctionhttp/{projectname}.csproj.jinja | 0 .../DispatchInterfaces.cs.jinja | 0 .../cs/azfunctionservicebus/Function.cs.jinja | 0 .../ServiceBusCloudEventsExtensions.cs.jinja | 0 .../azfunctionservicebus/_templateinfo.json | 0 .../cs/azfunctionservicebus/host.json.jinja | 0 .../local.settings.json.jinja | 0 .../azfunctionservicebus/nuget.config.jinja | 0 .../{projectname}.csproj.jinja | 0 .../cs/consumer/DispatchInterfaces.cs.jinja | 0 .../cs/consumer/EventConsumer.cs.jinja | 0 .../templates/cs/consumer/_templateinfo.json | 0 .../templates/cs/consumer/nuget.config.jinja | 0 .../cs/consumer/{projectname}.csproj.jinja | 0 .../cs/producer/EventProducer.cs.jinja | 0 .../templates/cs/producer/_templateinfo.json | 0 .../templates/cs/producer/nuget.config.jinja | 0 .../cs/producer/{projectname}.csproj.jinja | 0 .../templates/java/_common/amqp.jinja.include | 0 .../java/_common/cloudevents.jinja.include | 0 .../templates/java/_common/mqtt.jinja.include | 0 .../_schemas/main/_json.{classdir}.java.jinja | 0 .../java/_schemas/main/avro/_avro.avsc.jinja | 0 .../_schemas/main/protobuf/_proto.proto.jinja | 0 .../templates/java/_templateinfo.json | 0 .../java/consumer/_templateinfo.json | 0 .../{classdir}DispatchInterfaces.java.jinja | 0 .../main/{classdir}EventConsumer.java.jinja | 0 .../{projectdir}ExceptionMessages.java.jinja | 0 .../main/{projectdir}RegexPatterns.java.jinja | 0 .../templates/java/consumer/pom.xml.jinja | 0 .../java/producer/_templateinfo.json | 0 .../main/{classdir}EventProducer.java.jinja | 0 .../{projectdir}ExceptionMessages.java.jinja | 0 .../main/{projectdir}RegexPatterns.java.jinja | 0 .../templates/java/producer/pom.xml.jinja | 0 .../templates/openapi/_templateinfo.json | 0 .../openapi/producer/_templateinfo.json | 0 .../openapi/producer/{projectname}.yml.jinja | 0 .../openapi/subscriber/_templateinfo.json | 0 .../subscriber/{projectname}.yml.jinja | 0 .../templates/py/_schemas/_json.py.jinja | 0 .../templates/py/_templateinfo.json | 0 .../py/producer/producer_client.py.jinja | 0 .../ts/_common/.eslintrc.jinja.include | 0 .../ts/_common/.gitignore.jinja.include | 0 .../ts/_common/cloudevents.jinja.include | 0 .../ts/_common/package.json.jinja.include | 0 .../tsconfig.browser.json.jinja.include | 0 .../ts/_common/tsconfig.json.jinja.include | 0 .../_common/webpack.config.js.jinja.include | 0 .../ts/_schemas/src/schema/_json.json.jinja | 0 .../ts/_schemas/src/types/_json.ts.jinja | 0 .../templates/ts/_templateinfo.json | 0 .../ts/producerhttp/.gitignore.jinja | 0 .../ts/producerhttp/_templateinfo.json | 0 .../templates/ts/producerhttp/eslintrc.jinja | 0 .../ts/producerhttp/package.json.jinja | 0 .../ts/producerhttp/src/index.ts.jinja | 0 .../ts/producerhttp/src/producer.ts.jinja | 0 .../producerhttp/src/schema/formats.js.jinja | 0 .../ts/producerhttp/src/types/_index.ts.jinja | 0 .../producerhttp/tsconfig.browser.json.jinja | 0 .../ts/producerhttp/tsconfig.json.jinja | 0 .../ts/producerhttp/webpack.config.js.jinja | 0 .../.gitignore | 0 .../.vscodeignore | 0 .../LICENSE.txt | 0 .../README.md | 0 .../cloudevents-icon-color.png | Bin .../esbuild.js | 2 +- .../package-lock.json | 4 +- .../package.json | 10 +- .../package.sh | 0 .../src/extension.ts | 8 +- .../src/panels/CodeGeneratorWizardPanel.ts | 6 +- .../src/utilities/getNonce.ts | 0 .../src/utilities/getUri.ts | 0 .../src/webview/codicon.css | 0 .../src/webview/codicon.ttf | Bin .../src/webview/main.ts | 0 .../src/webview/style.css | 0 .../themes/file-icons.json | 0 .../themes/icons/cloudevents-icon-black.svg | 0 .../icons/cloudevents-icon-color-reversed.svg | 0 .../themes/icons/cloudevents-icon-color.svg | 0 .../themes/icons/cloudevents-icon-white.svg | 0 .../tsconfig.json | 0 190 files changed, 2024 insertions(+), 1296 deletions(-) rename {ceregistry => xregistry}/__init__.py (100%) rename {ceregistry => xregistry}/__main__.py (100%) rename {ceregistry => xregistry}/cli.py (100%) rename {ceregistry => xregistry}/commands/__init__.py (100%) rename {ceregistry => xregistry}/commands/core.py (100%) rename {ceregistry => xregistry}/commands/generate_code.py (100%) rename {ceregistry => xregistry}/commands/list_templates.py (100%) rename {ceregistry => xregistry}/commands/validate_definitions.py (100%) rename {ceregistry => xregistry}/schemas/_xregistry_messaging_catalog_types.json (100%) rename {ceregistry => xregistry}/schemas/generate_openapis.sh (100%) rename {ceregistry => xregistry}/schemas/xregistry_endpoint_protocol_options.json (100%) rename {ceregistry => xregistry}/schemas/xregistry_endpoint_registry.json (100%) rename {ceregistry => xregistry}/schemas/xregistry_endpoint_registry_amqp.json (100%) rename {ceregistry => xregistry}/schemas/xregistry_endpoint_registry_http.json (100%) rename {ceregistry => xregistry}/schemas/xregistry_endpoint_registry_kafka.json (100%) rename {ceregistry => xregistry}/schemas/xregistry_endpoint_registry_mqtt.json (100%) rename {ceregistry => xregistry}/schemas/xregistry_endpoint_registry_nats.json (100%) rename {ceregistry => xregistry}/schemas/xregistry_messagedefinition_definition.json (100%) rename {ceregistry => xregistry}/schemas/xregistry_messagedefinition_registry.json (100%) rename {ceregistry => xregistry}/schemas/xregistry_messagedefinition_registry_amqp.json (100%) rename {ceregistry => xregistry}/schemas/xregistry_messagedefinition_registry_cloudevents.json (100%) rename {ceregistry => xregistry}/schemas/xregistry_messagedefinition_registry_http.json (100%) rename {ceregistry => xregistry}/schemas/xregistry_messagedefinition_registry_kafka.json (100%) rename {ceregistry => xregistry}/schemas/xregistry_messagedefinition_registry_mqtt.json (100%) rename {ceregistry => xregistry}/schemas/xregistry_messaging_catalog.json (100%) rename {ceregistry => xregistry}/schemas/xregistry_openapi.json (71%) rename {ceregistry => xregistry}/schemas/xregistry_openapi_endpoint.json (69%) rename {ceregistry => xregistry}/schemas/xregistry_openapi_messagedefinition.json (69%) rename {ceregistry => xregistry}/schemas/xregistry_openapi_schema.json (68%) rename {ceregistry => xregistry}/schemas/xregistry_openapi_template.json (68%) rename {ceregistry => xregistry}/schemas/xregistry_openapi_template_endpoint_registry_sed_args.txt (100%) rename {ceregistry => xregistry}/schemas/xregistry_openapi_template_messagedefinition_registry_sed_args.txt (100%) rename {ceregistry => xregistry}/schemas/xregistry_openapi_template_schema_registry_sed_args.txt (100%) rename {ceregistry => xregistry}/schemas/xregistry_resources.json (100%) rename {ceregistry => xregistry}/schemas/xregistry_schema_registry.json (100%) rename {ceregistry => xregistry}/templates/asaql/_schemas/_json.asaql.jinja (100%) rename {ceregistry => xregistry}/templates/asaql/_templateinfo.json (100%) rename {ceregistry => xregistry}/templates/asaql/dispatch/JobConfig.json.jinja (100%) rename {ceregistry => xregistry}/templates/asaql/dispatch/SampleEvents/sampleevents.jinja (100%) rename {ceregistry => xregistry}/templates/asaql/dispatch/_templateinfo.json (100%) rename {ceregistry => xregistry}/templates/asaql/dispatch/{projectname}.asaql.jinja (100%) rename {ceregistry => xregistry}/templates/asaql/dispatch/{projectname}.json.jinja (100%) rename {ceregistry => xregistry}/templates/asaql/dispatchpayload/JobConfig.json.jinja (100%) rename {ceregistry => xregistry}/templates/asaql/dispatchpayload/SampleEvents/sampleevents.jinja (100%) rename {ceregistry => xregistry}/templates/asaql/dispatchpayload/_templateinfo.json (100%) rename {ceregistry => xregistry}/templates/asaql/dispatchpayload/_{projectname}.asaql.jinja (100%) rename {ceregistry => xregistry}/templates/asaql/dispatchpayload/{projectname}.json.jinja (100%) rename {ceregistry => xregistry}/templates/asyncapi/_templateinfo.json (100%) rename {ceregistry => xregistry}/templates/asyncapi/producer/_templateinfo.json (100%) rename {ceregistry => xregistry}/templates/asyncapi/producer/{projectname}.yml.jinja (99%) rename {ceregistry => xregistry}/templates/cs/_common/amqp.jinja.include (100%) rename {ceregistry => xregistry}/templates/cs/_common/cloudevents.jinja.include (100%) rename {ceregistry => xregistry}/templates/cs/_common/mqtt.jinja.include (100%) rename {ceregistry => xregistry}/templates/cs/_schemas/_templateinfo.json (100%) rename {ceregistry => xregistry}/templates/cs/_schemas/data/SchemaConstants.cs.jinja (100%) rename {ceregistry => xregistry}/templates/cs/_schemas/data/_avro.avsc.jinja (100%) rename {ceregistry => xregistry}/templates/cs/_schemas/data/_avro.cs.jinja (100%) rename {ceregistry => xregistry}/templates/cs/_schemas/data/_json.cs.jinja (100%) rename {ceregistry => xregistry}/templates/cs/_schemas/data/_proto.cs.jinja (100%) rename {ceregistry => xregistry}/templates/cs/_schemas/data/_proto.proto.jinja (100%) rename {ceregistry => xregistry}/templates/cs/_templateinfo.json (100%) rename {ceregistry => xregistry}/templates/cs/azfunctioneventgrid/DispatchInterfaces.cs.jinja (100%) rename {ceregistry => xregistry}/templates/cs/azfunctioneventgrid/Function.cs.jinja (100%) rename {ceregistry => xregistry}/templates/cs/azfunctioneventgrid/_templateinfo.json (100%) rename {ceregistry => xregistry}/templates/cs/azfunctioneventgrid/host.json.jinja (100%) rename {ceregistry => xregistry}/templates/cs/azfunctioneventgrid/local.settings.json.jinja (100%) rename {ceregistry => xregistry}/templates/cs/azfunctioneventgrid/nuget.config.jinja (100%) rename {ceregistry => xregistry}/templates/cs/azfunctioneventgrid/{projectname}.csproj.jinja (100%) rename {ceregistry => xregistry}/templates/cs/azfunctioneventhubs/DispatchInterfaces.cs.jinja (100%) rename {ceregistry => xregistry}/templates/cs/azfunctioneventhubs/EventDataCloudEventsExtensions.cs.jinja (100%) rename {ceregistry => xregistry}/templates/cs/azfunctioneventhubs/Function.cs.jinja (100%) rename {ceregistry => xregistry}/templates/cs/azfunctioneventhubs/_templateinfo.json (100%) rename {ceregistry => xregistry}/templates/cs/azfunctioneventhubs/host.json.jinja (100%) rename {ceregistry => xregistry}/templates/cs/azfunctioneventhubs/local.settings.json.jinja (100%) rename {ceregistry => xregistry}/templates/cs/azfunctioneventhubs/nuget.config.jinja (100%) rename {ceregistry => xregistry}/templates/cs/azfunctioneventhubs/{projectname}.csproj.jinja (100%) rename {ceregistry => xregistry}/templates/cs/azfunctionhttp/DispatchInterfaces.cs.jinja (100%) rename {ceregistry => xregistry}/templates/cs/azfunctionhttp/Function.cs.jinja (100%) rename {ceregistry => xregistry}/templates/cs/azfunctionhttp/_templateinfo.json (100%) rename {ceregistry => xregistry}/templates/cs/azfunctionhttp/host.json.jinja (100%) rename {ceregistry => xregistry}/templates/cs/azfunctionhttp/local.settings.json.jinja (100%) rename {ceregistry => xregistry}/templates/cs/azfunctionhttp/nuget.config.jinja (100%) rename {ceregistry => xregistry}/templates/cs/azfunctionhttp/{projectname}.csproj.jinja (100%) rename {ceregistry => xregistry}/templates/cs/azfunctionservicebus/DispatchInterfaces.cs.jinja (100%) rename {ceregistry => xregistry}/templates/cs/azfunctionservicebus/Function.cs.jinja (100%) rename {ceregistry => xregistry}/templates/cs/azfunctionservicebus/ServiceBusCloudEventsExtensions.cs.jinja (100%) rename {ceregistry => xregistry}/templates/cs/azfunctionservicebus/_templateinfo.json (100%) rename {ceregistry => xregistry}/templates/cs/azfunctionservicebus/host.json.jinja (100%) rename {ceregistry => xregistry}/templates/cs/azfunctionservicebus/local.settings.json.jinja (100%) rename {ceregistry => xregistry}/templates/cs/azfunctionservicebus/nuget.config.jinja (100%) rename {ceregistry => xregistry}/templates/cs/azfunctionservicebus/{projectname}.csproj.jinja (100%) rename {ceregistry => xregistry}/templates/cs/consumer/DispatchInterfaces.cs.jinja (100%) rename {ceregistry => xregistry}/templates/cs/consumer/EventConsumer.cs.jinja (100%) rename {ceregistry => xregistry}/templates/cs/consumer/_templateinfo.json (100%) rename {ceregistry => xregistry}/templates/cs/consumer/nuget.config.jinja (100%) rename {ceregistry => xregistry}/templates/cs/consumer/{projectname}.csproj.jinja (100%) rename {ceregistry => xregistry}/templates/cs/producer/EventProducer.cs.jinja (100%) rename {ceregistry => xregistry}/templates/cs/producer/_templateinfo.json (100%) rename {ceregistry => xregistry}/templates/cs/producer/nuget.config.jinja (100%) rename {ceregistry => xregistry}/templates/cs/producer/{projectname}.csproj.jinja (100%) rename {ceregistry => xregistry}/templates/java/_common/amqp.jinja.include (100%) rename {ceregistry => xregistry}/templates/java/_common/cloudevents.jinja.include (100%) rename {ceregistry => xregistry}/templates/java/_common/mqtt.jinja.include (100%) rename {ceregistry => xregistry}/templates/java/_schemas/main/_json.{classdir}.java.jinja (100%) rename {ceregistry => xregistry}/templates/java/_schemas/main/avro/_avro.avsc.jinja (100%) rename {ceregistry => xregistry}/templates/java/_schemas/main/protobuf/_proto.proto.jinja (100%) rename {ceregistry => xregistry}/templates/java/_templateinfo.json (100%) rename {ceregistry => xregistry}/templates/java/consumer/_templateinfo.json (100%) rename {ceregistry => xregistry}/templates/java/consumer/main/{classdir}DispatchInterfaces.java.jinja (100%) rename {ceregistry => xregistry}/templates/java/consumer/main/{classdir}EventConsumer.java.jinja (100%) rename {ceregistry => xregistry}/templates/java/consumer/main/{projectdir}ExceptionMessages.java.jinja (100%) rename {ceregistry => xregistry}/templates/java/consumer/main/{projectdir}RegexPatterns.java.jinja (100%) rename {ceregistry => xregistry}/templates/java/consumer/pom.xml.jinja (100%) rename {ceregistry => xregistry}/templates/java/producer/_templateinfo.json (100%) rename {ceregistry => xregistry}/templates/java/producer/main/{classdir}EventProducer.java.jinja (100%) rename {ceregistry => xregistry}/templates/java/producer/main/{projectdir}ExceptionMessages.java.jinja (100%) rename {ceregistry => xregistry}/templates/java/producer/main/{projectdir}RegexPatterns.java.jinja (100%) rename {ceregistry => xregistry}/templates/java/producer/pom.xml.jinja (100%) rename {ceregistry => xregistry}/templates/openapi/_templateinfo.json (100%) rename {ceregistry => xregistry}/templates/openapi/producer/_templateinfo.json (100%) rename {ceregistry => xregistry}/templates/openapi/producer/{projectname}.yml.jinja (100%) rename {ceregistry => xregistry}/templates/openapi/subscriber/_templateinfo.json (100%) rename {ceregistry => xregistry}/templates/openapi/subscriber/{projectname}.yml.jinja (100%) rename {ceregistry => xregistry}/templates/py/_schemas/_json.py.jinja (100%) rename {ceregistry => xregistry}/templates/py/_templateinfo.json (100%) rename {ceregistry => xregistry}/templates/py/producer/producer_client.py.jinja (100%) rename {ceregistry => xregistry}/templates/ts/_common/.eslintrc.jinja.include (100%) rename {ceregistry => xregistry}/templates/ts/_common/.gitignore.jinja.include (100%) rename {ceregistry => xregistry}/templates/ts/_common/cloudevents.jinja.include (100%) rename {ceregistry => xregistry}/templates/ts/_common/package.json.jinja.include (100%) rename {ceregistry => xregistry}/templates/ts/_common/tsconfig.browser.json.jinja.include (100%) rename {ceregistry => xregistry}/templates/ts/_common/tsconfig.json.jinja.include (100%) rename {ceregistry => xregistry}/templates/ts/_common/webpack.config.js.jinja.include (100%) rename {ceregistry => xregistry}/templates/ts/_schemas/src/schema/_json.json.jinja (100%) rename {ceregistry => xregistry}/templates/ts/_schemas/src/types/_json.ts.jinja (100%) rename {ceregistry => xregistry}/templates/ts/_templateinfo.json (100%) rename {ceregistry => xregistry}/templates/ts/producerhttp/.gitignore.jinja (100%) rename {ceregistry => xregistry}/templates/ts/producerhttp/_templateinfo.json (100%) rename {ceregistry => xregistry}/templates/ts/producerhttp/eslintrc.jinja (100%) rename {ceregistry => xregistry}/templates/ts/producerhttp/package.json.jinja (100%) rename {ceregistry => xregistry}/templates/ts/producerhttp/src/index.ts.jinja (100%) rename {ceregistry => xregistry}/templates/ts/producerhttp/src/producer.ts.jinja (100%) rename {ceregistry => xregistry}/templates/ts/producerhttp/src/schema/formats.js.jinja (100%) rename {ceregistry => xregistry}/templates/ts/producerhttp/src/types/_index.ts.jinja (100%) rename {ceregistry => xregistry}/templates/ts/producerhttp/tsconfig.browser.json.jinja (100%) rename {ceregistry => xregistry}/templates/ts/producerhttp/tsconfig.json.jinja (100%) rename {ceregistry => xregistry}/templates/ts/producerhttp/webpack.config.js.jinja (100%) rename {ceregistry_vscode => xregistry_vscode}/.gitignore (100%) rename {ceregistry_vscode => xregistry_vscode}/.vscodeignore (100%) rename {ceregistry_vscode => xregistry_vscode}/LICENSE.txt (100%) rename {ceregistry_vscode => xregistry_vscode}/README.md (100%) rename {ceregistry_vscode => xregistry_vscode}/cloudevents-icon-color.png (100%) rename {ceregistry_vscode => xregistry_vscode}/esbuild.js (97%) rename {ceregistry_vscode => xregistry_vscode}/package-lock.json (99%) rename {ceregistry_vscode => xregistry_vscode}/package.json (90%) rename {ceregistry_vscode => xregistry_vscode}/package.sh (100%) rename {ceregistry_vscode => xregistry_vscode}/src/extension.ts (90%) rename {ceregistry_vscode => xregistry_vscode}/src/panels/CodeGeneratorWizardPanel.ts (96%) rename {ceregistry_vscode => xregistry_vscode}/src/utilities/getNonce.ts (100%) rename {ceregistry_vscode => xregistry_vscode}/src/utilities/getUri.ts (100%) rename {ceregistry_vscode => xregistry_vscode}/src/webview/codicon.css (100%) rename {ceregistry_vscode => xregistry_vscode}/src/webview/codicon.ttf (100%) rename {ceregistry_vscode => xregistry_vscode}/src/webview/main.ts (100%) rename {ceregistry_vscode => xregistry_vscode}/src/webview/style.css (100%) rename {ceregistry_vscode => xregistry_vscode}/themes/file-icons.json (100%) rename {ceregistry_vscode => xregistry_vscode}/themes/icons/cloudevents-icon-black.svg (100%) rename {ceregistry_vscode => xregistry_vscode}/themes/icons/cloudevents-icon-color-reversed.svg (100%) rename {ceregistry_vscode => xregistry_vscode}/themes/icons/cloudevents-icon-color.svg (100%) rename {ceregistry_vscode => xregistry_vscode}/themes/icons/cloudevents-icon-white.svg (100%) rename {ceregistry_vscode => xregistry_vscode}/tsconfig.json (100%) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7f817d4..12b723e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -24,16 +24,16 @@ jobs: uses: battila7/get-version-action@v2 - name: Set version environment variable run: | - echo "CEREGISTRY_VERSION=${{steps.get_version.outputs.version-without-v}}" > $GITHUB_ENV + echo "xregistry_VERSION=${{steps.get_version.outputs.version-without-v}}" > $GITHUB_ENV - name: Build Python package run: | python -m pip install --upgrade pip build wheel python -m build --sdist --wheel --outdir dist - # install Node dependencies including vsce and run vsce package in ceregistry_vscode, putting output in dist + # install Node dependencies including vsce and run vsce package in xregistry_vscode, putting output in dist - name: Build VSCode extension run: | npm install -g @vscode/vsce - cd ceregistry_vscode + cd xregistry_vscode npm --no-git-tag-version version ${{steps.get_version.outputs.version-without-v}} npm install vsce package diff --git a/.gitignore b/.gitignore index 67c53a6..fa6f81f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ tmp/ -ceregistry/_version.py +xregistry/_version.py *.egg-info/ build/ **/.vscode/** diff --git a/.vscode/launch.json b/.vscode/launch.json index 7092a1b..909fb28 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -7,7 +7,7 @@ { "args": ["--extensionDevelopmentPath=${workspaceFolder}"], "name": "Launch Extension", - "preLaunchTask": "tsc: build - ceregistry_vscode/tsconfig.json", + "preLaunchTask": "tsc: build - xregistry_vscode/tsconfig.json", "outFiles": ["${workspaceFolder}/out/**/*.js"], "request": "launch", "type": "extensionHost" @@ -24,7 +24,7 @@ "name": "Python: Code Generator EventHubs", "type": "python", "request": "launch", - "program": "-m ceregistry", + "program": "-m xregistry", "console": "integratedTerminal", "justMyCode": true, "args": "generate --language cs --style azfunctioneventhubs --definitions .\\samples\\message-definitions\\contoso-erp.cereg --projectname Contoso.ERP.Events --output c:\\temp\\output\\testeh" @@ -33,7 +33,7 @@ "name": "Python: Code Generator C# SB", "type": "python", "request": "launch", - "program": "-m ceregistry", + "program": "-m xregistry", "console": "integratedTerminal", "justMyCode": true, "args": "generate --language cs --style azfunctionservicebus --definitions .\\samples\\message-definitions\\contoso-erp.cereg --projectname Contoso.ERP.Events --output c:\\temp\\output\\testsb" @@ -42,7 +42,7 @@ "name": "Python: Code Generator C# HTTP", "type": "python", "request": "launch", - "program": "-m ceregistry", + "program": "-m xregistry", "console": "integratedTerminal", "justMyCode": true, "args": "generate --language cs --style azfunctionhttp --definitions .\\samples\\message-definitions\\contoso-erp.cereg --projectname Contoso.ERP.Events --output c:\\temp\\output\\testhttp" @@ -51,7 +51,7 @@ "name": "Python: Code Generator C# Consumer", "type": "python", "request": "launch", - "program": "-m ceregistry", + "program": "-m xregistry", "console": "integratedTerminal", "justMyCode": true, "args": "generate --language cs --style consumer --definitions .\\samples\\protocols\\http-consumer-endpoint.cereg --projectname Contoso.ERP.Events --output c:\\temp\\output\\testconsumer" @@ -60,7 +60,7 @@ "name": "Python: Code Generator openAPI Producer", "type": "python", "request": "launch", - "program": "-m ceregistry", + "program": "-m xregistry", "console": "integratedTerminal", "justMyCode": true, "args": "generate --language openapi --style producer --definitions .\\samples\\protocols\\http-producer-endpoint.cereg --projectname Contoso.ERP.Events --output c:\\temp\\output\\testopenapi" @@ -69,7 +69,7 @@ "name": "Python: Code Generator openAPI Subscriber", "type": "python", "request": "launch", - "program": "-m ceregistry", + "program": "-m xregistry", "console": "integratedTerminal", "justMyCode": true, "args": "generate --language openapi --style subscriber --definitions .\\samples\\message-definitions\\contoso-erp.cereg --projectname Contoso.ERP.Events --output c:\\temp\\output\\testopenapi2" @@ -78,7 +78,7 @@ "name": "Python: Code Generator Java producer", "type": "python", "request": "launch", - "program": "-m ceregistry", + "program": "-m xregistry", "console": "integratedTerminal", "justMyCode": true, "args": "generate --language java --style producer --definitions .\\samples\\message-definitions\\contoso-erp.cereg --projectname Contoso.ERP.Events --output c:\\temp\\output\\testjavap" @@ -87,7 +87,7 @@ "name": "Python: Code Generator Java producer Proto", "type": "python", "request": "launch", - "program": "-m ceregistry", + "program": "-m xregistry", "console": "integratedTerminal", "justMyCode": true, "args": "generate --language java --style producer --definitions .\\samples\\message-definitions\\minimal-proto.cereg --projectname Contoso.ERP.Events --output c:\\temp\\output\\testjavaproto" @@ -96,7 +96,7 @@ "name": "Python: Code Generator Java producer Avro", "type": "python", "request": "launch", - "program": "-m ceregistry", + "program": "-m xregistry", "console": "integratedTerminal", "justMyCode": true, "args": "generate --language java --style producer --definitions .\\samples\\message-definitions\\minimal-avro.cereg --projectname Contoso.ERP.Events --output c:\\temp\\output\\testjavaavro" @@ -106,7 +106,7 @@ "name": "Python: Code Generator Java consumer", "type": "python", "request": "launch", - "program": "-m ceregistry", + "program": "-m xregistry", "console": "integratedTerminal", "justMyCode": false, "args": "generate --language java --style consumer --definitions .\\samples\\message-definitions\\contoso-erp.cereg --projectname Contoso.ERP.Events --output tmp/testjavac" @@ -115,7 +115,7 @@ "name": "Python: Code Generator Java consumer Proto", "type": "python", "request": "launch", - "program": "-m ceregistry", + "program": "-m xregistry", "console": "integratedTerminal", "justMyCode": true, "args": "generate --language java --style consumer --definitions .\\samples\\message-definitions\\minimal-proto.cereg --projectname Contoso.ERP.Events --output tmp/testjavacproto" @@ -124,7 +124,7 @@ "name": "Python: Code Generator Java consumer Avro", "type": "python", "request": "launch", - "program": "-m ceregistry", + "program": "-m xregistry", "console": "integratedTerminal", "justMyCode": true, "args": "generate --language java --style consumer --definitions .\\samples\\message-definitions\\minimal-avro.cereg --projectname Contoso.ERP.Events --output tmp/testjavacavro" @@ -133,7 +133,7 @@ "name": "Python: Code Generator Fropp", "type": "python", "request": "launch", - "program": "-m ceregistry", + "program": "-m xregistry", "console": "integratedTerminal", "justMyCode": true, "args": "generate --definitions e:\\code\\cedisco-sb\\namespace-clemensv-erp.cereg --output e:\\code\\cedisco-sb\\tmp --language fropp --style producer --templates e:\\code\\cedisco-sb\\ --projectname foo" @@ -142,7 +142,7 @@ "name": "Python: Code Generator Help", "type": "python", "request": "launch", - "program": "-m ceregistry", + "program": "-m xregistry", "console": "integratedTerminal", "justMyCode": true, "args": "generate -h" @@ -151,7 +151,7 @@ "name": "Python: List JSON", "type": "python", "request": "launch", - "program": "-m ceregistry", + "program": "-m xregistry", "console": "integratedTerminal", "justMyCode": true, "args": "list --format json" @@ -160,7 +160,7 @@ "name": "Python: Validate", "type": "python", "request": "launch", - "program": "-m ceregistry", + "program": "-m xregistry", "console": "integratedTerminal", "justMyCode": true, "args": "validate --definitions E:\\Code\\cedisco-codegen\\test\\cs\\http_end_to_end_proto\\http_end_to_end_proto.cereg" diff --git a/MANIFEST.in b/MANIFEST.in index e2a81e5..c9eb68e 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1 +1 @@ -recursive-include ceregistry/templates *.jinja *.json \ No newline at end of file +recursive-include xregistry/templates *.jinja *.json \ No newline at end of file diff --git a/README.md b/README.md index 0023793..4b54201 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ and eventing objects. This project is a client for interacting with a CloudEvent can, as one feature, generate code from the discovery metadata held in the registry. A current, formal document schema for discovery documents (.cereg) is embedded in this -project at [ceregistry/schemas/xregistry_messaging_catalog.json](ceregistry/schemas/xregistry_messaging_catalog.json). +project at [xregistry/schemas/xregistry_messaging_catalog.json](xregistry/schemas/xregistry_messaging_catalog.json). > The schema in this prototype reflects changes not yet merged into the formal > spec docs in the CloudEvents project repo. @@ -233,10 +233,10 @@ If you want to develop locally and/or run the included tests follow the instruct ## Usage -The tool is invoked as `ceregistry` and supports the following subcommands: -- `ceregistry generate`: Generate code -- `ceregistry validate`: Validate a definition -- `ceregistry list`: List available templates +The tool is invoked as `xregistry` and supports the following subcommands: +- `xregistry generate`: Generate code +- `xregistry validate`: Validate a definition +- `xregistry list`: List available templates ### Generate @@ -290,7 +290,7 @@ Especially noteworthy might be the support for both AsyncAPI and OpenAPI. The tool can generate AsyncAPI definitions for producer endpoints with: ```shell -ceregistry generate --language=openapi --style=producer --projectname=MyProjectProducer --definitions=definitions.cereg --output=MyProjectProducer +xregistry generate --language=openapi --style=producer --projectname=MyProjectProducer --definitions=definitions.cereg --output=MyProjectProducer ``` This will yield a `MyProjectProducer/MyProjectProducer.yml' file that can be used to generate a @@ -299,7 +299,7 @@ producer client for the given endpoint. Similarly, the tool can generate OpenAPI definitions for subscriber endpoints with: ```shell -ceregistry generate --language=openapi --style=subscriber --projectname=MyProjectSubscriber --definitions=definitions.cereg --output=MyProjectSubscriber +xregistry generate --language=openapi --style=subscriber --projectname=MyProjectSubscriber --definitions=definitions.cereg --output=MyProjectSubscriber ``` This will yield a `MyProjectSubscriber/MyProjectSubcriber.yml' file that can be @@ -311,7 +311,7 @@ with the CloudEvents Subscription API. The tool can generate AsyncAPI definitions with: ```shell -ceregistry generate --language=asyncapi --style=producer --projectname=MyProjectProducer --definitions=definitions.cereg --output=MyProjectProducer +xregistry generate --language=asyncapi --style=producer --projectname=MyProjectProducer --definitions=definitions.cereg --output=MyProjectProducer ``` For AsyncAPI, the tool support an extension parameter ce_content_mode that can be used to control the CloudEvents content mode of the generated AsyncAPI definition. The default is "structured" and the other supported value is "binary". The AsyncAPI template supports HTTP, MQTT, and AMQP 1.0 endpoints and injects the appropriate headers for the selected content mode for each protocol. @@ -319,7 +319,7 @@ For AsyncAPI, the tool support an extension parameter ce_content_mode that can b Use it like this: ```shell -ceregistry generate --language=asyncapi --style=producer --projectname=MyProjectProducer --definitions=definitions.cereg --output=MyProjectProducer --template-args ce_content_mode=binary +xregistry generate --language=asyncapi --style=producer --projectname=MyProjectProducer --definitions=definitions.cereg --output=MyProjectProducer --template-args ce_content_mode=binary ``` #### Custom Templates diff --git a/docs/authoring_templates.md b/docs/authoring_templates.md index 4b5e772..c092998 100644 --- a/docs/authoring_templates.md +++ b/docs/authoring_templates.md @@ -91,7 +91,7 @@ generate serializer code, you don't need to provide any templates in the `_schemas`. If you don't need to share macros across styles, you don't need to provide any templates in the `_common` directory. -The full set of templates for the C# language is [here](../ceregistry/templates/cs). +The full set of templates for the C# language is [here](../xregistry/templates/cs). ## Template Info diff --git a/pyproject.toml b/pyproject.toml index 77e8df7..c6f0d15 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,7 +3,7 @@ build-backend = "flit_scm:buildapi" requires = ["flit_core>=3.2", "flit_scm", "wheel"] [project] -name = "ceregistry" +name = "xregistry" dynamic = ["version"] authors = [ { name = "Clemens Vasters", email = "clemensv@microsoft.com"} @@ -28,7 +28,7 @@ dependencies = [ ] [project.scripts] -ceregistry = "ceregistry.cli:main" +xregistry = "xregistry.cli:main" [tool.setuptools_scm] -write_to = "ceregistry/_version.py" \ No newline at end of file +write_to = "xregistry/_version.py" \ No newline at end of file diff --git a/test/asyncapi/producer/test_asyncapi_producer.py b/test/asyncapi/producer/test_asyncapi_producer.py index 454a741..b3844bd 100644 --- a/test/asyncapi/producer/test_asyncapi_producer.py +++ b/test/asyncapi/producer/test_asyncapi_producer.py @@ -7,9 +7,9 @@ project_root = os.path.abspath(os.path.join(os.path.dirname(__file__), '../../..')) sys.path.append(os.path.join(project_root)) -import ceregistry +import xregistry -# this test invokes the ceregistry command line tool to generate a C# proxy and a consumer +# this test invokes the xregistry command line tool to generate a C# proxy and a consumer # and then builds the proxy and the consumer and runs a prepared test that integrates both def test_asyncapi_producer(): # clean the output directory @@ -17,29 +17,29 @@ def test_asyncapi_producer(): if os.path.exists(output_dir): shutil.rmtree(output_dir) # generate the producer - sys.argv = ['ceregistry', 'generate', + sys.argv = ['xregistry', 'generate', '--style', 'producer', '--language', 'asyncapi', '--definitions', os.path.join(os.path.dirname(__file__), 'asyncapi_producer.cereg'), '--output', output_dir, '--projectname', 'ContosoErpProducerBinary', '--template-args', 'ce_content_mode=binary'] - if ceregistry.cli() != 0: - raise Exception("ceregistry failed") + if xregistry.cli() != 0: + raise Exception("xregistry failed") # run dotnet build on the csproj here that references the generated files already cmd = 'asyncapi validate ' + os.path.join(output_dir, "ContosoErpProducerBinary.yml") subprocess.check_call(cmd.split(" ") if platform.system() == "Windows" else cmd, cwd=os.path.dirname(__file__), stdout=sys.stdout, stderr=sys.stderr, shell=True) # generate the producer - sys.argv = ['ceregistry', 'generate', + sys.argv = ['xregistry', 'generate', '--style', 'producer', '--language', 'asyncapi', '--definitions', os.path.join(os.path.dirname(__file__), 'asyncapi_producer.cereg'), '--output', output_dir, '--projectname', 'ContosoErpProducerStructured', '--template-args', 'ce_content_mode=structured'] - if ceregistry.cli() != 0: - raise Exception("ceregistry failed") + if xregistry.cli() != 0: + raise Exception("xregistry failed") # run dotnet build on the csproj here that references the generated files already cmd = 'asyncapi validate ' + os.path.join(output_dir, "ContosoErpProducerStructured.yml") subprocess.check_call(cmd.split(" ") if platform.system() == "Windows" else cmd, cwd=os.path.dirname(__file__), stdout=sys.stdout, stderr=sys.stderr, shell=True) diff --git a/test/core/test_exit.py b/test/core/test_exit.py index 000c041..4caa83e 100644 --- a/test/core/test_exit.py +++ b/test/core/test_exit.py @@ -5,7 +5,7 @@ project_root = os.path.abspath(os.path.join(os.path.dirname(__file__), '../..')) sys.path.append(os.path.join(project_root)) -from ceregistry.commands.generate_code import * +from xregistry.commands.generate_code import * def test_exit(): env = jinja2.Environment(extensions=[ExitExtension]) diff --git a/test/core/test_jinja_filters.py b/test/core/test_jinja_filters.py index 27dac12..7fbf9d1 100644 --- a/test/core/test_jinja_filters.py +++ b/test/core/test_jinja_filters.py @@ -5,7 +5,7 @@ project_root = os.path.abspath(os.path.join(os.path.dirname(__file__), '../..')) sys.path.append(os.path.join(project_root)) -from ceregistry.commands.generate_code import * +from xregistry.commands.generate_code import * def test_pascal(): assert pascal("foo") == "Foo" diff --git a/test/cs/amqp_end_to_end/test_amqp_end_to_end.py b/test/cs/amqp_end_to_end/test_amqp_end_to_end.py index 60eb752..1303b7b 100644 --- a/test/cs/amqp_end_to_end/test_amqp_end_to_end.py +++ b/test/cs/amqp_end_to_end/test_amqp_end_to_end.py @@ -9,30 +9,30 @@ project_root = os.path.abspath(os.path.join(os.path.dirname(__file__), '../../..')) sys.path.append(os.path.join(project_root)) -import ceregistry +import xregistry -# this test invokes the ceregistry command line tool to generate a C# proxy and a consumer +# this test invokes the xregistry command line tool to generate a C# proxy and a consumer # and then builds the proxy and the consumer and runs a prepared test that integrates both def run_test(): # clean the output directory if os.path.exists(os.path.join(project_root, 'tmp/test/cs/amqp_end_to_end/')): shutil.rmtree(os.path.join(project_root, 'tmp/test/cs/amqp_end_to_end/')) # generate the producer - sys.argv = ['ceregistry', 'generate', + sys.argv = ['xregistry', 'generate', '--style', 'producer', '--language', 'cs', '--definitions', os.path.join(os.path.dirname(__file__), 'amqp_end_to_end.cereg'), '--output', os.path.join(project_root, 'tmp/test/cs/amqp_end_to_end/producer/'), '--projectname', 'Contoso.ERP.Producer'] - ceregistry.cli() + xregistry.cli() # generate the consumer - sys.argv = [ 'ceregistry', 'generate', + sys.argv = [ 'xregistry', 'generate', '--style', 'consumer', '--language', 'cs', '--definitions', os.path.join(os.path.dirname(__file__), 'amqp_end_to_end.cereg'), '--output', os.path.join(project_root, 'tmp/test/cs/amqp_end_to_end/consumer/'), '--projectname', 'Contoso.ERP.Consumer'] - ceregistry.cli() + xregistry.cli() # run dotnet build on the csproj here that references the generated files already subprocess.check_call(['dotnet', 'run'], cwd=os.path.dirname(__file__), stdout=sys.stdout, stderr=sys.stderr) diff --git a/test/cs/http_azfn_http/test_azfn_http.py b/test/cs/http_azfn_http/test_azfn_http.py index 474aa04..6e8d36c 100644 --- a/test/cs/http_azfn_http/test_azfn_http.py +++ b/test/cs/http_azfn_http/test_azfn_http.py @@ -10,7 +10,7 @@ project_root = os.path.abspath(os.path.join(os.path.dirname(__file__), '../../..')) sys.path.append(os.path.join(project_root)) -import ceregistry +import xregistry # call ps to find out the process id of the process with the given name and then kill it def terminate_process(process_name): @@ -30,21 +30,21 @@ def test_azfn_http(): if os.path.exists(output): shutil.rmtree(output) # generate the producer - sys.argv = ['ceregistry', 'generate', + sys.argv = ['xregistry', 'generate', '--style', 'producer', '--language', 'cs', '--definitions', os.path.join(os.path.dirname(__file__), 'azfn_http.cereg'), '--output', os.path.join(project_root, 'tmp/test/cs/azfn_http/producer/'), '--projectname', 'Contoso.ERP.Producer'] - ceregistry.cli() + xregistry.cli() # generate the consumer - sys.argv = [ 'ceregistry', 'generate', + sys.argv = [ 'xregistry', 'generate', '--style', 'azfunctionhttp', '--language', 'cs', '--definitions', os.path.join(os.path.dirname(__file__), 'azfn_http.cereg'), '--output', os.path.join(project_root, 'tmp/test/cs/azfn_http/azfn/'), '--projectname', 'Contoso.ERP.AzureFunction'] - ceregistry.cli() + xregistry.cli() sentFileName = os.path.join(os.path.dirname(__file__), "client", "sent.txt") receivedFileName = os.path.join(os.path.dirname(__file__), "function","bin","output","received.txt") diff --git a/test/cs/http_end_to_end/test_http_end_to_end.py b/test/cs/http_end_to_end/test_http_end_to_end.py index d040b58..ea79d80 100644 --- a/test/cs/http_end_to_end/test_http_end_to_end.py +++ b/test/cs/http_end_to_end/test_http_end_to_end.py @@ -6,30 +6,30 @@ project_root = os.path.abspath(os.path.join(os.path.dirname(__file__), '../../..')) sys.path.append(os.path.join(project_root)) -import ceregistry +import xregistry -# this test invokes the ceregistry command line tool to generate a C# proxy and a consumer +# this test invokes the xregistry command line tool to generate a C# proxy and a consumer # and then builds the proxy and the consumer and runs a prepared test that integrates both def test_http_end_to_end(): # clean the output directory if os.path.exists(os.path.join(project_root, 'tmp/test/cs/http_end_to_end/')): shutil.rmtree(os.path.join(project_root, 'tmp/test/cs/http_end_to_end/')) # generate the producer - sys.argv = ['ceregistry', 'generate', + sys.argv = ['xregistry', 'generate', '--style', 'producer', '--language', 'cs', '--definitions', os.path.join(os.path.dirname(__file__), 'http_end_to_end.cereg'), '--output', os.path.join(project_root, 'tmp/test/cs/http_end_to_end/producer/'), '--projectname', 'Contoso.ERP.Producer'] - ceregistry.cli() + xregistry.cli() # generate the consumer - sys.argv = [ 'ceregistry', 'generate', + sys.argv = [ 'xregistry', 'generate', '--style', 'consumer', '--language', 'cs', '--definitions', os.path.join(os.path.dirname(__file__), 'http_end_to_end.cereg'), '--output', os.path.join(project_root, 'tmp/test/cs/http_end_to_end/consumer/'), '--projectname', 'Contoso.ERP.Consumer'] - ceregistry.cli() + xregistry.cli() # run dotnet build on the csproj here that references the generated files already subprocess.check_call(['dotnet', 'run'], cwd=os.path.dirname(__file__), stdout=sys.stdout, stderr=sys.stderr) diff --git a/test/cs/http_end_to_end_proto/test_http_end_to_end_proto.py b/test/cs/http_end_to_end_proto/test_http_end_to_end_proto.py index 3e937ee..c473d49 100644 --- a/test/cs/http_end_to_end_proto/test_http_end_to_end_proto.py +++ b/test/cs/http_end_to_end_proto/test_http_end_to_end_proto.py @@ -6,30 +6,30 @@ project_root = os.path.abspath(os.path.join(os.path.dirname(__file__), '../../..')) sys.path.append(os.path.join(project_root)) -import ceregistry +import xregistry -# this test invokes the ceregistry command line tool to generate a C# proxy and a consumer +# this test invokes the xregistry command line tool to generate a C# proxy and a consumer # and then builds the proxy and the consumer and runs a prepared test that integrates both def test_http_end_to_end_proto(): # clean the output directory if os.path.exists(os.path.join(project_root, 'tmp/test/cs/http_end_to_end_proto/')): shutil.rmtree(os.path.join(project_root, 'tmp/test/cs/http_end_to_end_proto/')) # generate the producer - sys.argv = ['ceregistry', 'generate', + sys.argv = ['xregistry', 'generate', '--style', 'producer', '--language', 'cs', '--definitions', os.path.join(os.path.dirname(__file__), 'http_end_to_end_proto.cereg'), '--output', os.path.join(project_root, 'tmp/test/cs/http_end_to_end_proto/producer/'), '--projectname', 'Contoso.ERP.Producer'] - ceregistry.cli() + xregistry.cli() # generate the consumer - sys.argv = [ 'ceregistry', 'generate', + sys.argv = [ 'xregistry', 'generate', '--style', 'consumer', '--language', 'cs', '--definitions', os.path.join(os.path.dirname(__file__), 'http_end_to_end_proto.cereg'), '--output', os.path.join(project_root, 'tmp/test/cs/http_end_to_end_proto/consumer/'), '--projectname', 'Contoso.ERP.Consumer'] - ceregistry.cli() + xregistry.cli() # run dotnet build on the csproj here that references the generated files already subprocess.check_call(['dotnet', 'run'], cwd=os.path.dirname(__file__), stdout=sys.stdout, stderr=sys.stderr) diff --git a/test/cs/inmemory_end_to_end/test_inmemory_end_to_end.py b/test/cs/inmemory_end_to_end/test_inmemory_end_to_end.py index a473bd3..4e505c8 100644 --- a/test/cs/inmemory_end_to_end/test_inmemory_end_to_end.py +++ b/test/cs/inmemory_end_to_end/test_inmemory_end_to_end.py @@ -6,30 +6,30 @@ project_root = os.path.abspath(os.path.join(os.path.dirname(__file__), '../../..')) sys.path.append(os.path.join(project_root)) -import ceregistry +import xregistry -# this test invokes the ceregistry command line tool to generate a C# proxy and a consumer +# this test invokes the xregistry command line tool to generate a C# proxy and a consumer # and then builds the proxy and the consumer and runs a prepared test that integrates both def test_inmemory_end_to_end(): # clean the output directory if os.path.exists(os.path.join(project_root, 'tmp/test/cs/inmemory_end_to_end/')): shutil.rmtree(os.path.join(project_root, 'tmp/test/cs/inmemory_end_to_end/')) # generate the producer - sys.argv = ['ceregistry', 'generate', + sys.argv = ['xregistry', 'generate', '--style', 'producer', '--language', 'cs', '--definitions', os.path.join(os.path.dirname(__file__), 'inmemory_end_to_end.cereg'), '--output', os.path.join(project_root, 'tmp/test/cs/inmemory_end_to_end/producer/'), '--projectname', 'Contoso.ERP.Producer'] - ceregistry.cli() + xregistry.cli() # generate the consumer - sys.argv = [ 'ceregistry', 'generate', + sys.argv = [ 'xregistry', 'generate', '--style', 'consumer', '--language', 'cs', '--definitions', os.path.join(os.path.dirname(__file__), 'inmemory_end_to_end.cereg'), '--output', os.path.join(project_root, 'tmp/test/cs/inmemory_end_to_end/consumer/'), '--projectname', 'Contoso.ERP.Consumer'] - ceregistry.cli() + xregistry.cli() # run dotnet build on the csproj here that references the generated files already subprocess.check_call(['dotnet', 'run'], cwd=os.path.dirname(__file__), stdout=sys.stdout, stderr=sys.stderr) diff --git a/test/cs/mqtt_end_to_end/test_mqtt_end_to_end.py b/test/cs/mqtt_end_to_end/test_mqtt_end_to_end.py index 59b483c..5360789 100644 --- a/test/cs/mqtt_end_to_end/test_mqtt_end_to_end.py +++ b/test/cs/mqtt_end_to_end/test_mqtt_end_to_end.py @@ -9,30 +9,30 @@ project_root = os.path.abspath(os.path.join(os.path.dirname(__file__), '../../..')) sys.path.append(os.path.join(project_root)) -import ceregistry +import xregistry -# this test invokes the ceregistry command line tool to generate a C# proxy and a consumer +# this test invokes the xregistry command line tool to generate a C# proxy and a consumer # and then builds the proxy and the consumer and runs a prepared test that integrates both def run_test(): # clean the output directory if os.path.exists(os.path.join(project_root, 'tmp/test/cs/mqtt_end_to_end/')): shutil.rmtree(os.path.join(project_root, 'tmp/test/cs/mqtt_end_to_end/')) # generate the producer - sys.argv = ['ceregistry', 'generate', + sys.argv = ['xregistry', 'generate', '--style', 'producer', '--language', 'cs', '--definitions', os.path.join(os.path.dirname(__file__), 'mqtt_end_to_end.cereg'), '--output', os.path.join(project_root, 'tmp/test/cs/mqtt_end_to_end/producer/'), '--projectname', 'Contoso.ERP.Producer'] - ceregistry.cli() + xregistry.cli() # generate the consumer - sys.argv = [ 'ceregistry', 'generate', + sys.argv = [ 'xregistry', 'generate', '--style', 'consumer', '--language', 'cs', '--definitions', os.path.join(os.path.dirname(__file__), 'mqtt_end_to_end.cereg'), '--output', os.path.join(project_root, 'tmp/test/cs/mqtt_end_to_end/consumer/'), '--projectname', 'Contoso.ERP.Consumer'] - ceregistry.cli() + xregistry.cli() # run dotnet build on the csproj here that references the generated files already subprocess.check_call(['dotnet', 'run'], cwd=os.path.dirname(__file__), stdout=sys.stdout, stderr=sys.stderr) diff --git a/test/java/mqtt_end_to_end/test_mqtt_end_to_end_java.py b/test/java/mqtt_end_to_end/test_mqtt_end_to_end_java.py index 0763f3a..685c18a 100644 --- a/test/java/mqtt_end_to_end/test_mqtt_end_to_end_java.py +++ b/test/java/mqtt_end_to_end/test_mqtt_end_to_end_java.py @@ -9,9 +9,9 @@ project_root = os.path.abspath(os.path.join(os.path.dirname(__file__), '../../..'.replace('/', os.path.sep))) sys.path.append(os.path.join(project_root)) -import ceregistry +import xregistry -# this test invokes the ceregistry command line tool to generate a C# proxy and a consumer +# this test invokes the xregistry command line tool to generate a C# proxy and a consumer # and then builds the proxy and the consumer and runs a prepared test that integrates both def run_test(): # clean the output directory @@ -26,22 +26,22 @@ def run_test(): subprocess.check_call(['mvn', '--quiet', 'clean', 'install', local_repo_arg], cwd=local_ce_libs, stdout=sys.stdout, stderr=sys.stderr) # generate the producer - sys.argv = ['ceregistry', 'generate', + sys.argv = ['xregistry', 'generate', '--style', 'producer', '--language', 'java', '--definitions', os.path.join(os.path.dirname(__file__), 'mqtt_end_to_end.cereg'), '--output', os.path.join(project_root, 'tmp/test/java/mqtt_end_to_end/producer/'.replace('/', os.path.sep)), '--projectname', 'Contoso.ERP.Producer'] - ceregistry.cli() + xregistry.cli() subprocess.check_call(['mvn', '--quiet', 'install', local_repo_arg], cwd=os.path.join(project_root, 'tmp/test/java/mqtt_end_to_end/producer/'.replace('/', os.path.sep)), stdout=sys.stdout, stderr=sys.stderr) # generate the consumer - sys.argv = [ 'ceregistry', 'generate', + sys.argv = [ 'xregistry', 'generate', '--style', 'consumer', '--language', 'java', '--definitions', os.path.join(os.path.dirname(__file__), 'mqtt_end_to_end.cereg'), '--output', os.path.join(project_root, 'tmp/test/java/mqtt_end_to_end/consumer/'), '--projectname', 'Contoso.ERP.Consumer'] - ceregistry.cli() + xregistry.cli() subprocess.check_call(['mvn', '--quiet', 'clean', 'install',local_repo_arg], cwd=os.path.join(project_root, 'tmp/test/java/mqtt_end_to_end/consumer/'.replace('/', os.path.sep)), stdout=sys.stdout, stderr=sys.stderr) # run mvn verify on the s here that references the generated files already diff --git a/test/openapi/producer/test_openapi_producer.py b/test/openapi/producer/test_openapi_producer.py index 63377e4..01e54dd 100644 --- a/test/openapi/producer/test_openapi_producer.py +++ b/test/openapi/producer/test_openapi_producer.py @@ -7,9 +7,9 @@ project_root = os.path.abspath(os.path.join(os.path.dirname(__file__), '../../..')) sys.path.append(os.path.join(project_root)) -import ceregistry +import xregistry -# this test invokes the ceregistry command line tool to generate a C# proxy and a consumer +# this test invokes the xregistry command line tool to generate a C# proxy and a consumer # and then builds the proxy and the consumer and runs a prepared test that integrates both def test_openapi_producer(): # clean the output directory @@ -17,13 +17,13 @@ def test_openapi_producer(): if os.path.exists(output_dir): shutil.rmtree(output_dir) # generate the producer - sys.argv = ['ceregistry', 'generate', + sys.argv = ['xregistry', 'generate', '--style', 'producer', '--language', 'openapi', '--definitions', os.path.join(os.path.dirname(__file__), 'openapi_producer.cereg'), '--output', output_dir, '--projectname', 'ContosoErpProducer'] - ceregistry.cli() + xregistry.cli() # run dotnet build on the csproj here that references the generated files already cmd = 'openapi-generator-cli validate -i ' + os.path.join(output_dir, "ContosoErpProducer.yml") diff --git a/test/openapi/subscriber/test_openapi_subscriber.py b/test/openapi/subscriber/test_openapi_subscriber.py index ecbb719..f014391 100644 --- a/test/openapi/subscriber/test_openapi_subscriber.py +++ b/test/openapi/subscriber/test_openapi_subscriber.py @@ -7,9 +7,9 @@ project_root = os.path.abspath(os.path.join(os.path.dirname(__file__), '../../..')) sys.path.append(os.path.join(project_root)) -import ceregistry +import xregistry -# this test invokes the ceregistry command line tool to generate a C# proxy and a consumer +# this test invokes the xregistry command line tool to generate a C# proxy and a consumer # and then builds the proxy and the consumer and runs a prepared test that integrates both def test_openapi_subscriber(): # clean the output directory @@ -17,13 +17,13 @@ def test_openapi_subscriber(): if os.path.exists(output_dir): shutil.rmtree(output_dir) # generate the subscriber - sys.argv = ['ceregistry', 'generate', + sys.argv = ['xregistry', 'generate', '--style', 'subscriber', '--language', 'openapi', '--definitions', os.path.join(os.path.dirname(__file__), 'openapi_subscriber.cereg'), '--output', output_dir, '--projectname', 'ContosoErpSubscriber'] - ceregistry.cli() + xregistry.cli() # run dotnet build on the csproj here that references the generated files already cmd = 'openapi-generator-cli validate -i ' + os.path.join(output_dir, "ContosoErpSubscriber.yml") subprocess.check_call(cmd.split(" ") if platform.system() == "Windows" else cmd, cwd=os.path.dirname(__file__), stdout=sys.stdout, stderr=sys.stderr, shell=True) diff --git a/test/validate/test_validate.py b/test/validate/test_validate.py index 7935814..ff2ae19 100644 --- a/test/validate/test_validate.py +++ b/test/validate/test_validate.py @@ -5,9 +5,9 @@ project_root = os.path.abspath(os.path.join(os.path.dirname(__file__), '../..')) sys.path.append(os.path.join(project_root)) -import ceregistry +import xregistry -# this test invokes the ceregistry command line tool to generate a C# proxy and a consumer +# this test invokes the xregistry command line tool to generate a C# proxy and a consumer # and then builds the proxy and the consumer and runs a prepared test that integrates both def test_validate(): # clean the output directory @@ -15,14 +15,14 @@ def test_validate(): disco_files = glob.glob("**/*.cereg", root_dir=input_dir, recursive=True) for disco_file in disco_files: # generate the producer - sys.argv = ['ceregistry', 'validate', + sys.argv = ['xregistry', 'validate', '--definitions', os.path.join(input_dir, disco_file)] - if ceregistry.cli() != 0: + if xregistry.cli() != 0: raise Exception("validation failed") disco_files = glob.glob("**/*.cereg.yaml", root_dir=input_dir, recursive=True) for disco_file in disco_files: # generate the producer - sys.argv = ['ceregistry', 'validate', + sys.argv = ['xregistry', 'validate', '--definitions', os.path.join(input_dir, disco_file)] - if ceregistry.cli() != 0: + if xregistry.cli() != 0: raise Exception("validation failed") diff --git a/ceregistry/__init__.py b/xregistry/__init__.py similarity index 100% rename from ceregistry/__init__.py rename to xregistry/__init__.py diff --git a/ceregistry/__main__.py b/xregistry/__main__.py similarity index 100% rename from ceregistry/__main__.py rename to xregistry/__main__.py diff --git a/ceregistry/cli.py b/xregistry/cli.py similarity index 100% rename from ceregistry/cli.py rename to xregistry/cli.py diff --git a/ceregistry/commands/__init__.py b/xregistry/commands/__init__.py similarity index 100% rename from ceregistry/commands/__init__.py rename to xregistry/commands/__init__.py diff --git a/ceregistry/commands/core.py b/xregistry/commands/core.py similarity index 100% rename from ceregistry/commands/core.py rename to xregistry/commands/core.py diff --git a/ceregistry/commands/generate_code.py b/xregistry/commands/generate_code.py similarity index 100% rename from ceregistry/commands/generate_code.py rename to xregistry/commands/generate_code.py diff --git a/ceregistry/commands/list_templates.py b/xregistry/commands/list_templates.py similarity index 100% rename from ceregistry/commands/list_templates.py rename to xregistry/commands/list_templates.py diff --git a/ceregistry/commands/validate_definitions.py b/xregistry/commands/validate_definitions.py similarity index 100% rename from ceregistry/commands/validate_definitions.py rename to xregistry/commands/validate_definitions.py diff --git a/ceregistry/schemas/_xregistry_messaging_catalog_types.json b/xregistry/schemas/_xregistry_messaging_catalog_types.json similarity index 100% rename from ceregistry/schemas/_xregistry_messaging_catalog_types.json rename to xregistry/schemas/_xregistry_messaging_catalog_types.json diff --git a/ceregistry/schemas/generate_openapis.sh b/xregistry/schemas/generate_openapis.sh similarity index 100% rename from ceregistry/schemas/generate_openapis.sh rename to xregistry/schemas/generate_openapis.sh diff --git a/ceregistry/schemas/xregistry_endpoint_protocol_options.json b/xregistry/schemas/xregistry_endpoint_protocol_options.json similarity index 100% rename from ceregistry/schemas/xregistry_endpoint_protocol_options.json rename to xregistry/schemas/xregistry_endpoint_protocol_options.json diff --git a/ceregistry/schemas/xregistry_endpoint_registry.json b/xregistry/schemas/xregistry_endpoint_registry.json similarity index 100% rename from ceregistry/schemas/xregistry_endpoint_registry.json rename to xregistry/schemas/xregistry_endpoint_registry.json diff --git a/ceregistry/schemas/xregistry_endpoint_registry_amqp.json b/xregistry/schemas/xregistry_endpoint_registry_amqp.json similarity index 100% rename from ceregistry/schemas/xregistry_endpoint_registry_amqp.json rename to xregistry/schemas/xregistry_endpoint_registry_amqp.json diff --git a/ceregistry/schemas/xregistry_endpoint_registry_http.json b/xregistry/schemas/xregistry_endpoint_registry_http.json similarity index 100% rename from ceregistry/schemas/xregistry_endpoint_registry_http.json rename to xregistry/schemas/xregistry_endpoint_registry_http.json diff --git a/ceregistry/schemas/xregistry_endpoint_registry_kafka.json b/xregistry/schemas/xregistry_endpoint_registry_kafka.json similarity index 100% rename from ceregistry/schemas/xregistry_endpoint_registry_kafka.json rename to xregistry/schemas/xregistry_endpoint_registry_kafka.json diff --git a/ceregistry/schemas/xregistry_endpoint_registry_mqtt.json b/xregistry/schemas/xregistry_endpoint_registry_mqtt.json similarity index 100% rename from ceregistry/schemas/xregistry_endpoint_registry_mqtt.json rename to xregistry/schemas/xregistry_endpoint_registry_mqtt.json diff --git a/ceregistry/schemas/xregistry_endpoint_registry_nats.json b/xregistry/schemas/xregistry_endpoint_registry_nats.json similarity index 100% rename from ceregistry/schemas/xregistry_endpoint_registry_nats.json rename to xregistry/schemas/xregistry_endpoint_registry_nats.json diff --git a/ceregistry/schemas/xregistry_messagedefinition_definition.json b/xregistry/schemas/xregistry_messagedefinition_definition.json similarity index 100% rename from ceregistry/schemas/xregistry_messagedefinition_definition.json rename to xregistry/schemas/xregistry_messagedefinition_definition.json diff --git a/ceregistry/schemas/xregistry_messagedefinition_registry.json b/xregistry/schemas/xregistry_messagedefinition_registry.json similarity index 100% rename from ceregistry/schemas/xregistry_messagedefinition_registry.json rename to xregistry/schemas/xregistry_messagedefinition_registry.json diff --git a/ceregistry/schemas/xregistry_messagedefinition_registry_amqp.json b/xregistry/schemas/xregistry_messagedefinition_registry_amqp.json similarity index 100% rename from ceregistry/schemas/xregistry_messagedefinition_registry_amqp.json rename to xregistry/schemas/xregistry_messagedefinition_registry_amqp.json diff --git a/ceregistry/schemas/xregistry_messagedefinition_registry_cloudevents.json b/xregistry/schemas/xregistry_messagedefinition_registry_cloudevents.json similarity index 100% rename from ceregistry/schemas/xregistry_messagedefinition_registry_cloudevents.json rename to xregistry/schemas/xregistry_messagedefinition_registry_cloudevents.json diff --git a/ceregistry/schemas/xregistry_messagedefinition_registry_http.json b/xregistry/schemas/xregistry_messagedefinition_registry_http.json similarity index 100% rename from ceregistry/schemas/xregistry_messagedefinition_registry_http.json rename to xregistry/schemas/xregistry_messagedefinition_registry_http.json diff --git a/ceregistry/schemas/xregistry_messagedefinition_registry_kafka.json b/xregistry/schemas/xregistry_messagedefinition_registry_kafka.json similarity index 100% rename from ceregistry/schemas/xregistry_messagedefinition_registry_kafka.json rename to xregistry/schemas/xregistry_messagedefinition_registry_kafka.json diff --git a/ceregistry/schemas/xregistry_messagedefinition_registry_mqtt.json b/xregistry/schemas/xregistry_messagedefinition_registry_mqtt.json similarity index 100% rename from ceregistry/schemas/xregistry_messagedefinition_registry_mqtt.json rename to xregistry/schemas/xregistry_messagedefinition_registry_mqtt.json diff --git a/ceregistry/schemas/xregistry_messaging_catalog.json b/xregistry/schemas/xregistry_messaging_catalog.json similarity index 100% rename from ceregistry/schemas/xregistry_messaging_catalog.json rename to xregistry/schemas/xregistry_messaging_catalog.json diff --git a/ceregistry/schemas/xregistry_openapi.json b/xregistry/schemas/xregistry_openapi.json similarity index 71% rename from ceregistry/schemas/xregistry_openapi.json rename to xregistry/schemas/xregistry_openapi.json index a1c98d8..9a518e1 100644 --- a/ceregistry/schemas/xregistry_openapi.json +++ b/xregistry/schemas/xregistry_openapi.json @@ -14,7 +14,7 @@ "paths": { "/": { "get": { - "operationId": "getAll", + "operationId": "getRootDocument", "description": "Gets the root document", "parameters": [ { @@ -22,9 +22,23 @@ "name": "inline", "description": "Set if references shall be inlined", "required": false, + "allowEmptyValue": true, "schema": { "type": "boolean" } + }, + { + "in": "query", + "name": "filter", + "description": "Filter criterion(s)", + "explode": true, + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } } ], "responses": { @@ -41,7 +55,7 @@ } }, "post": { - "operationId": "uploadDoc", + "operationId": "upsertDocument", "description": "Uploads a registry document and upserts its contents into the registry", "requestBody": { "description": "A request to create or update the discovery endpoint's collection of endpoints with the given endpoints", @@ -67,10 +81,10 @@ } } }, - "/{GROUP}": { + "/{groupType}": { "parameters": [ { - "$ref": "#/components/parameters/GROUP" + "$ref": "#/components/parameters/groupType" } ], "get": { @@ -79,18 +93,31 @@ "parameters": [ { "in": "query", - "name": "name", - "description": "The name of the schema group to be returned", + "name": "inline", + "description": "Set if references shall be inlined", "required": false, + "allowEmptyValue": true, "schema": { - "type": "string", - "description": "Filter expression" + "type": "boolean" + } + }, + { + "in": "query", + "name": "filter", + "description": "Filter criterion(s)", + "explode": true, + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } } } ], "responses": { "200": { - "description": "", + "description": "Resource groups that match the query or all available resource groups if no query was specified", "content": { "application/json": { "schema": { @@ -106,54 +133,15 @@ "description": "No groups found" } } - }, - "post": { - "operationId": "postGroup", - "requestBody": { - "description": "Create a new group", - "content": { - "application/json": { - "schema": { - "$ref": "xregistry_resources.json#/definitions/resource" - } - } - } - }, - "responses": { - "201": { - "description": "The resulting resource", - "content": { - "application/json": { - "schema": { - "$ref": "xregistry_resources.json#/definitions/resource" - } - } - }, - "headers": { - "Location": { - "description": "The location of the created resource", - "schema": { - "type": "string" - } - } - } - }, - "400": { - "description": "Bad Request - constraint failure" - }, - "409": { - "description": "Conflict - epoch not greater" - } - } } }, - "/{GROUP}/{groupid}": { + "/{groupType}/{groupId}": { "parameters": [ { - "$ref": "#/components/parameters/GROUP" + "$ref": "#/components/parameters/groupType" }, { - "$ref": "#/components/parameters/groupid" + "$ref": "#/components/parameters/groupId" } ], "get": { @@ -178,6 +166,19 @@ } }, "put": { + "parameters": [ + { + "in": "query", + "name": "epoch", + "description": "The epoch of the resource group to be updated", + "required": false, + "schema": { + "type": "integer", + "description": "A number representing the version number of the resource.", + "format": "int64" + } + } + ], "operationId": "putResourceGroup", "description": "creates or updates the resource group", "requestBody": { @@ -218,8 +219,8 @@ { "in": "query", "name": "epoch", - "description": "The epoch of the schema group to be deleted", - "required": false, + "description": "The epoch of the resource group to be deleted", + "required": true, "schema": { "type": "integer", "description": "A number representing the version number of the resource.", @@ -228,15 +229,8 @@ } ], "responses": { - "200": { - "description": "A list of the Endpoints that were deleted", - "content": { - "application/json": { - "schema": { - "$ref": "xregistry_resources.json#/definitions/resource" - } - } - } + "204": { + "description": "Ok" }, "400": { "description": "Bad Request - constraint failure" @@ -247,16 +241,16 @@ } } }, - "/{GROUP}/{groupid}/{RESOURCE}": { + "/{groupType}/{groupId}/{resourceType}": { "parameters": [ { - "$ref": "#/components/parameters/GROUP" + "$ref": "#/components/parameters/groupType" }, { - "$ref": "#/components/parameters/groupid" + "$ref": "#/components/parameters/groupId" }, { - "$ref": "#/components/parameters/RESOURCE" + "$ref": "#/components/parameters/resourceType" } ], "get": { @@ -265,12 +259,43 @@ "parameters": [ { "in": "query", - "name": "name", - "description": "The name of the schema to be returned", + "name": "inline", + "description": "Set if references shall be inlined", "required": false, + "allowEmptyValue": true, "schema": { - "type": "string", - "description": "Filter expression" + "type": "boolean" + } + }, + { + "in": "query", + "name": "skip", + "description": "The number of resources to skip", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "in": "query", + "name": "top", + "description": "The number of resources to show", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "in": "query", + "name": "filter", + "description": "Filter criterion(s)", + "explode": true, + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } } } ], @@ -289,73 +314,34 @@ } } } - }, - "put": { - "operationId": "putResources", - "requestBody": { - "description": "A request to create or update the discovery group's collection of groups with the given group", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "xregistry_resources.json#/definitions/resource" - } - } - } - } - }, - "responses": { - "200": { - "description": "A Endpoint Reference referencing the updated Endpoint", - "content": { - "application/json": { - "schema": { - "$ref": "xregistry_resources.json#/definitions/resource" - } - } - } - }, - "400": { - "description": "Bad Request - constraint failure" - }, - "409": { - "description": "Conflict - epoch not greater" - } - } - }, - "delete": { - "operationId": "deleteResources", - "responses": { - "200": { - "description": "Delete succeeded" - }, - "400": { - "description": "Bad Request - constraint failure" - }, - "409": { - "description": "Conflict - epoch not greater" - } - } } }, - "/{GROUP}/{groupid}/{RESOURCE}/{resourceid}": { + "/{groupType}/{groupId}/{resourceType}/{resourceId}": { "parameters": [ { - "$ref": "#/components/parameters/GROUP" + "$ref": "#/components/parameters/groupType" + }, + { + "$ref": "#/components/parameters/groupId" }, { - "$ref": "#/components/parameters/groupid" + "$ref": "#/components/parameters/resourceType" }, { - "$ref": "#/components/parameters/RESOURCE" + "$ref": "#/components/parameters/resourceId" }, { - "$ref": "#/components/parameters/resourceid" + "in": "query", + "name": "meta", + "description": "Interact with the metadata", + "required": false, + "schema": { + "type": "boolean" + } } ], "get": { - "operationId": "getLatestResource", + "operationId": "getResource", "responses": { "200": { "description": "The corresponding resource", @@ -410,6 +396,11 @@ "type": "string", "format": "binary" } + }, + "application/json": { + "schema": { + "$ref": "xregistry_resources.json#/definitions/resource" + } } } }, @@ -421,10 +412,75 @@ } } }, + "put": { + "parameters": [ + { + "in": "query", + "name": "epoch", + "description": "The epoch of the resource group to be upserted", + "required": false, + "schema": { + "type": "integer", + "description": "A number representing the version number of the resource.", + "format": "int64" + } + }, + { + "$ref": "#/components/parameters/resource-description" + }, + { + "$ref": "#/components/parameters/resource-docs" + }, + { + "$ref": "#/components/parameters/resource-origin" + }, + { + "$ref": "#/components/parameters/resource-tags" + } + ], + "summary": "Create or update a resource", + "description": "Create a resource. ", + "operationId": "putResource", + "requestBody": { + "description": "The resource to be created/updated", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + }, + "application/json": { + "schema": { + "$ref": "xregistry_resources.json#/definitions/resource" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "xregistry_resources.json#/definitions/resource" + } + } + } + }, + "400": { + "description": "Bad Request - constraint failure" + }, + "409": { + "description": "Conflict - epoch not greater" + } + } + }, "post": { "summary": "Post new resource version", - "description": "Register schema version If schema of specified name does not exist in specified group, schema and schema version is created at version 1. If schema of specified name exists already in specified group, schema is created at latest version + 1. If schema with identical content already exists, existing schema's ID is returned. \n", - "operationId": "postResourceDocument", + "description": "Register resource version If resource of specified name does not exist in specified group, resource and resource version is created at version 1. If resource of specified name exists already in specified group, resource is created at latest version + 1. If resource with identical content already exists, existing resource's ID is returned. \n", + "operationId": "postResource", "parameters": [ { "$ref": "#/components/parameters/resource-description" @@ -448,19 +504,24 @@ } ], "requestBody": { - "description": "A request to add a new schema document to the schema's document collection", + "description": "A request to add a new resource to the version collection", "content": { "application/octet-stream": { "schema": { "type": "string", "format": "binary" } + }, + "application/json": { + "schema": { + "$ref": "xregistry_resources.json#/definitions/resource" + } } } }, "responses": { "201": { - "description": "A request to add a new schema document to the schema's document collection", + "description": "The created resource", "headers": { "resource-id": { "$ref": "#/components/headers/resource-id" @@ -505,6 +566,11 @@ "type": "string", "format": "binary" } + }, + "application/json": { + "schema": { + "$ref": "xregistry_resources.json#/definitions/resource" + } } } }, @@ -518,92 +584,151 @@ "description": "Conflict - epoch not greater" } } + }, + "delete": { + "summary": "Delete resource", + "description": "Delete resource", + "operationId": "deleteResource", + "parameters": [ + { + "in": "query", + "name": "epoch", + "description": "The epoch of the resource to be deleted", + "required": true, + "schema": { + "type": "integer", + "description": "A number representing the version number of the resource.", + "format": "int64" + } + } + ], + "responses": { + "204": { + "description": "No Content" + }, + "400": { + "description": "Bad Request - constraint failure" + }, + "404": { + "description": "Not Found" + } + } } }, - "/{GROUP}/{groupid}/{RESOURCE}/{resourceid}/meta": { + "/{groupType}/{groupId}/{resourceType}/{resourceId}/versions": { "parameters": [ { - "$ref": "#/components/parameters/GROUP" + "$ref": "#/components/parameters/groupType" + }, + { + "$ref": "#/components/parameters/groupId" }, { - "$ref": "#/components/parameters/groupid" + "$ref": "#/components/parameters/resourceType" }, { - "$ref": "#/components/parameters/RESOURCE" + "$ref": "#/components/parameters/resourceId" }, { - "$ref": "#/components/parameters/resourceid" + "in": "query", + "name": "meta", + "description": "Interact with the metadata", + "required": false, + "allowEmptyValue": true, + "schema": { + "type": "boolean" + } } ], "get": { - "operationId": "getLatestResourceMetadata", - "responses": { - "200": { - "description": "The corresponding schema", - "content": { - "application/json": { - "schema": { - "$ref": "xregistry_resources.json#/definitions/resource" - } - } + "operationId": "getResourceVersionsAll", + "description": "Get an optionally filtered collection of resources", + "parameters": [ + { + "in": "query", + "name": "inline", + "description": "Set if references shall be inlined", + "required": false, + "allowEmptyValue": true, + "schema": { + "type": "boolean" } }, - "400": { - "description": "Bad Request - constraint failure" + { + "in": "query", + "name": "skip", + "description": "The number of resources to skip", + "required": false, + "schema": { + "type": "integer" + } }, - "404": { - "description": "Not Found" - } - } - }, - "put": { - "operationId": "updateLatestResourceVersionMetadata", - "description": "Updates metadata of the document stored for the schema version", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "xregistry_resources.json#/definitions/resource" + { + "in": "query", + "name": "top", + "description": "The number of resources to show", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "in": "query", + "name": "filter", + "description": "Filter criterion(s)", + "explode": true, + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" } } } - }, + ], "responses": { "200": { - "description": "The metadata of the schema version document", + "description": "A list of resource versions", "content": { "application/json": { "schema": { - "$ref": "xregistry_resources.json#/definitions/resource" + "type": "object", + "additionalProperties": { + "$ref": "xregistry_resources.json#/definitions/resource" + } } } } - }, - "400": { - "description": "Bad Request - constraint failure" - }, - "404": { - "description": "Not Found" } } } }, - "/{GROUP}/{groupid}/{RESOURCE}/{resourceid}/versions/{versionid}": { + "/{groupType}/{groupId}/{resourceType}/{resourceId}/versions/{versionId}": { "parameters": [ { - "$ref": "#/components/parameters/GROUP" + "$ref": "#/components/parameters/groupType" }, { - "$ref": "#/components/parameters/groupid" + "$ref": "#/components/parameters/groupId" }, { - "$ref": "#/components/parameters/RESOURCE" + "$ref": "#/components/parameters/resourceType" }, { - "$ref": "#/components/parameters/resourceid" + "$ref": "#/components/parameters/resourceId" }, { - "$ref": "#/components/parameters/versionid" + "$ref": "#/components/parameters/versionId" + }, + { + "in": "query", + "name": "meta", + "description": "Interact with the metadata", + "required": false, + "allowEmptyValue": true, + "schema": { + "type": "boolean" + } } ], "get": { @@ -667,52 +792,35 @@ } } }, - "delete": { - "operationId": "deleteResourceVersion", - "responses": { - "200": { - "description": "A list of the Endpoints that were deleted", - "content": { - "application/json": { - "schema": { - "$ref": "xregistry_resources.json#/definitions/resource" - } + "put": { + "parameters": [ + { + "in": "query", + "name": "epoch", + "description": "The epoch of the resource group to be updated", + "required": true, + "schema": { + "type": "integer", + "description": "A number representing the version number of the resource.", + "format": "int64" + } + } + ], + "operationId": "updateResourceVersion", + "description": "Updates the metadata for the schema version", + "requestBody": { + "description": "The schema version document", + "content": { + "application/json": { + "schema": { + "$ref": "xregistry_resources.json#/definitions/resource" } } - }, - "400": { - "description": "Bad Request - constraint failure" - }, - "409": { - "description": "Conflict - epoch not greater" } - } - } - }, - "/{GROUP}/{groupid}/{RESOURCE}/{resourceid}/versions/{versionid}/meta": { - "parameters": [ - { - "$ref": "#/components/parameters/GROUP" - }, - { - "$ref": "#/components/parameters/groupid" - }, - { - "$ref": "#/components/parameters/RESOURCE" - }, - { - "$ref": "#/components/parameters/resourceid" }, - { - "$ref": "#/components/parameters/versionid" - } - ], - "get": { - "operationId": "getResourceVersionMetadata", - "description": "Gets metadata of the document stored for the schema version", "responses": { "200": { - "description": "The metadata of the schema version document", + "description": "The schema version metadata", "content": { "application/json": { "schema": { @@ -726,37 +834,36 @@ }, "404": { "description": "Not Found" + }, + "409": { + "description": "Conflict" } } }, - "put": { - "operationId": "updateResourceVersionMetadata", - "description": "Updates metadata of the document stored for the schema version", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "xregistry_resources.json#/definitions/resource" - } + "delete": { + "parameters": [ + { + "in": "query", + "name": "epoch", + "description": "The epoch of the resource group to be deleted", + "required": false, + "schema": { + "type": "integer", + "description": "A number representing the version number of the resource.", + "format": "int64" } } - }, + ], + "operationId": "deleteResourceVersion", "responses": { - "200": { - "description": "The metadata of the schema version document", - "content": { - "application/json": { - "schema": { - "$ref": "xregistry_resources.json#/definitions/resource" - } - } - } + "204": { + "description": "Ok" }, "400": { "description": "Bad Request - constraint failure" }, - "404": { - "description": "Not Found" + "409": { + "description": "Conflict - epoch not greater" } } } @@ -771,19 +878,19 @@ } }, "parameters": { - "GROUP": { + "groupType": { "in": "path", - "name": "GROUP", - "description": "The GROUP (plural)", + "name": "groupType", + "description": "The groupType (plural)", "required": true, "schema": { "type": "string" } }, - "RESOURCE": { + "resourceType": { "in": "path", "name": "id", - "description": "The RESOURCE (plural)", + "description": "The resourceType (plural)", "required": true, "schema": { "type": "string" @@ -800,9 +907,9 @@ "format": "uri-reference" } }, - "groupid": { + "groupId": { "in": "path", - "name": "groupid", + "name": "groupId", "description": "The id of the group", "required": true, "schema": { @@ -811,20 +918,9 @@ "format": "uri-reference" } }, - "defid": { - "in": "path", - "name": "defid", - "description": "The id of the definition", - "required": true, - "schema": { - "type": "string", - "description": "A unique identifier", - "format": "uri-reference" - } - }, - "resourceid": { + "resourceId": { "in": "path", - "name": "resourceid", + "name": "resourceId", "description": "The id of the schema", "required": true, "schema": { @@ -833,9 +929,9 @@ "format": "uri-reference" } }, - "versionid": { + "versionId": { "in": "path", - "name": "versionid", + "name": "versionId", "description": "The id of the schema", "required": true, "schema": { @@ -856,7 +952,7 @@ "in": "header", "name": "resource-id", "required": false, - "description": "A unique identifier for this Endpoint. This value MUST be globally unique", + "description": "A unique identifier for this resource. This value MUST be globally unique", "schema": { "type": "string", "format": "uri-reference" @@ -876,7 +972,7 @@ "in": "header", "name": "resource-self", "required": false, - "description": "A unique URI for the resource. The URI MUST be a combination of the base URI of the list of this resource type for the current Discovery Service appended with the `id` of this resource.\n", + "description": "A unique URI for the resource.", "schema": { "type": "string", "format": "uri" diff --git a/ceregistry/schemas/xregistry_openapi_endpoint.json b/xregistry/schemas/xregistry_openapi_endpoint.json similarity index 69% rename from ceregistry/schemas/xregistry_openapi_endpoint.json rename to xregistry/schemas/xregistry_openapi_endpoint.json index c463301..73e9985 100644 --- a/ceregistry/schemas/xregistry_openapi_endpoint.json +++ b/xregistry/schemas/xregistry_openapi_endpoint.json @@ -14,7 +14,7 @@ "paths": { "/": { "get": { - "operationId": "getAll", + "operationId": "getRootDocument", "description": "Gets the root document", "parameters": [ { @@ -22,9 +22,23 @@ "name": "inline", "description": "Set if references shall be inlined", "required": false, + "allowEmptyValue": true, "schema": { "type": "boolean" } + }, + { + "in": "query", + "name": "filter", + "description": "Filter criterion(s)", + "explode": true, + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } } ], "responses": { @@ -41,7 +55,7 @@ } }, "post": { - "operationId": "uploadDoc", + "operationId": "upsertDocument", "description": "Uploads a registry document and upserts its contents into the registry", "requestBody": { "description": "A request to create or update the discovery endpoint's collection of endpoints with the given endpoints", @@ -68,24 +82,42 @@ } }, "/endpoints": { + "parameters": [ + { + "$ref": "#/components/parameters/groupType" + } + ], "get": { "operationId": "getResourceGroupAll", "description": "Gets all entries of the resource group", "parameters": [ { "in": "query", - "name": "name", - "description": "The name of the schema group to be returned", + "name": "inline", + "description": "Set if references shall be inlined", + "required": false, + "allowEmptyValue": true, + "schema": { + "type": "boolean" + } + }, + { + "in": "query", + "name": "filter", + "description": "Filter criterion(s)", + "explode": true, "required": false, "schema": { - "type": "string", - "description": "Filter expression" + "type": "array", + "items": { + "type": "string" + } } } ], "responses": { "200": { - "description": "", + "description": "Resource groups that match the query or all available resource groups if no query was specified", "content": { "application/json": { "schema": { @@ -101,58 +133,22 @@ "description": "No groups found" } } - }, - "post": { - "operationId": "postGroup", - "requestBody": { - "description": "Create a new group", - "content": { - "application/json": { - "schema": { - "$ref": "xregistry_endpoint_registry.json#/definitions/endpoint" - } - } - } - }, - "responses": { - "201": { - "description": "The resulting resource", - "content": { - "application/json": { - "schema": { - "$ref": "xregistry_endpoint_registry.json#/definitions/endpoint" - } - } - }, - "headers": { - "Location": { - "description": "The location of the created resource", - "schema": { - "type": "string" - } - } - } - }, - "400": { - "description": "Bad Request - constraint failure" - }, - "409": { - "description": "Conflict - epoch not greater" - } - } } }, - "/endpoints/{groupid}": { + "/{groupType}/{groupId}": { "parameters": [ { - "$ref": "#/components/parameters/groupid" + "$ref": "#/components/parameters/groupType" + }, + { + "$ref": "#/components/parameters/groupId" } ], "get": { "operationId": "getResourceGroup", "responses": { "200": { - "description": "The schema group", + "description": "The resource group", "content": { "application/json": { "schema": { @@ -170,6 +166,19 @@ } }, "put": { + "parameters": [ + { + "in": "query", + "name": "epoch", + "description": "The epoch of the resource group to be updated", + "required": false, + "schema": { + "type": "integer", + "description": "A number representing the version number of the resource.", + "format": "int64" + } + } + ], "operationId": "putResourceGroup", "description": "creates or updates the resource group", "requestBody": { @@ -210,8 +219,8 @@ { "in": "query", "name": "epoch", - "description": "The epoch of the schema group to be deleted", - "required": false, + "description": "The epoch of the resource group to be deleted", + "required": true, "schema": { "type": "integer", "description": "A number representing the version number of the resource.", @@ -220,15 +229,8 @@ } ], "responses": { - "200": { - "description": "A list of the Endpoints that were deleted", - "content": { - "application/json": { - "schema": { - "$ref": "xregistry_endpoint_registry.json#/definitions/endpoint" - } - } - } + "204": { + "description": "Ok" }, "400": { "description": "Bad Request - constraint failure" @@ -239,10 +241,16 @@ } } }, - "/endpoints/{groupid}/definitions": { + "/endpoints/{groupId}/definitions": { "parameters": [ { - "$ref": "#/components/parameters/groupid" + "$ref": "#/components/parameters/groupType" + }, + { + "$ref": "#/components/parameters/groupId" + }, + { + "$ref": "#/components/parameters/resourceType" } ], "get": { @@ -251,53 +259,56 @@ "parameters": [ { "in": "query", - "name": "name", - "description": "The name of the schema to be returned", + "name": "inline", + "description": "Set if references shall be inlined", "required": false, + "allowEmptyValue": true, "schema": { - "type": "string", - "description": "Filter expression" + "type": "boolean" } - } - ], - "responses": { - "200": { - "description": "A list of resources (optionally matching the query parameter)", - "content": { - "application/json": { - "schema": { - "type": "object", - "additionalProperties": { - "$ref": "xregistry_messagedefinition_definition.json#/definitions/definition" - } - } - } + }, + { + "in": "query", + "name": "skip", + "description": "The number of resources to skip", + "required": false, + "schema": { + "type": "integer" } - } + }, + { + "in": "query", + "name": "top", + "description": "The number of resources to show", + "required": false, + "schema": { + "type": "integer" } }, - "put": { - "operationId": "putResources", - "requestBody": { - "description": "A request to create or update the discovery group's collection of groups with the given group", - "content": { - "application/json": { + { + "in": "query", + "name": "filter", + "description": "Filter criterion(s)", + "explode": true, + "required": false, "schema": { - "type": "array", - "items": { - "$ref": "xregistry_messagedefinition_definition.json#/definitions/definition" + "type": "array", + "items": { + "type": "string" } } } - } - }, + ], "responses": { "200": { - "description": "A Endpoint Reference referencing the updated Endpoint", + "description": "Updated list of resources", "content": { "application/json": { "schema": { - "$ref": "xregistry_messagedefinition_definition.json#/definitions/definition" + "type": "object", + "additionalProperties": { + "$ref": "xregistry_messagedefinition_definition.json#/definitions/definition" + } } } } @@ -309,33 +320,34 @@ "description": "Conflict - epoch not greater" } } - }, - "delete": { - "operationId": "deleteResources", - "responses": { - "200": { - "description": "Delete succeeded" - }, - "400": { - "description": "Bad Request - constraint failure" - }, - "409": { - "description": "Conflict - epoch not greater" - } - } - } + } }, - "/endpoints/{groupid}/definitions/{resourceid}": { + "/endpoints/{groupId}/definitions/{resourceId}": { "parameters": [ { - "$ref": "#/components/parameters/groupid" + "$ref": "#/components/parameters/groupType" + }, + { + "$ref": "#/components/parameters/groupId" + }, + { + "$ref": "#/components/parameters/resourceType" }, { - "$ref": "#/components/parameters/resourceid" + "$ref": "#/components/parameters/resourceId" + }, + { + "in": "query", + "name": "meta", + "description": "Interact with the metadata", + "required": false, + "schema": { + "type": "boolean" + } } ], "get": { - "operationId": "getLatestResource", + "operationId": "getResource", "responses": { "200": { "description": "The corresponding resource", @@ -390,6 +402,11 @@ "type": "string", "format": "binary" } + }, + "application/json": { + "schema": { + "$ref": "xregistry_resources.json#/definitions/resource" + } } } }, @@ -401,10 +418,75 @@ } } }, + "put": { + "parameters": [ + { + "in": "query", + "name": "epoch", + "description": "The epoch of the resource group to be upserted", + "required": false, + "schema": { + "type": "integer", + "description": "A number representing the version number of the resource.", + "format": "int64" + } + }, + { + "$ref": "#/components/parameters/resource-description" + }, + { + "$ref": "#/components/parameters/resource-docs" + }, + { + "$ref": "#/components/parameters/resource-origin" + }, + { + "$ref": "#/components/parameters/resource-tags" + } + ], + "summary": "Create or update a resource", + "description": "Create a resource. ", + "operationId": "putResource", + "requestBody": { + "description": "The resource to be created/updated", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + }, + "application/json": { + "schema": { + "$ref": "xregistry_resources.json#/definitions/resource" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "xregistry_resources.json#/definitions/resource" + } + } + } + }, + "400": { + "description": "Bad Request - constraint failure" + }, + "409": { + "description": "Conflict - epoch not greater" + } + } + }, "post": { "summary": "Post new resource version", - "description": "Register schema version If schema of specified name does not exist in specified group, schema and schema version is created at version 1. If schema of specified name exists already in specified group, schema is created at latest version + 1. If schema with identical content already exists, existing schema's ID is returned. \n", - "operationId": "postResourceDocument", + "description": "Register resource version If resource of specified name does not exist in specified group, resource and resource version is created at version 1. If resource of specified name exists already in specified group, resource is created at latest version + 1. If resource with identical content already exists, existing resource's ID is returned. \n", + "operationId": "postResource", "parameters": [ { "$ref": "#/components/parameters/resource-description" @@ -428,19 +510,24 @@ } ], "requestBody": { - "description": "A request to add a new schema document to the schema's document collection", + "description": "A request to add a new resource to the version collection", "content": { "application/octet-stream": { "schema": { "type": "string", "format": "binary" } + }, + "application/json": { + "schema": { + "$ref": "xregistry_resources.json#/definitions/resource" + } } } }, "responses": { "201": { - "description": "A request to add a new schema document to the schema's document collection", + "description": "The created resource", "headers": { "resource-id": { "$ref": "#/components/headers/resource-id" @@ -485,6 +572,11 @@ "type": "string", "format": "binary" } + }, + "application/json": { + "schema": { + "$ref": "xregistry_resources.json#/definitions/resource" + } } } }, @@ -498,80 +590,151 @@ "description": "Conflict - epoch not greater" } } + }, + "delete": { + "summary": "Delete resource", + "description": "Delete resource", + "operationId": "deleteResource", + "parameters": [ + { + "in": "query", + "name": "epoch", + "description": "The epoch of the resource to be deleted", + "required": true, + "schema": { + "type": "integer", + "description": "A number representing the version number of the resource.", + "format": "int64" + } + } + ], + "responses": { + "204": { + "description": "No Content" + }, + "400": { + "description": "Bad Request - constraint failure" + }, + "404": { + "description": "Not Found" + } + } } }, - "/endpoints/{groupid}/definitions/{resourceid}/meta": { + "/endpoints/{groupId}/definitions/{resourceId}/versions/{versionId}": { "parameters": [ { - "$ref": "#/components/parameters/groupid" + "$ref": "#/components/parameters/groupType" + }, + { + "$ref": "#/components/parameters/groupId" }, { - "$ref": "#/components/parameters/resourceid" + "$ref": "#/components/parameters/resourceType" + }, + { + "$ref": "#/components/parameters/resourceId" + }, + { + "in": "query", + "name": "meta", + "description": "Interact with the metadata", + "required": false, + "allowEmptyValue": true, + "schema": { + "type": "boolean" + } } ], "get": { - "operationId": "getLatestResourceMetadata", - "responses": { - "200": { - "description": "The corresponding schema", - "content": { - "application/json": { - "schema": { - "$ref": "xregistry_messagedefinition_definition.json#/definitions/definition" - } - } + "operationId": "getResourceVersionsAll", + "description": "Get an optionally filtered collection of resources", + "parameters": [ + { + "in": "query", + "name": "inline", + "description": "Set if references shall be inlined", + "required": false, + "allowEmptyValue": true, + "schema": { + "type": "boolean" } }, - "400": { - "description": "Bad Request - constraint failure" + { + "in": "query", + "name": "skip", + "description": "The number of resources to skip", + "required": false, + "schema": { + "type": "integer" + } }, - "404": { - "description": "Not Found" - } - } - }, - "put": { - "operationId": "updateLatestResourceVersionMetadata", - "description": "Updates metadata of the document stored for the schema version", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "xregistry_messagedefinition_definition.json#/definitions/definition" + { + "in": "query", + "name": "top", + "description": "The number of resources to show", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "in": "query", + "name": "filter", + "description": "Filter criterion(s)", + "explode": true, + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" } } } - }, + ], "responses": { "200": { - "description": "The metadata of the schema version document", + "description": "A list of resource versions", "content": { "application/json": { "schema": { - "$ref": "xregistry_messagedefinition_definition.json#/definitions/definition" + "type": "object", + "additionalProperties": { + "$ref": "xregistry_resources.json#/definitions/resource" + } } } } - }, - "400": { - "description": "Bad Request - constraint failure" - }, - "404": { - "description": "Not Found" } } } }, - "/endpoints/{groupid}/definitions/{resourceid}/versions/{versionid}": { + "/{groupType}/{groupId}/{resourceType}/{resourceId}/versions/{versionId}": { "parameters": [ { - "$ref": "#/components/parameters/groupid" + "$ref": "#/components/parameters/groupType" + }, + { + "$ref": "#/components/parameters/groupId" + }, + { + "$ref": "#/components/parameters/resourceType" + }, + { + "$ref": "#/components/parameters/resourceId" }, { - "$ref": "#/components/parameters/resourceid" + "$ref": "#/components/parameters/versionId" }, { - "$ref": "#/components/parameters/versionid" + "in": "query", + "name": "meta", + "description": "Interact with the metadata", + "required": false, + "allowEmptyValue": true, + "schema": { + "type": "boolean" + } } ], "get": { @@ -635,46 +798,35 @@ } } }, - "delete": { - "operationId": "deleteResourceVersion", - "responses": { - "200": { - "description": "A list of the Endpoints that were deleted", - "content": { - "application/json": { - "schema": { - "$ref": "xregistry_resources.json#/definitions/resource" - } + "put": { + "parameters": [ + { + "in": "query", + "name": "epoch", + "description": "The epoch of the resource group to be updated", + "required": true, + "schema": { + "type": "integer", + "description": "A number representing the version number of the resource.", + "format": "int64" + } + } + ], + "operationId": "updateResourceVersion", + "description": "Updates the metadata for the schema version", + "requestBody": { + "description": "The schema version document", + "content": { + "application/json": { + "schema": { + "$ref": "xregistry_resources.json#/definitions/resource" } } - }, - "400": { - "description": "Bad Request - constraint failure" - }, - "409": { - "description": "Conflict - epoch not greater" } - } - } - }, - "/endpoints/{groupid}/definitions/{resourceid}/versions/{versionid}/meta": { - "parameters": [ - { - "$ref": "#/components/parameters/groupid" }, - { - "$ref": "#/components/parameters/resourceid" - }, - { - "$ref": "#/components/parameters/versionid" - } - ], - "get": { - "operationId": "getResourceVersionMetadata", - "description": "Gets metadata of the document stored for the schema version", "responses": { "200": { - "description": "The metadata of the schema version document", + "description": "The schema version metadata", "content": { "application/json": { "schema": { @@ -688,37 +840,36 @@ }, "404": { "description": "Not Found" + }, + "409": { + "description": "Conflict" } } }, - "put": { - "operationId": "updateResourceVersionMetadata", - "description": "Updates metadata of the document stored for the schema version", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "xregistry_resources.json#/definitions/resource" - } + "delete": { + "parameters": [ + { + "in": "query", + "name": "epoch", + "description": "The epoch of the resource group to be deleted", + "required": false, + "schema": { + "type": "integer", + "description": "A number representing the version number of the resource.", + "format": "int64" } } - }, + ], + "operationId": "deleteResourceVersion", "responses": { - "200": { - "description": "The metadata of the schema version document", - "content": { - "application/json": { - "schema": { - "$ref": "xregistry_resources.json#/definitions/resource" - } - } - } + "204": { + "description": "Ok" }, "400": { "description": "Bad Request - constraint failure" }, - "404": { - "description": "Not Found" + "409": { + "description": "Conflict - epoch not greater" } } } @@ -733,21 +884,28 @@ } }, "parameters": { - "id": { + "groupType": { + "in": "path", + "name": "groupType", + "description": "The groupType (plural)", + "required": true, + "schema": { + "type": "string" + } + }, + "resourceType": { "in": "path", "name": "id", - "description": "The id of the endpoint", + "description": "The resourceType (plural)", "required": true, "schema": { - "type": "string", - "description": "A unique identifier", - "format": "uri-reference" + "type": "string" } }, - "groupid": { + "id": { "in": "path", - "name": "groupid", - "description": "The id of the group", + "name": "id", + "description": "The id of the endpoint", "required": true, "schema": { "type": "string", @@ -755,10 +913,10 @@ "format": "uri-reference" } }, - "defid": { + "groupId": { "in": "path", - "name": "defid", - "description": "The id of the definition", + "name": "groupId", + "description": "The id of the group", "required": true, "schema": { "type": "string", @@ -766,9 +924,9 @@ "format": "uri-reference" } }, - "resourceid": { + "resourceId": { "in": "path", - "name": "resourceid", + "name": "resourceId", "description": "The id of the schema", "required": true, "schema": { @@ -777,9 +935,9 @@ "format": "uri-reference" } }, - "versionid": { + "versionId": { "in": "path", - "name": "versionid", + "name": "versionId", "description": "The id of the schema", "required": true, "schema": { @@ -800,7 +958,7 @@ "in": "header", "name": "resource-id", "required": false, - "description": "A unique identifier for this Endpoint. This value MUST be globally unique", + "description": "A unique identifier for this resource. This value MUST be globally unique", "schema": { "type": "string", "format": "uri-reference" @@ -820,7 +978,7 @@ "in": "header", "name": "resource-self", "required": false, - "description": "A unique URI for the resource. The URI MUST be a combination of the base URI of the list of this resource type for the current Discovery Service appended with the `id` of this resource.\n", + "description": "A unique URI for the resource.", "schema": { "type": "string", "format": "uri" diff --git a/ceregistry/schemas/xregistry_openapi_messagedefinition.json b/xregistry/schemas/xregistry_openapi_messagedefinition.json similarity index 69% rename from ceregistry/schemas/xregistry_openapi_messagedefinition.json rename to xregistry/schemas/xregistry_openapi_messagedefinition.json index 3b98a76..cbea274 100644 --- a/ceregistry/schemas/xregistry_openapi_messagedefinition.json +++ b/xregistry/schemas/xregistry_openapi_messagedefinition.json @@ -14,7 +14,7 @@ "paths": { "/": { "get": { - "operationId": "getAll", + "operationId": "getRootDocument", "description": "Gets the root document", "parameters": [ { @@ -22,9 +22,23 @@ "name": "inline", "description": "Set if references shall be inlined", "required": false, + "allowEmptyValue": true, "schema": { "type": "boolean" } + }, + { + "in": "query", + "name": "filter", + "description": "Filter criterion(s)", + "explode": true, + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } } ], "responses": { @@ -41,7 +55,7 @@ } }, "post": { - "operationId": "uploadDoc", + "operationId": "upsertDocument", "description": "Uploads a registry document and upserts its contents into the registry", "requestBody": { "description": "A request to create or update the discovery endpoint's collection of endpoints with the given endpoints", @@ -68,24 +82,42 @@ } }, "/definitiongroups": { + "parameters": [ + { + "$ref": "#/components/parameters/groupType" + } + ], "get": { "operationId": "getResourceGroupAll", "description": "Gets all entries of the resource group", "parameters": [ { "in": "query", - "name": "name", - "description": "The name of the schema group to be returned", + "name": "inline", + "description": "Set if references shall be inlined", + "required": false, + "allowEmptyValue": true, + "schema": { + "type": "boolean" + } + }, + { + "in": "query", + "name": "filter", + "description": "Filter criterion(s)", + "explode": true, "required": false, "schema": { - "type": "string", - "description": "Filter expression" + "type": "array", + "items": { + "type": "string" + } } } ], "responses": { "200": { - "description": "", + "description": "Resource groups that match the query or all available resource groups if no query was specified", "content": { "application/json": { "schema": { @@ -101,58 +133,22 @@ "description": "No groups found" } } - }, - "post": { - "operationId": "postGroup", - "requestBody": { - "description": "Create a new group", - "content": { - "application/json": { - "schema": { - "$ref": "xregistry_messagedefinition_registry.json#/definitions/definitionGroup" - } - } - } - }, - "responses": { - "201": { - "description": "The resulting resource", - "content": { - "application/json": { - "schema": { - "$ref": "xregistry_messagedefinition_registry.json#/definitions/definitionGroup" - } - } - }, - "headers": { - "Location": { - "description": "The location of the created resource", - "schema": { - "type": "string" - } - } - } - }, - "400": { - "description": "Bad Request - constraint failure" - }, - "409": { - "description": "Conflict - epoch not greater" - } - } } }, - "/definitiongroups/{groupid}": { + "/{groupType}/{groupId}": { "parameters": [ { - "$ref": "#/components/parameters/groupid" + "$ref": "#/components/parameters/groupType" + }, + { + "$ref": "#/components/parameters/groupId" } ], "get": { "operationId": "getResourceGroup", "responses": { "200": { - "description": "The schema group", + "description": "The resource group", "content": { "application/json": { "schema": { @@ -170,6 +166,19 @@ } }, "put": { + "parameters": [ + { + "in": "query", + "name": "epoch", + "description": "The epoch of the resource group to be updated", + "required": false, + "schema": { + "type": "integer", + "description": "A number representing the version number of the resource.", + "format": "int64" + } + } + ], "operationId": "putResourceGroup", "description": "creates or updates the resource group", "requestBody": { @@ -210,8 +219,8 @@ { "in": "query", "name": "epoch", - "description": "The epoch of the schema group to be deleted", - "required": false, + "description": "The epoch of the resource group to be deleted", + "required": true, "schema": { "type": "integer", "description": "A number representing the version number of the resource.", @@ -220,15 +229,8 @@ } ], "responses": { - "200": { - "description": "A list of the Endpoints that were deleted", - "content": { - "application/json": { - "schema": { - "$ref": "xregistry_messagedefinition_registry.json#/definitions/definitionGroup" - } - } - } + "204": { + "description": "Ok" }, "400": { "description": "Bad Request - constraint failure" @@ -239,10 +241,16 @@ } } }, - "/definitiongroups/{groupid}/definitions": { + "/definitiongroups/{groupId}/definitions": { "parameters": [ { - "$ref": "#/components/parameters/groupid" + "$ref": "#/components/parameters/groupType" + }, + { + "$ref": "#/components/parameters/groupId" + }, + { + "$ref": "#/components/parameters/resourceType" } ], "get": { @@ -251,53 +259,56 @@ "parameters": [ { "in": "query", - "name": "name", - "description": "The name of the schema to be returned", + "name": "inline", + "description": "Set if references shall be inlined", "required": false, + "allowEmptyValue": true, "schema": { - "type": "string", - "description": "Filter expression" + "type": "boolean" } - } - ], - "responses": { - "200": { - "description": "A list of resources (optionally matching the query parameter)", - "content": { - "application/json": { - "schema": { - "type": "object", - "additionalProperties": { - "$ref": "xregistry_messagedefinition_definition.json#/definitions/definition" - } - } - } + }, + { + "in": "query", + "name": "skip", + "description": "The number of resources to skip", + "required": false, + "schema": { + "type": "integer" } - } + }, + { + "in": "query", + "name": "top", + "description": "The number of resources to show", + "required": false, + "schema": { + "type": "integer" } }, - "put": { - "operationId": "putResources", - "requestBody": { - "description": "A request to create or update the discovery group's collection of groups with the given group", - "content": { - "application/json": { + { + "in": "query", + "name": "filter", + "description": "Filter criterion(s)", + "explode": true, + "required": false, "schema": { - "type": "array", - "items": { - "$ref": "xregistry_messagedefinition_definition.json#/definitions/definition" + "type": "array", + "items": { + "type": "string" } } } - } - }, + ], "responses": { "200": { - "description": "A Endpoint Reference referencing the updated Endpoint", + "description": "Updated list of resources", "content": { "application/json": { "schema": { - "$ref": "xregistry_messagedefinition_definition.json#/definitions/definition" + "type": "object", + "additionalProperties": { + "$ref": "xregistry_messagedefinition_definition.json#/definitions/definition" + } } } } @@ -309,33 +320,34 @@ "description": "Conflict - epoch not greater" } } - }, - "delete": { - "operationId": "deleteResources", - "responses": { - "200": { - "description": "Delete succeeded" - }, - "400": { - "description": "Bad Request - constraint failure" - }, - "409": { - "description": "Conflict - epoch not greater" - } - } - } + } }, - "/definitiongroups/{groupid}/definitions/{resourceid}": { + "/definitiongroups/{groupId}/definitions/{resourceId}": { "parameters": [ { - "$ref": "#/components/parameters/groupid" + "$ref": "#/components/parameters/groupType" + }, + { + "$ref": "#/components/parameters/groupId" + }, + { + "$ref": "#/components/parameters/resourceType" }, { - "$ref": "#/components/parameters/resourceid" + "$ref": "#/components/parameters/resourceId" + }, + { + "in": "query", + "name": "meta", + "description": "Interact with the metadata", + "required": false, + "schema": { + "type": "boolean" + } } ], "get": { - "operationId": "getLatestResource", + "operationId": "getResource", "responses": { "200": { "description": "The corresponding resource", @@ -390,6 +402,11 @@ "type": "string", "format": "binary" } + }, + "application/json": { + "schema": { + "$ref": "xregistry_resources.json#/definitions/resource" + } } } }, @@ -401,10 +418,75 @@ } } }, + "put": { + "parameters": [ + { + "in": "query", + "name": "epoch", + "description": "The epoch of the resource group to be upserted", + "required": false, + "schema": { + "type": "integer", + "description": "A number representing the version number of the resource.", + "format": "int64" + } + }, + { + "$ref": "#/components/parameters/resource-description" + }, + { + "$ref": "#/components/parameters/resource-docs" + }, + { + "$ref": "#/components/parameters/resource-origin" + }, + { + "$ref": "#/components/parameters/resource-tags" + } + ], + "summary": "Create or update a resource", + "description": "Create a resource. ", + "operationId": "putResource", + "requestBody": { + "description": "The resource to be created/updated", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + }, + "application/json": { + "schema": { + "$ref": "xregistry_resources.json#/definitions/resource" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "xregistry_resources.json#/definitions/resource" + } + } + } + }, + "400": { + "description": "Bad Request - constraint failure" + }, + "409": { + "description": "Conflict - epoch not greater" + } + } + }, "post": { "summary": "Post new resource version", - "description": "Register schema version If schema of specified name does not exist in specified group, schema and schema version is created at version 1. If schema of specified name exists already in specified group, schema is created at latest version + 1. If schema with identical content already exists, existing schema's ID is returned. \n", - "operationId": "postResourceDocument", + "description": "Register resource version If resource of specified name does not exist in specified group, resource and resource version is created at version 1. If resource of specified name exists already in specified group, resource is created at latest version + 1. If resource with identical content already exists, existing resource's ID is returned. \n", + "operationId": "postResource", "parameters": [ { "$ref": "#/components/parameters/resource-description" @@ -428,19 +510,24 @@ } ], "requestBody": { - "description": "A request to add a new schema document to the schema's document collection", + "description": "A request to add a new resource to the version collection", "content": { "application/octet-stream": { "schema": { "type": "string", "format": "binary" } + }, + "application/json": { + "schema": { + "$ref": "xregistry_resources.json#/definitions/resource" + } } } }, "responses": { "201": { - "description": "A request to add a new schema document to the schema's document collection", + "description": "The created resource", "headers": { "resource-id": { "$ref": "#/components/headers/resource-id" @@ -485,6 +572,11 @@ "type": "string", "format": "binary" } + }, + "application/json": { + "schema": { + "$ref": "xregistry_resources.json#/definitions/resource" + } } } }, @@ -498,80 +590,151 @@ "description": "Conflict - epoch not greater" } } + }, + "delete": { + "summary": "Delete resource", + "description": "Delete resource", + "operationId": "deleteResource", + "parameters": [ + { + "in": "query", + "name": "epoch", + "description": "The epoch of the resource to be deleted", + "required": true, + "schema": { + "type": "integer", + "description": "A number representing the version number of the resource.", + "format": "int64" + } + } + ], + "responses": { + "204": { + "description": "No Content" + }, + "400": { + "description": "Bad Request - constraint failure" + }, + "404": { + "description": "Not Found" + } + } } }, - "/definitiongroups/{groupid}/definitions/{resourceid}/meta": { + "/definitiongroups/{groupId}/definitions/{resourceId}/versions/{versionId}": { "parameters": [ { - "$ref": "#/components/parameters/groupid" + "$ref": "#/components/parameters/groupType" + }, + { + "$ref": "#/components/parameters/groupId" }, { - "$ref": "#/components/parameters/resourceid" + "$ref": "#/components/parameters/resourceType" + }, + { + "$ref": "#/components/parameters/resourceId" + }, + { + "in": "query", + "name": "meta", + "description": "Interact with the metadata", + "required": false, + "allowEmptyValue": true, + "schema": { + "type": "boolean" + } } ], "get": { - "operationId": "getLatestResourceMetadata", - "responses": { - "200": { - "description": "The corresponding schema", - "content": { - "application/json": { - "schema": { - "$ref": "xregistry_messagedefinition_definition.json#/definitions/definition" - } - } + "operationId": "getResourceVersionsAll", + "description": "Get an optionally filtered collection of resources", + "parameters": [ + { + "in": "query", + "name": "inline", + "description": "Set if references shall be inlined", + "required": false, + "allowEmptyValue": true, + "schema": { + "type": "boolean" } }, - "400": { - "description": "Bad Request - constraint failure" + { + "in": "query", + "name": "skip", + "description": "The number of resources to skip", + "required": false, + "schema": { + "type": "integer" + } }, - "404": { - "description": "Not Found" - } - } - }, - "put": { - "operationId": "updateLatestResourceVersionMetadata", - "description": "Updates metadata of the document stored for the schema version", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "xregistry_messagedefinition_definition.json#/definitions/definition" + { + "in": "query", + "name": "top", + "description": "The number of resources to show", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "in": "query", + "name": "filter", + "description": "Filter criterion(s)", + "explode": true, + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" } } } - }, + ], "responses": { "200": { - "description": "The metadata of the schema version document", + "description": "A list of resource versions", "content": { "application/json": { "schema": { - "$ref": "xregistry_messagedefinition_definition.json#/definitions/definition" + "type": "object", + "additionalProperties": { + "$ref": "xregistry_resources.json#/definitions/resource" + } } } } - }, - "400": { - "description": "Bad Request - constraint failure" - }, - "404": { - "description": "Not Found" } } } }, - "/definitiongroups/{groupid}/definitions/{resourceid}/versions/{versionid}": { + "/{groupType}/{groupId}/{resourceType}/{resourceId}/versions/{versionId}": { "parameters": [ { - "$ref": "#/components/parameters/groupid" + "$ref": "#/components/parameters/groupType" + }, + { + "$ref": "#/components/parameters/groupId" + }, + { + "$ref": "#/components/parameters/resourceType" + }, + { + "$ref": "#/components/parameters/resourceId" }, { - "$ref": "#/components/parameters/resourceid" + "$ref": "#/components/parameters/versionId" }, { - "$ref": "#/components/parameters/versionid" + "in": "query", + "name": "meta", + "description": "Interact with the metadata", + "required": false, + "allowEmptyValue": true, + "schema": { + "type": "boolean" + } } ], "get": { @@ -635,46 +798,35 @@ } } }, - "delete": { - "operationId": "deleteResourceVersion", - "responses": { - "200": { - "description": "A list of the Endpoints that were deleted", - "content": { - "application/json": { - "schema": { - "$ref": "xregistry_resources.json#/definitions/resource" - } + "put": { + "parameters": [ + { + "in": "query", + "name": "epoch", + "description": "The epoch of the resource group to be updated", + "required": true, + "schema": { + "type": "integer", + "description": "A number representing the version number of the resource.", + "format": "int64" + } + } + ], + "operationId": "updateResourceVersion", + "description": "Updates the metadata for the schema version", + "requestBody": { + "description": "The schema version document", + "content": { + "application/json": { + "schema": { + "$ref": "xregistry_resources.json#/definitions/resource" } } - }, - "400": { - "description": "Bad Request - constraint failure" - }, - "409": { - "description": "Conflict - epoch not greater" } - } - } - }, - "/definitiongroups/{groupid}/definitions/{resourceid}/versions/{versionid}/meta": { - "parameters": [ - { - "$ref": "#/components/parameters/groupid" }, - { - "$ref": "#/components/parameters/resourceid" - }, - { - "$ref": "#/components/parameters/versionid" - } - ], - "get": { - "operationId": "getResourceVersionMetadata", - "description": "Gets metadata of the document stored for the schema version", "responses": { "200": { - "description": "The metadata of the schema version document", + "description": "The schema version metadata", "content": { "application/json": { "schema": { @@ -688,37 +840,36 @@ }, "404": { "description": "Not Found" + }, + "409": { + "description": "Conflict" } } }, - "put": { - "operationId": "updateResourceVersionMetadata", - "description": "Updates metadata of the document stored for the schema version", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "xregistry_resources.json#/definitions/resource" - } + "delete": { + "parameters": [ + { + "in": "query", + "name": "epoch", + "description": "The epoch of the resource group to be deleted", + "required": false, + "schema": { + "type": "integer", + "description": "A number representing the version number of the resource.", + "format": "int64" } } - }, + ], + "operationId": "deleteResourceVersion", "responses": { - "200": { - "description": "The metadata of the schema version document", - "content": { - "application/json": { - "schema": { - "$ref": "xregistry_resources.json#/definitions/resource" - } - } - } + "204": { + "description": "Ok" }, "400": { "description": "Bad Request - constraint failure" }, - "404": { - "description": "Not Found" + "409": { + "description": "Conflict - epoch not greater" } } } @@ -733,21 +884,28 @@ } }, "parameters": { - "id": { + "groupType": { + "in": "path", + "name": "groupType", + "description": "The groupType (plural)", + "required": true, + "schema": { + "type": "string" + } + }, + "resourceType": { "in": "path", "name": "id", - "description": "The id of the endpoint", + "description": "The resourceType (plural)", "required": true, "schema": { - "type": "string", - "description": "A unique identifier", - "format": "uri-reference" + "type": "string" } }, - "groupid": { + "id": { "in": "path", - "name": "groupid", - "description": "The id of the group", + "name": "id", + "description": "The id of the endpoint", "required": true, "schema": { "type": "string", @@ -755,10 +913,10 @@ "format": "uri-reference" } }, - "defid": { + "groupId": { "in": "path", - "name": "defid", - "description": "The id of the definition", + "name": "groupId", + "description": "The id of the group", "required": true, "schema": { "type": "string", @@ -766,9 +924,9 @@ "format": "uri-reference" } }, - "resourceid": { + "resourceId": { "in": "path", - "name": "resourceid", + "name": "resourceId", "description": "The id of the schema", "required": true, "schema": { @@ -777,9 +935,9 @@ "format": "uri-reference" } }, - "versionid": { + "versionId": { "in": "path", - "name": "versionid", + "name": "versionId", "description": "The id of the schema", "required": true, "schema": { @@ -800,7 +958,7 @@ "in": "header", "name": "resource-id", "required": false, - "description": "A unique identifier for this Endpoint. This value MUST be globally unique", + "description": "A unique identifier for this resource. This value MUST be globally unique", "schema": { "type": "string", "format": "uri-reference" @@ -820,7 +978,7 @@ "in": "header", "name": "resource-self", "required": false, - "description": "A unique URI for the resource. The URI MUST be a combination of the base URI of the list of this resource type for the current Discovery Service appended with the `id` of this resource.\n", + "description": "A unique URI for the resource.", "schema": { "type": "string", "format": "uri" diff --git a/ceregistry/schemas/xregistry_openapi_schema.json b/xregistry/schemas/xregistry_openapi_schema.json similarity index 68% rename from ceregistry/schemas/xregistry_openapi_schema.json rename to xregistry/schemas/xregistry_openapi_schema.json index 4b6dd17..db2f166 100644 --- a/ceregistry/schemas/xregistry_openapi_schema.json +++ b/xregistry/schemas/xregistry_openapi_schema.json @@ -14,7 +14,7 @@ "paths": { "/": { "get": { - "operationId": "getAll", + "operationId": "getRootDocument", "description": "Gets the root document", "parameters": [ { @@ -22,9 +22,23 @@ "name": "inline", "description": "Set if references shall be inlined", "required": false, + "allowEmptyValue": true, "schema": { "type": "boolean" } + }, + { + "in": "query", + "name": "filter", + "description": "Filter criterion(s)", + "explode": true, + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } } ], "responses": { @@ -41,7 +55,7 @@ } }, "post": { - "operationId": "uploadDoc", + "operationId": "upsertDocument", "description": "Uploads a registry document and upserts its contents into the registry", "requestBody": { "description": "A request to create or update the discovery endpoint's collection of endpoints with the given endpoints", @@ -68,24 +82,42 @@ } }, "/schemagroups": { + "parameters": [ + { + "$ref": "#/components/parameters/groupType" + } + ], "get": { "operationId": "getResourceGroupAll", "description": "Gets all entries of the resource group", "parameters": [ { "in": "query", - "name": "name", - "description": "The name of the schema group to be returned", + "name": "inline", + "description": "Set if references shall be inlined", "required": false, + "allowEmptyValue": true, "schema": { - "type": "string", - "description": "Filter expression" + "type": "boolean" + } + }, + { + "in": "query", + "name": "filter", + "description": "Filter criterion(s)", + "explode": true, + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } } } ], "responses": { "200": { - "description": "", + "description": "Resource groups that match the query or all available resource groups if no query was specified", "content": { "application/json": { "schema": { @@ -101,58 +133,22 @@ "description": "No groups found" } } - }, - "post": { - "operationId": "postGroup", - "requestBody": { - "description": "Create a new group", - "content": { - "application/json": { - "schema": { - "$ref": "xregistry_schema_registry.json#/definitions/schemaGroup" - } - } - } - }, - "responses": { - "201": { - "description": "The resulting resource", - "content": { - "application/json": { - "schema": { - "$ref": "xregistry_schema_registry.json#/definitions/schemaGroup" - } - } - }, - "headers": { - "Location": { - "description": "The location of the created resource", - "schema": { - "type": "string" - } - } - } - }, - "400": { - "description": "Bad Request - constraint failure" - }, - "409": { - "description": "Conflict - epoch not greater" - } - } } }, - "/schemagroups/{groupid}": { + "/{groupType}/{groupId}": { "parameters": [ { - "$ref": "#/components/parameters/groupid" + "$ref": "#/components/parameters/groupType" + }, + { + "$ref": "#/components/parameters/groupId" } ], "get": { "operationId": "getResourceGroup", "responses": { "200": { - "description": "The schema group", + "description": "The resource group", "content": { "application/json": { "schema": { @@ -170,6 +166,19 @@ } }, "put": { + "parameters": [ + { + "in": "query", + "name": "epoch", + "description": "The epoch of the resource group to be updated", + "required": false, + "schema": { + "type": "integer", + "description": "A number representing the version number of the resource.", + "format": "int64" + } + } + ], "operationId": "putResourceGroup", "description": "creates or updates the resource group", "requestBody": { @@ -210,8 +219,8 @@ { "in": "query", "name": "epoch", - "description": "The epoch of the schema group to be deleted", - "required": false, + "description": "The epoch of the resource group to be deleted", + "required": true, "schema": { "type": "integer", "description": "A number representing the version number of the resource.", @@ -220,15 +229,8 @@ } ], "responses": { - "200": { - "description": "A list of the Endpoints that were deleted", - "content": { - "application/json": { - "schema": { - "$ref": "xregistry_schema_registry.json#/definitions/schemaGroup" - } - } - } + "204": { + "description": "Ok" }, "400": { "description": "Bad Request - constraint failure" @@ -239,10 +241,16 @@ } } }, - "/schemagroups/{groupid}/schemas": { + "/schemagroups/{groupId}/schemas": { "parameters": [ { - "$ref": "#/components/parameters/groupid" + "$ref": "#/components/parameters/groupType" + }, + { + "$ref": "#/components/parameters/groupId" + }, + { + "$ref": "#/components/parameters/resourceType" } ], "get": { @@ -251,53 +259,56 @@ "parameters": [ { "in": "query", - "name": "name", - "description": "The name of the schema to be returned", + "name": "inline", + "description": "Set if references shall be inlined", "required": false, + "allowEmptyValue": true, "schema": { - "type": "string", - "description": "Filter expression" + "type": "boolean" } - } - ], - "responses": { - "200": { - "description": "A list of resources (optionally matching the query parameter)", - "content": { - "application/json": { - "schema": { - "type": "object", - "additionalProperties": { - "$ref": "xregistry_schema_registry.json#/definitions/schema" - } - } - } + }, + { + "in": "query", + "name": "skip", + "description": "The number of resources to skip", + "required": false, + "schema": { + "type": "integer" } - } + }, + { + "in": "query", + "name": "top", + "description": "The number of resources to show", + "required": false, + "schema": { + "type": "integer" } }, - "put": { - "operationId": "putResources", - "requestBody": { - "description": "A request to create or update the discovery group's collection of groups with the given group", - "content": { - "application/json": { + { + "in": "query", + "name": "filter", + "description": "Filter criterion(s)", + "explode": true, + "required": false, "schema": { - "type": "array", - "items": { - "$ref": "xregistry_schema_registry.json#/definitions/schema" + "type": "array", + "items": { + "type": "string" } } } - } - }, + ], "responses": { "200": { - "description": "A Endpoint Reference referencing the updated Endpoint", + "description": "Updated list of resources", "content": { "application/json": { "schema": { - "$ref": "xregistry_schema_registry.json#/definitions/schema" + "type": "object", + "additionalProperties": { + "$ref": "xregistry_schema_registry.json#/definitions/schema" + } } } } @@ -309,33 +320,34 @@ "description": "Conflict - epoch not greater" } } - }, - "delete": { - "operationId": "deleteResources", - "responses": { - "200": { - "description": "Delete succeeded" - }, - "400": { - "description": "Bad Request - constraint failure" - }, - "409": { - "description": "Conflict - epoch not greater" - } - } - } + } }, - "/schemagroups/{groupid}/schemas/{resourceid}": { + "/schemagroups/{groupId}/schemas/{resourceId}": { "parameters": [ { - "$ref": "#/components/parameters/groupid" + "$ref": "#/components/parameters/groupType" }, { - "$ref": "#/components/parameters/resourceid" + "$ref": "#/components/parameters/groupId" + }, + { + "$ref": "#/components/parameters/resourceType" + }, + { + "$ref": "#/components/parameters/resourceId" + }, + { + "in": "query", + "name": "meta", + "description": "Interact with the metadata", + "required": false, + "schema": { + "type": "boolean" + } } ], "get": { - "operationId": "getLatestResource", + "operationId": "getResource", "responses": { "200": { "description": "The corresponding resource", @@ -390,6 +402,11 @@ "type": "string", "format": "binary" } + }, + "application/json": { + "schema": { + "$ref": "xregistry_resources.json#/definitions/resource" + } } } }, @@ -401,10 +418,75 @@ } } }, + "put": { + "parameters": [ + { + "in": "query", + "name": "epoch", + "description": "The epoch of the resource group to be upserted", + "required": false, + "schema": { + "type": "integer", + "description": "A number representing the version number of the resource.", + "format": "int64" + } + }, + { + "$ref": "#/components/parameters/resource-description" + }, + { + "$ref": "#/components/parameters/resource-docs" + }, + { + "$ref": "#/components/parameters/resource-origin" + }, + { + "$ref": "#/components/parameters/resource-tags" + } + ], + "summary": "Create or update a resource", + "description": "Create a resource. ", + "operationId": "putResource", + "requestBody": { + "description": "The resource to be created/updated", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + }, + "application/json": { + "schema": { + "$ref": "xregistry_resources.json#/definitions/resource" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "xregistry_resources.json#/definitions/resource" + } + } + } + }, + "400": { + "description": "Bad Request - constraint failure" + }, + "409": { + "description": "Conflict - epoch not greater" + } + } + }, "post": { "summary": "Post new resource version", - "description": "Register schema version If schema of specified name does not exist in specified group, schema and schema version is created at version 1. If schema of specified name exists already in specified group, schema is created at latest version + 1. If schema with identical content already exists, existing schema's ID is returned. \n", - "operationId": "postResourceDocument", + "description": "Register resource version If resource of specified name does not exist in specified group, resource and resource version is created at version 1. If resource of specified name exists already in specified group, resource is created at latest version + 1. If resource with identical content already exists, existing resource's ID is returned. \n", + "operationId": "postResource", "parameters": [ { "$ref": "#/components/parameters/resource-description" @@ -428,19 +510,24 @@ } ], "requestBody": { - "description": "A request to add a new schema document to the schema's document collection", + "description": "A request to add a new resource to the version collection", "content": { "application/octet-stream": { "schema": { "type": "string", "format": "binary" } + }, + "application/json": { + "schema": { + "$ref": "xregistry_resources.json#/definitions/resource" + } } } }, "responses": { "201": { - "description": "A request to add a new schema document to the schema's document collection", + "description": "The created resource", "headers": { "resource-id": { "$ref": "#/components/headers/resource-id" @@ -485,6 +572,11 @@ "type": "string", "format": "binary" } + }, + "application/json": { + "schema": { + "$ref": "xregistry_resources.json#/definitions/resource" + } } } }, @@ -498,80 +590,151 @@ "description": "Conflict - epoch not greater" } } + }, + "delete": { + "summary": "Delete resource", + "description": "Delete resource", + "operationId": "deleteResource", + "parameters": [ + { + "in": "query", + "name": "epoch", + "description": "The epoch of the resource to be deleted", + "required": true, + "schema": { + "type": "integer", + "description": "A number representing the version number of the resource.", + "format": "int64" + } + } + ], + "responses": { + "204": { + "description": "No Content" + }, + "400": { + "description": "Bad Request - constraint failure" + }, + "404": { + "description": "Not Found" + } + } } }, - "/schemagroups/{groupid}/schemas/{resourceid}/meta": { + "/schemagroups/{groupId}/schemas/{resourceId}/versions/{versionId}": { "parameters": [ { - "$ref": "#/components/parameters/groupid" + "$ref": "#/components/parameters/groupType" + }, + { + "$ref": "#/components/parameters/groupId" + }, + { + "$ref": "#/components/parameters/resourceType" }, { - "$ref": "#/components/parameters/resourceid" + "$ref": "#/components/parameters/resourceId" + }, + { + "in": "query", + "name": "meta", + "description": "Interact with the metadata", + "required": false, + "allowEmptyValue": true, + "schema": { + "type": "boolean" + } } ], "get": { - "operationId": "getLatestResourceMetadata", - "responses": { - "200": { - "description": "The corresponding schema", - "content": { - "application/json": { - "schema": { - "$ref": "xregistry_schema_registry.json#/definitions/schema" - } - } + "operationId": "getResourceVersionsAll", + "description": "Get an optionally filtered collection of resources", + "parameters": [ + { + "in": "query", + "name": "inline", + "description": "Set if references shall be inlined", + "required": false, + "allowEmptyValue": true, + "schema": { + "type": "boolean" } }, - "400": { - "description": "Bad Request - constraint failure" + { + "in": "query", + "name": "skip", + "description": "The number of resources to skip", + "required": false, + "schema": { + "type": "integer" + } }, - "404": { - "description": "Not Found" - } - } - }, - "put": { - "operationId": "updateLatestResourceVersionMetadata", - "description": "Updates metadata of the document stored for the schema version", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "xregistry_schema_registry.json#/definitions/schema" + { + "in": "query", + "name": "top", + "description": "The number of resources to show", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "in": "query", + "name": "filter", + "description": "Filter criterion(s)", + "explode": true, + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" } } } - }, + ], "responses": { "200": { - "description": "The metadata of the schema version document", + "description": "A list of resource versions", "content": { "application/json": { "schema": { - "$ref": "xregistry_schema_registry.json#/definitions/schema" + "type": "object", + "additionalProperties": { + "$ref": "xregistry_resources.json#/definitions/resource" + } } } } - }, - "400": { - "description": "Bad Request - constraint failure" - }, - "404": { - "description": "Not Found" } } } }, - "/schemagroups/{groupid}/schemas/{resourceid}/versions/{versionid}": { + "/{groupType}/{groupId}/{resourceType}/{resourceId}/versions/{versionId}": { "parameters": [ { - "$ref": "#/components/parameters/groupid" + "$ref": "#/components/parameters/groupType" + }, + { + "$ref": "#/components/parameters/groupId" + }, + { + "$ref": "#/components/parameters/resourceType" }, { - "$ref": "#/components/parameters/resourceid" + "$ref": "#/components/parameters/resourceId" }, { - "$ref": "#/components/parameters/versionid" + "$ref": "#/components/parameters/versionId" + }, + { + "in": "query", + "name": "meta", + "description": "Interact with the metadata", + "required": false, + "allowEmptyValue": true, + "schema": { + "type": "boolean" + } } ], "get": { @@ -635,50 +798,39 @@ } } }, - "delete": { - "operationId": "deleteResourceVersion", - "responses": { - "200": { - "description": "A list of the Endpoints that were deleted", - "content": { - "application/json": { - "schema": { - "$ref": "xregistry_schema_registry.json#/definitions/schemaVersion" - } + "put": { + "parameters": [ + { + "in": "query", + "name": "epoch", + "description": "The epoch of the resource group to be updated", + "required": true, + "schema": { + "type": "integer", + "description": "A number representing the version number of the resource.", + "format": "int64" + } + } + ], + "operationId": "updateResourceVersion", + "description": "Updates the metadata for the schema version", + "requestBody": { + "description": "The schema version document", + "content": { + "application/json": { + "schema": { + "$ref": "xregistry_resources.json#/definitions/resource" } } - }, - "400": { - "description": "Bad Request - constraint failure" - }, - "409": { - "description": "Conflict - epoch not greater" } - } - } - }, - "/schemagroups/{groupid}/schemas/{resourceid}/versions/{versionid}/meta": { - "parameters": [ - { - "$ref": "#/components/parameters/groupid" - }, - { - "$ref": "#/components/parameters/resourceid" }, - { - "$ref": "#/components/parameters/versionid" - } - ], - "get": { - "operationId": "getResourceVersionMetadata", - "description": "Gets metadata of the document stored for the schema version", "responses": { "200": { - "description": "The metadata of the schema version document", + "description": "The schema version metadata", "content": { "application/json": { "schema": { - "$ref": "xregistry_schema_registry.json#/definitions/schemaVersion" + "$ref": "xregistry_resources.json#/definitions/resource" } } } @@ -688,37 +840,36 @@ }, "404": { "description": "Not Found" + }, + "409": { + "description": "Conflict" } } }, - "put": { - "operationId": "updateResourceVersionMetadata", - "description": "Updates metadata of the document stored for the schema version", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "xregistry_schema_registry.json#/definitions/schemaVersion" - } + "delete": { + "parameters": [ + { + "in": "query", + "name": "epoch", + "description": "The epoch of the resource group to be deleted", + "required": false, + "schema": { + "type": "integer", + "description": "A number representing the version number of the resource.", + "format": "int64" } } - }, + ], + "operationId": "deleteResourceVersion", "responses": { - "200": { - "description": "The metadata of the schema version document", - "content": { - "application/json": { - "schema": { - "$ref": "xregistry_schema_registry.json#/definitions/schemaVersion" - } - } - } + "204": { + "description": "Ok" }, "400": { "description": "Bad Request - constraint failure" }, - "404": { - "description": "Not Found" + "409": { + "description": "Conflict - epoch not greater" } } } @@ -733,21 +884,28 @@ } }, "parameters": { - "id": { + "groupType": { + "in": "path", + "name": "groupType", + "description": "The groupType (plural)", + "required": true, + "schema": { + "type": "string" + } + }, + "resourceType": { "in": "path", "name": "id", - "description": "The id of the endpoint", + "description": "The resourceType (plural)", "required": true, "schema": { - "type": "string", - "description": "A unique identifier", - "format": "uri-reference" + "type": "string" } }, - "groupid": { + "id": { "in": "path", - "name": "groupid", - "description": "The id of the group", + "name": "id", + "description": "The id of the endpoint", "required": true, "schema": { "type": "string", @@ -755,10 +913,10 @@ "format": "uri-reference" } }, - "defid": { + "groupId": { "in": "path", - "name": "defid", - "description": "The id of the definition", + "name": "groupId", + "description": "The id of the group", "required": true, "schema": { "type": "string", @@ -766,9 +924,9 @@ "format": "uri-reference" } }, - "resourceid": { + "resourceId": { "in": "path", - "name": "resourceid", + "name": "resourceId", "description": "The id of the schema", "required": true, "schema": { @@ -777,9 +935,9 @@ "format": "uri-reference" } }, - "versionid": { + "versionId": { "in": "path", - "name": "versionid", + "name": "versionId", "description": "The id of the schema", "required": true, "schema": { @@ -800,7 +958,7 @@ "in": "header", "name": "resource-id", "required": false, - "description": "A unique identifier for this Endpoint. This value MUST be globally unique", + "description": "A unique identifier for this resource. This value MUST be globally unique", "schema": { "type": "string", "format": "uri-reference" @@ -820,7 +978,7 @@ "in": "header", "name": "resource-self", "required": false, - "description": "A unique URI for the resource. The URI MUST be a combination of the base URI of the list of this resource type for the current Discovery Service appended with the `id` of this resource.\n", + "description": "A unique URI for the resource.", "schema": { "type": "string", "format": "uri" diff --git a/ceregistry/schemas/xregistry_openapi_template.json b/xregistry/schemas/xregistry_openapi_template.json similarity index 68% rename from ceregistry/schemas/xregistry_openapi_template.json rename to xregistry/schemas/xregistry_openapi_template.json index d0405bc..f5b5667 100644 --- a/ceregistry/schemas/xregistry_openapi_template.json +++ b/xregistry/schemas/xregistry_openapi_template.json @@ -14,7 +14,7 @@ "paths": { "/": { "get": { - "operationId": "getAll", + "operationId": "getRootDocument", "description": "Gets the root document", "parameters": [ { @@ -22,9 +22,23 @@ "name": "inline", "description": "Set if references shall be inlined", "required": false, + "allowEmptyValue": true, "schema": { "type": "boolean" } + }, + { + "in": "query", + "name": "filter", + "description": "Filter criterion(s)", + "explode": true, + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } } ], "responses": { @@ -41,7 +55,7 @@ } }, "post": { - "operationId": "uploadDoc", + "operationId": "upsertDocument", "description": "Uploads a registry document and upserts its contents into the registry", "requestBody": { "description": "A request to create or update the discovery endpoint's collection of endpoints with the given endpoints", @@ -68,24 +82,42 @@ } }, "/{%-groupNamePlural-%}": { + "parameters": [ + { + "$ref": "#/components/parameters/groupType" + } + ], "get": { "operationId": "getResourceGroupAll", "description": "Gets all entries of the resource group", "parameters": [ { "in": "query", - "name": "name", - "description": "The name of the schema group to be returned", + "name": "inline", + "description": "Set if references shall be inlined", "required": false, + "allowEmptyValue": true, "schema": { - "type": "string", - "description": "Filter expression" + "type": "boolean" + } + }, + { + "in": "query", + "name": "filter", + "description": "Filter criterion(s)", + "explode": true, + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } } } ], "responses": { "200": { - "description": "", + "description": "Resource groups that match the query or all available resource groups if no query was specified", "content": { "application/json": { "schema": { @@ -101,58 +133,22 @@ "description": "No groups found" } } - }, - "post": { - "operationId": "postGroup", - "requestBody": { - "description": "Create a new group", - "content": { - "application/json": { - "schema": { - "$ref": "{%-groupTypeReference-%}" - } - } - } - }, - "responses": { - "201": { - "description": "The resulting resource", - "content": { - "application/json": { - "schema": { - "$ref": "{%-groupTypeReference-%}" - } - } - }, - "headers": { - "Location": { - "description": "The location of the created resource", - "schema": { - "type": "string" - } - } - } - }, - "400": { - "description": "Bad Request - constraint failure" - }, - "409": { - "description": "Conflict - epoch not greater" - } - } } }, - "/{%-groupNamePlural-%}/{groupid}": { + "/{groupType}/{groupId}": { "parameters": [ { - "$ref": "#/components/parameters/groupid" + "$ref": "#/components/parameters/groupType" + }, + { + "$ref": "#/components/parameters/groupId" } ], "get": { "operationId": "getResourceGroup", "responses": { "200": { - "description": "The schema group", + "description": "The resource group", "content": { "application/json": { "schema": { @@ -170,6 +166,19 @@ } }, "put": { + "parameters": [ + { + "in": "query", + "name": "epoch", + "description": "The epoch of the resource group to be updated", + "required": false, + "schema": { + "type": "integer", + "description": "A number representing the version number of the resource.", + "format": "int64" + } + } + ], "operationId": "putResourceGroup", "description": "creates or updates the resource group", "requestBody": { @@ -210,8 +219,8 @@ { "in": "query", "name": "epoch", - "description": "The epoch of the schema group to be deleted", - "required": false, + "description": "The epoch of the resource group to be deleted", + "required": true, "schema": { "type": "integer", "description": "A number representing the version number of the resource.", @@ -220,15 +229,8 @@ } ], "responses": { - "200": { - "description": "A list of the Endpoints that were deleted", - "content": { - "application/json": { - "schema": { - "$ref": "{%-groupTypeReference-%}" - } - } - } + "204": { + "description": "Ok" }, "400": { "description": "Bad Request - constraint failure" @@ -239,10 +241,16 @@ } } }, - "/{%-groupNamePlural-%}/{groupid}/{%-resourceNamePlural-%}": { + "/{%-groupNamePlural-%}/{groupId}/{%-resourceNamePlural-%}": { "parameters": [ { - "$ref": "#/components/parameters/groupid" + "$ref": "#/components/parameters/groupType" + }, + { + "$ref": "#/components/parameters/groupId" + }, + { + "$ref": "#/components/parameters/resourceType" } ], "get": { @@ -251,53 +259,56 @@ "parameters": [ { "in": "query", - "name": "name", - "description": "The name of the schema to be returned", + "name": "inline", + "description": "Set if references shall be inlined", "required": false, + "allowEmptyValue": true, "schema": { - "type": "string", - "description": "Filter expression" + "type": "boolean" } - } - ], - "responses": { - "200": { - "description": "A list of resources (optionally matching the query parameter)", - "content": { - "application/json": { - "schema": { - "type": "object", - "additionalProperties": { - "$ref": "{%-resourceTypeReference-%}" - } - } - } + }, + { + "in": "query", + "name": "skip", + "description": "The number of resources to skip", + "required": false, + "schema": { + "type": "integer" } - } + }, + { + "in": "query", + "name": "top", + "description": "The number of resources to show", + "required": false, + "schema": { + "type": "integer" } }, - "put": { - "operationId": "putResources", - "requestBody": { - "description": "A request to create or update the discovery group's collection of groups with the given group", - "content": { - "application/json": { + { + "in": "query", + "name": "filter", + "description": "Filter criterion(s)", + "explode": true, + "required": false, "schema": { - "type": "array", - "items": { - "$ref": "{%-resourceTypeReference-%}" + "type": "array", + "items": { + "type": "string" } } } - } - }, + ], "responses": { "200": { - "description": "A Endpoint Reference referencing the updated Endpoint", + "description": "Updated list of resources", "content": { "application/json": { "schema": { - "$ref": "{%-resourceTypeReference-%}" + "type": "object", + "additionalProperties": { + "$ref": "{%-resourceTypeReference-%}" + } } } } @@ -309,33 +320,34 @@ "description": "Conflict - epoch not greater" } } - }, - "delete": { - "operationId": "deleteResources", - "responses": { - "200": { - "description": "Delete succeeded" - }, - "400": { - "description": "Bad Request - constraint failure" - }, - "409": { - "description": "Conflict - epoch not greater" - } - } - } + } }, - "/{%-groupNamePlural-%}/{groupid}/{%-resourceNamePlural-%}/{resourceid}": { + "/{%-groupNamePlural-%}/{groupId}/{%-resourceNamePlural-%}/{resourceId}": { "parameters": [ { - "$ref": "#/components/parameters/groupid" + "$ref": "#/components/parameters/groupType" }, { - "$ref": "#/components/parameters/resourceid" + "$ref": "#/components/parameters/groupId" + }, + { + "$ref": "#/components/parameters/resourceType" + }, + { + "$ref": "#/components/parameters/resourceId" + }, + { + "in": "query", + "name": "meta", + "description": "Interact with the metadata", + "required": false, + "schema": { + "type": "boolean" + } } ], "get": { - "operationId": "getLatestResource", + "operationId": "getResource", "responses": { "200": { "description": "The corresponding resource", @@ -390,6 +402,11 @@ "type": "string", "format": "binary" } + }, + "application/json": { + "schema": { + "$ref": "xregistry_resources.json#/definitions/resource" + } } } }, @@ -401,10 +418,75 @@ } } }, + "put": { + "parameters": [ + { + "in": "query", + "name": "epoch", + "description": "The epoch of the resource group to be upserted", + "required": false, + "schema": { + "type": "integer", + "description": "A number representing the version number of the resource.", + "format": "int64" + } + }, + { + "$ref": "#/components/parameters/resource-description" + }, + { + "$ref": "#/components/parameters/resource-docs" + }, + { + "$ref": "#/components/parameters/resource-origin" + }, + { + "$ref": "#/components/parameters/resource-tags" + } + ], + "summary": "Create or update a resource", + "description": "Create a resource. ", + "operationId": "putResource", + "requestBody": { + "description": "The resource to be created/updated", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + }, + "application/json": { + "schema": { + "$ref": "xregistry_resources.json#/definitions/resource" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "xregistry_resources.json#/definitions/resource" + } + } + } + }, + "400": { + "description": "Bad Request - constraint failure" + }, + "409": { + "description": "Conflict - epoch not greater" + } + } + }, "post": { "summary": "Post new resource version", - "description": "Register schema version If schema of specified name does not exist in specified group, schema and schema version is created at version 1. If schema of specified name exists already in specified group, schema is created at latest version + 1. If schema with identical content already exists, existing schema's ID is returned. \n", - "operationId": "postResourceDocument", + "description": "Register resource version If resource of specified name does not exist in specified group, resource and resource version is created at version 1. If resource of specified name exists already in specified group, resource is created at latest version + 1. If resource with identical content already exists, existing resource's ID is returned. \n", + "operationId": "postResource", "parameters": [ { "$ref": "#/components/parameters/resource-description" @@ -428,19 +510,24 @@ } ], "requestBody": { - "description": "A request to add a new schema document to the schema's document collection", + "description": "A request to add a new resource to the version collection", "content": { "application/octet-stream": { "schema": { "type": "string", "format": "binary" } + }, + "application/json": { + "schema": { + "$ref": "xregistry_resources.json#/definitions/resource" + } } } }, "responses": { "201": { - "description": "A request to add a new schema document to the schema's document collection", + "description": "The created resource", "headers": { "resource-id": { "$ref": "#/components/headers/resource-id" @@ -485,6 +572,11 @@ "type": "string", "format": "binary" } + }, + "application/json": { + "schema": { + "$ref": "xregistry_resources.json#/definitions/resource" + } } } }, @@ -498,80 +590,151 @@ "description": "Conflict - epoch not greater" } } + }, + "delete": { + "summary": "Delete resource", + "description": "Delete resource", + "operationId": "deleteResource", + "parameters": [ + { + "in": "query", + "name": "epoch", + "description": "The epoch of the resource to be deleted", + "required": true, + "schema": { + "type": "integer", + "description": "A number representing the version number of the resource.", + "format": "int64" + } + } + ], + "responses": { + "204": { + "description": "No Content" + }, + "400": { + "description": "Bad Request - constraint failure" + }, + "404": { + "description": "Not Found" + } + } } }, - "/{%-groupNamePlural-%}/{groupid}/{%-resourceNamePlural-%}/{resourceid}/meta": { + "/{%-groupNamePlural-%}/{groupId}/{%-resourceNamePlural-%}/{resourceId}/versions/{versionId}": { "parameters": [ { - "$ref": "#/components/parameters/groupid" + "$ref": "#/components/parameters/groupType" + }, + { + "$ref": "#/components/parameters/groupId" + }, + { + "$ref": "#/components/parameters/resourceType" }, { - "$ref": "#/components/parameters/resourceid" + "$ref": "#/components/parameters/resourceId" + }, + { + "in": "query", + "name": "meta", + "description": "Interact with the metadata", + "required": false, + "allowEmptyValue": true, + "schema": { + "type": "boolean" + } } ], "get": { - "operationId": "getLatestResourceMetadata", - "responses": { - "200": { - "description": "The corresponding schema", - "content": { - "application/json": { - "schema": { - "$ref": "{%-resourceTypeReference-%}" - } - } + "operationId": "getResourceVersionsAll", + "description": "Get an optionally filtered collection of resources", + "parameters": [ + { + "in": "query", + "name": "inline", + "description": "Set if references shall be inlined", + "required": false, + "allowEmptyValue": true, + "schema": { + "type": "boolean" } }, - "400": { - "description": "Bad Request - constraint failure" + { + "in": "query", + "name": "skip", + "description": "The number of resources to skip", + "required": false, + "schema": { + "type": "integer" + } }, - "404": { - "description": "Not Found" - } - } - }, - "put": { - "operationId": "updateLatestResourceVersionMetadata", - "description": "Updates metadata of the document stored for the schema version", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "{%-resourceTypeReference-%}" + { + "in": "query", + "name": "top", + "description": "The number of resources to show", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "in": "query", + "name": "filter", + "description": "Filter criterion(s)", + "explode": true, + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" } } } - }, + ], "responses": { "200": { - "description": "The metadata of the schema version document", + "description": "A list of resource versions", "content": { "application/json": { "schema": { - "$ref": "{%-resourceTypeReference-%}" + "type": "object", + "additionalProperties": { + "$ref": "xregistry_resources.json#/definitions/resource" + } } } } - }, - "400": { - "description": "Bad Request - constraint failure" - }, - "404": { - "description": "Not Found" } } } }, - "/{%-groupNamePlural-%}/{groupid}/{%-resourceNamePlural-%}/{resourceid}/versions/{versionid}": { + "/{groupType}/{groupId}/{resourceType}/{resourceId}/versions/{versionId}": { "parameters": [ { - "$ref": "#/components/parameters/groupid" + "$ref": "#/components/parameters/groupType" + }, + { + "$ref": "#/components/parameters/groupId" + }, + { + "$ref": "#/components/parameters/resourceType" }, { - "$ref": "#/components/parameters/resourceid" + "$ref": "#/components/parameters/resourceId" }, { - "$ref": "#/components/parameters/versionid" + "$ref": "#/components/parameters/versionId" + }, + { + "in": "query", + "name": "meta", + "description": "Interact with the metadata", + "required": false, + "allowEmptyValue": true, + "schema": { + "type": "boolean" + } } ], "get": { @@ -635,50 +798,39 @@ } } }, - "delete": { - "operationId": "deleteResourceVersion", - "responses": { - "200": { - "description": "A list of the Endpoints that were deleted", - "content": { - "application/json": { - "schema": { - "$ref": "{%-resourceVersionTypeReference-%}" - } + "put": { + "parameters": [ + { + "in": "query", + "name": "epoch", + "description": "The epoch of the resource group to be updated", + "required": true, + "schema": { + "type": "integer", + "description": "A number representing the version number of the resource.", + "format": "int64" + } + } + ], + "operationId": "updateResourceVersion", + "description": "Updates the metadata for the schema version", + "requestBody": { + "description": "The schema version document", + "content": { + "application/json": { + "schema": { + "$ref": "xregistry_resources.json#/definitions/resource" } } - }, - "400": { - "description": "Bad Request - constraint failure" - }, - "409": { - "description": "Conflict - epoch not greater" } - } - } - }, - "/{%-groupNamePlural-%}/{groupid}/{%-resourceNamePlural-%}/{resourceid}/versions/{versionid}/meta": { - "parameters": [ - { - "$ref": "#/components/parameters/groupid" - }, - { - "$ref": "#/components/parameters/resourceid" }, - { - "$ref": "#/components/parameters/versionid" - } - ], - "get": { - "operationId": "getResourceVersionMetadata", - "description": "Gets metadata of the document stored for the schema version", "responses": { "200": { - "description": "The metadata of the schema version document", + "description": "The schema version metadata", "content": { "application/json": { "schema": { - "$ref": "{%-resourceVersionTypeReference-%}" + "$ref": "xregistry_resources.json#/definitions/resource" } } } @@ -688,37 +840,36 @@ }, "404": { "description": "Not Found" + }, + "409": { + "description": "Conflict" } } }, - "put": { - "operationId": "updateResourceVersionMetadata", - "description": "Updates metadata of the document stored for the schema version", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "{%-resourceVersionTypeReference-%}" - } + "delete": { + "parameters": [ + { + "in": "query", + "name": "epoch", + "description": "The epoch of the resource group to be deleted", + "required": false, + "schema": { + "type": "integer", + "description": "A number representing the version number of the resource.", + "format": "int64" } } - }, + ], + "operationId": "deleteResourceVersion", "responses": { - "200": { - "description": "The metadata of the schema version document", - "content": { - "application/json": { - "schema": { - "$ref": "{%-resourceVersionTypeReference-%}" - } - } - } + "204": { + "description": "Ok" }, "400": { "description": "Bad Request - constraint failure" }, - "404": { - "description": "Not Found" + "409": { + "description": "Conflict - epoch not greater" } } } @@ -733,21 +884,28 @@ } }, "parameters": { - "id": { + "groupType": { + "in": "path", + "name": "groupType", + "description": "The groupType (plural)", + "required": true, + "schema": { + "type": "string" + } + }, + "resourceType": { "in": "path", "name": "id", - "description": "The id of the endpoint", + "description": "The resourceType (plural)", "required": true, "schema": { - "type": "string", - "description": "A unique identifier", - "format": "uri-reference" + "type": "string" } }, - "groupid": { + "id": { "in": "path", - "name": "groupid", - "description": "The id of the group", + "name": "id", + "description": "The id of the endpoint", "required": true, "schema": { "type": "string", @@ -755,10 +913,10 @@ "format": "uri-reference" } }, - "defid": { + "groupId": { "in": "path", - "name": "defid", - "description": "The id of the definition", + "name": "groupId", + "description": "The id of the group", "required": true, "schema": { "type": "string", @@ -766,9 +924,9 @@ "format": "uri-reference" } }, - "resourceid": { + "resourceId": { "in": "path", - "name": "resourceid", + "name": "resourceId", "description": "The id of the schema", "required": true, "schema": { @@ -777,9 +935,9 @@ "format": "uri-reference" } }, - "versionid": { + "versionId": { "in": "path", - "name": "versionid", + "name": "versionId", "description": "The id of the schema", "required": true, "schema": { @@ -800,7 +958,7 @@ "in": "header", "name": "resource-id", "required": false, - "description": "A unique identifier for this Endpoint. This value MUST be globally unique", + "description": "A unique identifier for this resource. This value MUST be globally unique", "schema": { "type": "string", "format": "uri-reference" @@ -820,7 +978,7 @@ "in": "header", "name": "resource-self", "required": false, - "description": "A unique URI for the resource. The URI MUST be a combination of the base URI of the list of this resource type for the current Discovery Service appended with the `id` of this resource.\n", + "description": "A unique URI for the resource.", "schema": { "type": "string", "format": "uri" diff --git a/ceregistry/schemas/xregistry_openapi_template_endpoint_registry_sed_args.txt b/xregistry/schemas/xregistry_openapi_template_endpoint_registry_sed_args.txt similarity index 100% rename from ceregistry/schemas/xregistry_openapi_template_endpoint_registry_sed_args.txt rename to xregistry/schemas/xregistry_openapi_template_endpoint_registry_sed_args.txt diff --git a/ceregistry/schemas/xregistry_openapi_template_messagedefinition_registry_sed_args.txt b/xregistry/schemas/xregistry_openapi_template_messagedefinition_registry_sed_args.txt similarity index 100% rename from ceregistry/schemas/xregistry_openapi_template_messagedefinition_registry_sed_args.txt rename to xregistry/schemas/xregistry_openapi_template_messagedefinition_registry_sed_args.txt diff --git a/ceregistry/schemas/xregistry_openapi_template_schema_registry_sed_args.txt b/xregistry/schemas/xregistry_openapi_template_schema_registry_sed_args.txt similarity index 100% rename from ceregistry/schemas/xregistry_openapi_template_schema_registry_sed_args.txt rename to xregistry/schemas/xregistry_openapi_template_schema_registry_sed_args.txt diff --git a/ceregistry/schemas/xregistry_resources.json b/xregistry/schemas/xregistry_resources.json similarity index 100% rename from ceregistry/schemas/xregistry_resources.json rename to xregistry/schemas/xregistry_resources.json diff --git a/ceregistry/schemas/xregistry_schema_registry.json b/xregistry/schemas/xregistry_schema_registry.json similarity index 100% rename from ceregistry/schemas/xregistry_schema_registry.json rename to xregistry/schemas/xregistry_schema_registry.json diff --git a/ceregistry/templates/asaql/_schemas/_json.asaql.jinja b/xregistry/templates/asaql/_schemas/_json.asaql.jinja similarity index 100% rename from ceregistry/templates/asaql/_schemas/_json.asaql.jinja rename to xregistry/templates/asaql/_schemas/_json.asaql.jinja diff --git a/ceregistry/templates/asaql/_templateinfo.json b/xregistry/templates/asaql/_templateinfo.json similarity index 100% rename from ceregistry/templates/asaql/_templateinfo.json rename to xregistry/templates/asaql/_templateinfo.json diff --git a/ceregistry/templates/asaql/dispatch/JobConfig.json.jinja b/xregistry/templates/asaql/dispatch/JobConfig.json.jinja similarity index 100% rename from ceregistry/templates/asaql/dispatch/JobConfig.json.jinja rename to xregistry/templates/asaql/dispatch/JobConfig.json.jinja diff --git a/ceregistry/templates/asaql/dispatch/SampleEvents/sampleevents.jinja b/xregistry/templates/asaql/dispatch/SampleEvents/sampleevents.jinja similarity index 100% rename from ceregistry/templates/asaql/dispatch/SampleEvents/sampleevents.jinja rename to xregistry/templates/asaql/dispatch/SampleEvents/sampleevents.jinja diff --git a/ceregistry/templates/asaql/dispatch/_templateinfo.json b/xregistry/templates/asaql/dispatch/_templateinfo.json similarity index 100% rename from ceregistry/templates/asaql/dispatch/_templateinfo.json rename to xregistry/templates/asaql/dispatch/_templateinfo.json diff --git a/ceregistry/templates/asaql/dispatch/{projectname}.asaql.jinja b/xregistry/templates/asaql/dispatch/{projectname}.asaql.jinja similarity index 100% rename from ceregistry/templates/asaql/dispatch/{projectname}.asaql.jinja rename to xregistry/templates/asaql/dispatch/{projectname}.asaql.jinja diff --git a/ceregistry/templates/asaql/dispatch/{projectname}.json.jinja b/xregistry/templates/asaql/dispatch/{projectname}.json.jinja similarity index 100% rename from ceregistry/templates/asaql/dispatch/{projectname}.json.jinja rename to xregistry/templates/asaql/dispatch/{projectname}.json.jinja diff --git a/ceregistry/templates/asaql/dispatchpayload/JobConfig.json.jinja b/xregistry/templates/asaql/dispatchpayload/JobConfig.json.jinja similarity index 100% rename from ceregistry/templates/asaql/dispatchpayload/JobConfig.json.jinja rename to xregistry/templates/asaql/dispatchpayload/JobConfig.json.jinja diff --git a/ceregistry/templates/asaql/dispatchpayload/SampleEvents/sampleevents.jinja b/xregistry/templates/asaql/dispatchpayload/SampleEvents/sampleevents.jinja similarity index 100% rename from ceregistry/templates/asaql/dispatchpayload/SampleEvents/sampleevents.jinja rename to xregistry/templates/asaql/dispatchpayload/SampleEvents/sampleevents.jinja diff --git a/ceregistry/templates/asaql/dispatchpayload/_templateinfo.json b/xregistry/templates/asaql/dispatchpayload/_templateinfo.json similarity index 100% rename from ceregistry/templates/asaql/dispatchpayload/_templateinfo.json rename to xregistry/templates/asaql/dispatchpayload/_templateinfo.json diff --git a/ceregistry/templates/asaql/dispatchpayload/_{projectname}.asaql.jinja b/xregistry/templates/asaql/dispatchpayload/_{projectname}.asaql.jinja similarity index 100% rename from ceregistry/templates/asaql/dispatchpayload/_{projectname}.asaql.jinja rename to xregistry/templates/asaql/dispatchpayload/_{projectname}.asaql.jinja diff --git a/ceregistry/templates/asaql/dispatchpayload/{projectname}.json.jinja b/xregistry/templates/asaql/dispatchpayload/{projectname}.json.jinja similarity index 100% rename from ceregistry/templates/asaql/dispatchpayload/{projectname}.json.jinja rename to xregistry/templates/asaql/dispatchpayload/{projectname}.json.jinja diff --git a/ceregistry/templates/asyncapi/_templateinfo.json b/xregistry/templates/asyncapi/_templateinfo.json similarity index 100% rename from ceregistry/templates/asyncapi/_templateinfo.json rename to xregistry/templates/asyncapi/_templateinfo.json diff --git a/ceregistry/templates/asyncapi/producer/_templateinfo.json b/xregistry/templates/asyncapi/producer/_templateinfo.json similarity index 100% rename from ceregistry/templates/asyncapi/producer/_templateinfo.json rename to xregistry/templates/asyncapi/producer/_templateinfo.json diff --git a/ceregistry/templates/asyncapi/producer/{projectname}.yml.jinja b/xregistry/templates/asyncapi/producer/{projectname}.yml.jinja similarity index 99% rename from ceregistry/templates/asyncapi/producer/{projectname}.yml.jinja rename to xregistry/templates/asyncapi/producer/{projectname}.yml.jinja index b80fe43..f202285 100644 --- a/ceregistry/templates/asyncapi/producer/{projectname}.yml.jinja +++ b/xregistry/templates/asyncapi/producer/{projectname}.yml.jinja @@ -5,7 +5,7 @@ asyncapi: 2.6.0 id: "urn:{{ project_name }}" tags: -- name: ceregistry +- name: xregistry info: title: "{{ root.description }}" version: "1.0" diff --git a/ceregistry/templates/cs/_common/amqp.jinja.include b/xregistry/templates/cs/_common/amqp.jinja.include similarity index 100% rename from ceregistry/templates/cs/_common/amqp.jinja.include rename to xregistry/templates/cs/_common/amqp.jinja.include diff --git a/ceregistry/templates/cs/_common/cloudevents.jinja.include b/xregistry/templates/cs/_common/cloudevents.jinja.include similarity index 100% rename from ceregistry/templates/cs/_common/cloudevents.jinja.include rename to xregistry/templates/cs/_common/cloudevents.jinja.include diff --git a/ceregistry/templates/cs/_common/mqtt.jinja.include b/xregistry/templates/cs/_common/mqtt.jinja.include similarity index 100% rename from ceregistry/templates/cs/_common/mqtt.jinja.include rename to xregistry/templates/cs/_common/mqtt.jinja.include diff --git a/ceregistry/templates/cs/_schemas/_templateinfo.json b/xregistry/templates/cs/_schemas/_templateinfo.json similarity index 100% rename from ceregistry/templates/cs/_schemas/_templateinfo.json rename to xregistry/templates/cs/_schemas/_templateinfo.json diff --git a/ceregistry/templates/cs/_schemas/data/SchemaConstants.cs.jinja b/xregistry/templates/cs/_schemas/data/SchemaConstants.cs.jinja similarity index 100% rename from ceregistry/templates/cs/_schemas/data/SchemaConstants.cs.jinja rename to xregistry/templates/cs/_schemas/data/SchemaConstants.cs.jinja diff --git a/ceregistry/templates/cs/_schemas/data/_avro.avsc.jinja b/xregistry/templates/cs/_schemas/data/_avro.avsc.jinja similarity index 100% rename from ceregistry/templates/cs/_schemas/data/_avro.avsc.jinja rename to xregistry/templates/cs/_schemas/data/_avro.avsc.jinja diff --git a/ceregistry/templates/cs/_schemas/data/_avro.cs.jinja b/xregistry/templates/cs/_schemas/data/_avro.cs.jinja similarity index 100% rename from ceregistry/templates/cs/_schemas/data/_avro.cs.jinja rename to xregistry/templates/cs/_schemas/data/_avro.cs.jinja diff --git a/ceregistry/templates/cs/_schemas/data/_json.cs.jinja b/xregistry/templates/cs/_schemas/data/_json.cs.jinja similarity index 100% rename from ceregistry/templates/cs/_schemas/data/_json.cs.jinja rename to xregistry/templates/cs/_schemas/data/_json.cs.jinja diff --git a/ceregistry/templates/cs/_schemas/data/_proto.cs.jinja b/xregistry/templates/cs/_schemas/data/_proto.cs.jinja similarity index 100% rename from ceregistry/templates/cs/_schemas/data/_proto.cs.jinja rename to xregistry/templates/cs/_schemas/data/_proto.cs.jinja diff --git a/ceregistry/templates/cs/_schemas/data/_proto.proto.jinja b/xregistry/templates/cs/_schemas/data/_proto.proto.jinja similarity index 100% rename from ceregistry/templates/cs/_schemas/data/_proto.proto.jinja rename to xregistry/templates/cs/_schemas/data/_proto.proto.jinja diff --git a/ceregistry/templates/cs/_templateinfo.json b/xregistry/templates/cs/_templateinfo.json similarity index 100% rename from ceregistry/templates/cs/_templateinfo.json rename to xregistry/templates/cs/_templateinfo.json diff --git a/ceregistry/templates/cs/azfunctioneventgrid/DispatchInterfaces.cs.jinja b/xregistry/templates/cs/azfunctioneventgrid/DispatchInterfaces.cs.jinja similarity index 100% rename from ceregistry/templates/cs/azfunctioneventgrid/DispatchInterfaces.cs.jinja rename to xregistry/templates/cs/azfunctioneventgrid/DispatchInterfaces.cs.jinja diff --git a/ceregistry/templates/cs/azfunctioneventgrid/Function.cs.jinja b/xregistry/templates/cs/azfunctioneventgrid/Function.cs.jinja similarity index 100% rename from ceregistry/templates/cs/azfunctioneventgrid/Function.cs.jinja rename to xregistry/templates/cs/azfunctioneventgrid/Function.cs.jinja diff --git a/ceregistry/templates/cs/azfunctioneventgrid/_templateinfo.json b/xregistry/templates/cs/azfunctioneventgrid/_templateinfo.json similarity index 100% rename from ceregistry/templates/cs/azfunctioneventgrid/_templateinfo.json rename to xregistry/templates/cs/azfunctioneventgrid/_templateinfo.json diff --git a/ceregistry/templates/cs/azfunctioneventgrid/host.json.jinja b/xregistry/templates/cs/azfunctioneventgrid/host.json.jinja similarity index 100% rename from ceregistry/templates/cs/azfunctioneventgrid/host.json.jinja rename to xregistry/templates/cs/azfunctioneventgrid/host.json.jinja diff --git a/ceregistry/templates/cs/azfunctioneventgrid/local.settings.json.jinja b/xregistry/templates/cs/azfunctioneventgrid/local.settings.json.jinja similarity index 100% rename from ceregistry/templates/cs/azfunctioneventgrid/local.settings.json.jinja rename to xregistry/templates/cs/azfunctioneventgrid/local.settings.json.jinja diff --git a/ceregistry/templates/cs/azfunctioneventgrid/nuget.config.jinja b/xregistry/templates/cs/azfunctioneventgrid/nuget.config.jinja similarity index 100% rename from ceregistry/templates/cs/azfunctioneventgrid/nuget.config.jinja rename to xregistry/templates/cs/azfunctioneventgrid/nuget.config.jinja diff --git a/ceregistry/templates/cs/azfunctioneventgrid/{projectname}.csproj.jinja b/xregistry/templates/cs/azfunctioneventgrid/{projectname}.csproj.jinja similarity index 100% rename from ceregistry/templates/cs/azfunctioneventgrid/{projectname}.csproj.jinja rename to xregistry/templates/cs/azfunctioneventgrid/{projectname}.csproj.jinja diff --git a/ceregistry/templates/cs/azfunctioneventhubs/DispatchInterfaces.cs.jinja b/xregistry/templates/cs/azfunctioneventhubs/DispatchInterfaces.cs.jinja similarity index 100% rename from ceregistry/templates/cs/azfunctioneventhubs/DispatchInterfaces.cs.jinja rename to xregistry/templates/cs/azfunctioneventhubs/DispatchInterfaces.cs.jinja diff --git a/ceregistry/templates/cs/azfunctioneventhubs/EventDataCloudEventsExtensions.cs.jinja b/xregistry/templates/cs/azfunctioneventhubs/EventDataCloudEventsExtensions.cs.jinja similarity index 100% rename from ceregistry/templates/cs/azfunctioneventhubs/EventDataCloudEventsExtensions.cs.jinja rename to xregistry/templates/cs/azfunctioneventhubs/EventDataCloudEventsExtensions.cs.jinja diff --git a/ceregistry/templates/cs/azfunctioneventhubs/Function.cs.jinja b/xregistry/templates/cs/azfunctioneventhubs/Function.cs.jinja similarity index 100% rename from ceregistry/templates/cs/azfunctioneventhubs/Function.cs.jinja rename to xregistry/templates/cs/azfunctioneventhubs/Function.cs.jinja diff --git a/ceregistry/templates/cs/azfunctioneventhubs/_templateinfo.json b/xregistry/templates/cs/azfunctioneventhubs/_templateinfo.json similarity index 100% rename from ceregistry/templates/cs/azfunctioneventhubs/_templateinfo.json rename to xregistry/templates/cs/azfunctioneventhubs/_templateinfo.json diff --git a/ceregistry/templates/cs/azfunctioneventhubs/host.json.jinja b/xregistry/templates/cs/azfunctioneventhubs/host.json.jinja similarity index 100% rename from ceregistry/templates/cs/azfunctioneventhubs/host.json.jinja rename to xregistry/templates/cs/azfunctioneventhubs/host.json.jinja diff --git a/ceregistry/templates/cs/azfunctioneventhubs/local.settings.json.jinja b/xregistry/templates/cs/azfunctioneventhubs/local.settings.json.jinja similarity index 100% rename from ceregistry/templates/cs/azfunctioneventhubs/local.settings.json.jinja rename to xregistry/templates/cs/azfunctioneventhubs/local.settings.json.jinja diff --git a/ceregistry/templates/cs/azfunctioneventhubs/nuget.config.jinja b/xregistry/templates/cs/azfunctioneventhubs/nuget.config.jinja similarity index 100% rename from ceregistry/templates/cs/azfunctioneventhubs/nuget.config.jinja rename to xregistry/templates/cs/azfunctioneventhubs/nuget.config.jinja diff --git a/ceregistry/templates/cs/azfunctioneventhubs/{projectname}.csproj.jinja b/xregistry/templates/cs/azfunctioneventhubs/{projectname}.csproj.jinja similarity index 100% rename from ceregistry/templates/cs/azfunctioneventhubs/{projectname}.csproj.jinja rename to xregistry/templates/cs/azfunctioneventhubs/{projectname}.csproj.jinja diff --git a/ceregistry/templates/cs/azfunctionhttp/DispatchInterfaces.cs.jinja b/xregistry/templates/cs/azfunctionhttp/DispatchInterfaces.cs.jinja similarity index 100% rename from ceregistry/templates/cs/azfunctionhttp/DispatchInterfaces.cs.jinja rename to xregistry/templates/cs/azfunctionhttp/DispatchInterfaces.cs.jinja diff --git a/ceregistry/templates/cs/azfunctionhttp/Function.cs.jinja b/xregistry/templates/cs/azfunctionhttp/Function.cs.jinja similarity index 100% rename from ceregistry/templates/cs/azfunctionhttp/Function.cs.jinja rename to xregistry/templates/cs/azfunctionhttp/Function.cs.jinja diff --git a/ceregistry/templates/cs/azfunctionhttp/_templateinfo.json b/xregistry/templates/cs/azfunctionhttp/_templateinfo.json similarity index 100% rename from ceregistry/templates/cs/azfunctionhttp/_templateinfo.json rename to xregistry/templates/cs/azfunctionhttp/_templateinfo.json diff --git a/ceregistry/templates/cs/azfunctionhttp/host.json.jinja b/xregistry/templates/cs/azfunctionhttp/host.json.jinja similarity index 100% rename from ceregistry/templates/cs/azfunctionhttp/host.json.jinja rename to xregistry/templates/cs/azfunctionhttp/host.json.jinja diff --git a/ceregistry/templates/cs/azfunctionhttp/local.settings.json.jinja b/xregistry/templates/cs/azfunctionhttp/local.settings.json.jinja similarity index 100% rename from ceregistry/templates/cs/azfunctionhttp/local.settings.json.jinja rename to xregistry/templates/cs/azfunctionhttp/local.settings.json.jinja diff --git a/ceregistry/templates/cs/azfunctionhttp/nuget.config.jinja b/xregistry/templates/cs/azfunctionhttp/nuget.config.jinja similarity index 100% rename from ceregistry/templates/cs/azfunctionhttp/nuget.config.jinja rename to xregistry/templates/cs/azfunctionhttp/nuget.config.jinja diff --git a/ceregistry/templates/cs/azfunctionhttp/{projectname}.csproj.jinja b/xregistry/templates/cs/azfunctionhttp/{projectname}.csproj.jinja similarity index 100% rename from ceregistry/templates/cs/azfunctionhttp/{projectname}.csproj.jinja rename to xregistry/templates/cs/azfunctionhttp/{projectname}.csproj.jinja diff --git a/ceregistry/templates/cs/azfunctionservicebus/DispatchInterfaces.cs.jinja b/xregistry/templates/cs/azfunctionservicebus/DispatchInterfaces.cs.jinja similarity index 100% rename from ceregistry/templates/cs/azfunctionservicebus/DispatchInterfaces.cs.jinja rename to xregistry/templates/cs/azfunctionservicebus/DispatchInterfaces.cs.jinja diff --git a/ceregistry/templates/cs/azfunctionservicebus/Function.cs.jinja b/xregistry/templates/cs/azfunctionservicebus/Function.cs.jinja similarity index 100% rename from ceregistry/templates/cs/azfunctionservicebus/Function.cs.jinja rename to xregistry/templates/cs/azfunctionservicebus/Function.cs.jinja diff --git a/ceregistry/templates/cs/azfunctionservicebus/ServiceBusCloudEventsExtensions.cs.jinja b/xregistry/templates/cs/azfunctionservicebus/ServiceBusCloudEventsExtensions.cs.jinja similarity index 100% rename from ceregistry/templates/cs/azfunctionservicebus/ServiceBusCloudEventsExtensions.cs.jinja rename to xregistry/templates/cs/azfunctionservicebus/ServiceBusCloudEventsExtensions.cs.jinja diff --git a/ceregistry/templates/cs/azfunctionservicebus/_templateinfo.json b/xregistry/templates/cs/azfunctionservicebus/_templateinfo.json similarity index 100% rename from ceregistry/templates/cs/azfunctionservicebus/_templateinfo.json rename to xregistry/templates/cs/azfunctionservicebus/_templateinfo.json diff --git a/ceregistry/templates/cs/azfunctionservicebus/host.json.jinja b/xregistry/templates/cs/azfunctionservicebus/host.json.jinja similarity index 100% rename from ceregistry/templates/cs/azfunctionservicebus/host.json.jinja rename to xregistry/templates/cs/azfunctionservicebus/host.json.jinja diff --git a/ceregistry/templates/cs/azfunctionservicebus/local.settings.json.jinja b/xregistry/templates/cs/azfunctionservicebus/local.settings.json.jinja similarity index 100% rename from ceregistry/templates/cs/azfunctionservicebus/local.settings.json.jinja rename to xregistry/templates/cs/azfunctionservicebus/local.settings.json.jinja diff --git a/ceregistry/templates/cs/azfunctionservicebus/nuget.config.jinja b/xregistry/templates/cs/azfunctionservicebus/nuget.config.jinja similarity index 100% rename from ceregistry/templates/cs/azfunctionservicebus/nuget.config.jinja rename to xregistry/templates/cs/azfunctionservicebus/nuget.config.jinja diff --git a/ceregistry/templates/cs/azfunctionservicebus/{projectname}.csproj.jinja b/xregistry/templates/cs/azfunctionservicebus/{projectname}.csproj.jinja similarity index 100% rename from ceregistry/templates/cs/azfunctionservicebus/{projectname}.csproj.jinja rename to xregistry/templates/cs/azfunctionservicebus/{projectname}.csproj.jinja diff --git a/ceregistry/templates/cs/consumer/DispatchInterfaces.cs.jinja b/xregistry/templates/cs/consumer/DispatchInterfaces.cs.jinja similarity index 100% rename from ceregistry/templates/cs/consumer/DispatchInterfaces.cs.jinja rename to xregistry/templates/cs/consumer/DispatchInterfaces.cs.jinja diff --git a/ceregistry/templates/cs/consumer/EventConsumer.cs.jinja b/xregistry/templates/cs/consumer/EventConsumer.cs.jinja similarity index 100% rename from ceregistry/templates/cs/consumer/EventConsumer.cs.jinja rename to xregistry/templates/cs/consumer/EventConsumer.cs.jinja diff --git a/ceregistry/templates/cs/consumer/_templateinfo.json b/xregistry/templates/cs/consumer/_templateinfo.json similarity index 100% rename from ceregistry/templates/cs/consumer/_templateinfo.json rename to xregistry/templates/cs/consumer/_templateinfo.json diff --git a/ceregistry/templates/cs/consumer/nuget.config.jinja b/xregistry/templates/cs/consumer/nuget.config.jinja similarity index 100% rename from ceregistry/templates/cs/consumer/nuget.config.jinja rename to xregistry/templates/cs/consumer/nuget.config.jinja diff --git a/ceregistry/templates/cs/consumer/{projectname}.csproj.jinja b/xregistry/templates/cs/consumer/{projectname}.csproj.jinja similarity index 100% rename from ceregistry/templates/cs/consumer/{projectname}.csproj.jinja rename to xregistry/templates/cs/consumer/{projectname}.csproj.jinja diff --git a/ceregistry/templates/cs/producer/EventProducer.cs.jinja b/xregistry/templates/cs/producer/EventProducer.cs.jinja similarity index 100% rename from ceregistry/templates/cs/producer/EventProducer.cs.jinja rename to xregistry/templates/cs/producer/EventProducer.cs.jinja diff --git a/ceregistry/templates/cs/producer/_templateinfo.json b/xregistry/templates/cs/producer/_templateinfo.json similarity index 100% rename from ceregistry/templates/cs/producer/_templateinfo.json rename to xregistry/templates/cs/producer/_templateinfo.json diff --git a/ceregistry/templates/cs/producer/nuget.config.jinja b/xregistry/templates/cs/producer/nuget.config.jinja similarity index 100% rename from ceregistry/templates/cs/producer/nuget.config.jinja rename to xregistry/templates/cs/producer/nuget.config.jinja diff --git a/ceregistry/templates/cs/producer/{projectname}.csproj.jinja b/xregistry/templates/cs/producer/{projectname}.csproj.jinja similarity index 100% rename from ceregistry/templates/cs/producer/{projectname}.csproj.jinja rename to xregistry/templates/cs/producer/{projectname}.csproj.jinja diff --git a/ceregistry/templates/java/_common/amqp.jinja.include b/xregistry/templates/java/_common/amqp.jinja.include similarity index 100% rename from ceregistry/templates/java/_common/amqp.jinja.include rename to xregistry/templates/java/_common/amqp.jinja.include diff --git a/ceregistry/templates/java/_common/cloudevents.jinja.include b/xregistry/templates/java/_common/cloudevents.jinja.include similarity index 100% rename from ceregistry/templates/java/_common/cloudevents.jinja.include rename to xregistry/templates/java/_common/cloudevents.jinja.include diff --git a/ceregistry/templates/java/_common/mqtt.jinja.include b/xregistry/templates/java/_common/mqtt.jinja.include similarity index 100% rename from ceregistry/templates/java/_common/mqtt.jinja.include rename to xregistry/templates/java/_common/mqtt.jinja.include diff --git a/ceregistry/templates/java/_schemas/main/_json.{classdir}.java.jinja b/xregistry/templates/java/_schemas/main/_json.{classdir}.java.jinja similarity index 100% rename from ceregistry/templates/java/_schemas/main/_json.{classdir}.java.jinja rename to xregistry/templates/java/_schemas/main/_json.{classdir}.java.jinja diff --git a/ceregistry/templates/java/_schemas/main/avro/_avro.avsc.jinja b/xregistry/templates/java/_schemas/main/avro/_avro.avsc.jinja similarity index 100% rename from ceregistry/templates/java/_schemas/main/avro/_avro.avsc.jinja rename to xregistry/templates/java/_schemas/main/avro/_avro.avsc.jinja diff --git a/ceregistry/templates/java/_schemas/main/protobuf/_proto.proto.jinja b/xregistry/templates/java/_schemas/main/protobuf/_proto.proto.jinja similarity index 100% rename from ceregistry/templates/java/_schemas/main/protobuf/_proto.proto.jinja rename to xregistry/templates/java/_schemas/main/protobuf/_proto.proto.jinja diff --git a/ceregistry/templates/java/_templateinfo.json b/xregistry/templates/java/_templateinfo.json similarity index 100% rename from ceregistry/templates/java/_templateinfo.json rename to xregistry/templates/java/_templateinfo.json diff --git a/ceregistry/templates/java/consumer/_templateinfo.json b/xregistry/templates/java/consumer/_templateinfo.json similarity index 100% rename from ceregistry/templates/java/consumer/_templateinfo.json rename to xregistry/templates/java/consumer/_templateinfo.json diff --git a/ceregistry/templates/java/consumer/main/{classdir}DispatchInterfaces.java.jinja b/xregistry/templates/java/consumer/main/{classdir}DispatchInterfaces.java.jinja similarity index 100% rename from ceregistry/templates/java/consumer/main/{classdir}DispatchInterfaces.java.jinja rename to xregistry/templates/java/consumer/main/{classdir}DispatchInterfaces.java.jinja diff --git a/ceregistry/templates/java/consumer/main/{classdir}EventConsumer.java.jinja b/xregistry/templates/java/consumer/main/{classdir}EventConsumer.java.jinja similarity index 100% rename from ceregistry/templates/java/consumer/main/{classdir}EventConsumer.java.jinja rename to xregistry/templates/java/consumer/main/{classdir}EventConsumer.java.jinja diff --git a/ceregistry/templates/java/consumer/main/{projectdir}ExceptionMessages.java.jinja b/xregistry/templates/java/consumer/main/{projectdir}ExceptionMessages.java.jinja similarity index 100% rename from ceregistry/templates/java/consumer/main/{projectdir}ExceptionMessages.java.jinja rename to xregistry/templates/java/consumer/main/{projectdir}ExceptionMessages.java.jinja diff --git a/ceregistry/templates/java/consumer/main/{projectdir}RegexPatterns.java.jinja b/xregistry/templates/java/consumer/main/{projectdir}RegexPatterns.java.jinja similarity index 100% rename from ceregistry/templates/java/consumer/main/{projectdir}RegexPatterns.java.jinja rename to xregistry/templates/java/consumer/main/{projectdir}RegexPatterns.java.jinja diff --git a/ceregistry/templates/java/consumer/pom.xml.jinja b/xregistry/templates/java/consumer/pom.xml.jinja similarity index 100% rename from ceregistry/templates/java/consumer/pom.xml.jinja rename to xregistry/templates/java/consumer/pom.xml.jinja diff --git a/ceregistry/templates/java/producer/_templateinfo.json b/xregistry/templates/java/producer/_templateinfo.json similarity index 100% rename from ceregistry/templates/java/producer/_templateinfo.json rename to xregistry/templates/java/producer/_templateinfo.json diff --git a/ceregistry/templates/java/producer/main/{classdir}EventProducer.java.jinja b/xregistry/templates/java/producer/main/{classdir}EventProducer.java.jinja similarity index 100% rename from ceregistry/templates/java/producer/main/{classdir}EventProducer.java.jinja rename to xregistry/templates/java/producer/main/{classdir}EventProducer.java.jinja diff --git a/ceregistry/templates/java/producer/main/{projectdir}ExceptionMessages.java.jinja b/xregistry/templates/java/producer/main/{projectdir}ExceptionMessages.java.jinja similarity index 100% rename from ceregistry/templates/java/producer/main/{projectdir}ExceptionMessages.java.jinja rename to xregistry/templates/java/producer/main/{projectdir}ExceptionMessages.java.jinja diff --git a/ceregistry/templates/java/producer/main/{projectdir}RegexPatterns.java.jinja b/xregistry/templates/java/producer/main/{projectdir}RegexPatterns.java.jinja similarity index 100% rename from ceregistry/templates/java/producer/main/{projectdir}RegexPatterns.java.jinja rename to xregistry/templates/java/producer/main/{projectdir}RegexPatterns.java.jinja diff --git a/ceregistry/templates/java/producer/pom.xml.jinja b/xregistry/templates/java/producer/pom.xml.jinja similarity index 100% rename from ceregistry/templates/java/producer/pom.xml.jinja rename to xregistry/templates/java/producer/pom.xml.jinja diff --git a/ceregistry/templates/openapi/_templateinfo.json b/xregistry/templates/openapi/_templateinfo.json similarity index 100% rename from ceregistry/templates/openapi/_templateinfo.json rename to xregistry/templates/openapi/_templateinfo.json diff --git a/ceregistry/templates/openapi/producer/_templateinfo.json b/xregistry/templates/openapi/producer/_templateinfo.json similarity index 100% rename from ceregistry/templates/openapi/producer/_templateinfo.json rename to xregistry/templates/openapi/producer/_templateinfo.json diff --git a/ceregistry/templates/openapi/producer/{projectname}.yml.jinja b/xregistry/templates/openapi/producer/{projectname}.yml.jinja similarity index 100% rename from ceregistry/templates/openapi/producer/{projectname}.yml.jinja rename to xregistry/templates/openapi/producer/{projectname}.yml.jinja diff --git a/ceregistry/templates/openapi/subscriber/_templateinfo.json b/xregistry/templates/openapi/subscriber/_templateinfo.json similarity index 100% rename from ceregistry/templates/openapi/subscriber/_templateinfo.json rename to xregistry/templates/openapi/subscriber/_templateinfo.json diff --git a/ceregistry/templates/openapi/subscriber/{projectname}.yml.jinja b/xregistry/templates/openapi/subscriber/{projectname}.yml.jinja similarity index 100% rename from ceregistry/templates/openapi/subscriber/{projectname}.yml.jinja rename to xregistry/templates/openapi/subscriber/{projectname}.yml.jinja diff --git a/ceregistry/templates/py/_schemas/_json.py.jinja b/xregistry/templates/py/_schemas/_json.py.jinja similarity index 100% rename from ceregistry/templates/py/_schemas/_json.py.jinja rename to xregistry/templates/py/_schemas/_json.py.jinja diff --git a/ceregistry/templates/py/_templateinfo.json b/xregistry/templates/py/_templateinfo.json similarity index 100% rename from ceregistry/templates/py/_templateinfo.json rename to xregistry/templates/py/_templateinfo.json diff --git a/ceregistry/templates/py/producer/producer_client.py.jinja b/xregistry/templates/py/producer/producer_client.py.jinja similarity index 100% rename from ceregistry/templates/py/producer/producer_client.py.jinja rename to xregistry/templates/py/producer/producer_client.py.jinja diff --git a/ceregistry/templates/ts/_common/.eslintrc.jinja.include b/xregistry/templates/ts/_common/.eslintrc.jinja.include similarity index 100% rename from ceregistry/templates/ts/_common/.eslintrc.jinja.include rename to xregistry/templates/ts/_common/.eslintrc.jinja.include diff --git a/ceregistry/templates/ts/_common/.gitignore.jinja.include b/xregistry/templates/ts/_common/.gitignore.jinja.include similarity index 100% rename from ceregistry/templates/ts/_common/.gitignore.jinja.include rename to xregistry/templates/ts/_common/.gitignore.jinja.include diff --git a/ceregistry/templates/ts/_common/cloudevents.jinja.include b/xregistry/templates/ts/_common/cloudevents.jinja.include similarity index 100% rename from ceregistry/templates/ts/_common/cloudevents.jinja.include rename to xregistry/templates/ts/_common/cloudevents.jinja.include diff --git a/ceregistry/templates/ts/_common/package.json.jinja.include b/xregistry/templates/ts/_common/package.json.jinja.include similarity index 100% rename from ceregistry/templates/ts/_common/package.json.jinja.include rename to xregistry/templates/ts/_common/package.json.jinja.include diff --git a/ceregistry/templates/ts/_common/tsconfig.browser.json.jinja.include b/xregistry/templates/ts/_common/tsconfig.browser.json.jinja.include similarity index 100% rename from ceregistry/templates/ts/_common/tsconfig.browser.json.jinja.include rename to xregistry/templates/ts/_common/tsconfig.browser.json.jinja.include diff --git a/ceregistry/templates/ts/_common/tsconfig.json.jinja.include b/xregistry/templates/ts/_common/tsconfig.json.jinja.include similarity index 100% rename from ceregistry/templates/ts/_common/tsconfig.json.jinja.include rename to xregistry/templates/ts/_common/tsconfig.json.jinja.include diff --git a/ceregistry/templates/ts/_common/webpack.config.js.jinja.include b/xregistry/templates/ts/_common/webpack.config.js.jinja.include similarity index 100% rename from ceregistry/templates/ts/_common/webpack.config.js.jinja.include rename to xregistry/templates/ts/_common/webpack.config.js.jinja.include diff --git a/ceregistry/templates/ts/_schemas/src/schema/_json.json.jinja b/xregistry/templates/ts/_schemas/src/schema/_json.json.jinja similarity index 100% rename from ceregistry/templates/ts/_schemas/src/schema/_json.json.jinja rename to xregistry/templates/ts/_schemas/src/schema/_json.json.jinja diff --git a/ceregistry/templates/ts/_schemas/src/types/_json.ts.jinja b/xregistry/templates/ts/_schemas/src/types/_json.ts.jinja similarity index 100% rename from ceregistry/templates/ts/_schemas/src/types/_json.ts.jinja rename to xregistry/templates/ts/_schemas/src/types/_json.ts.jinja diff --git a/ceregistry/templates/ts/_templateinfo.json b/xregistry/templates/ts/_templateinfo.json similarity index 100% rename from ceregistry/templates/ts/_templateinfo.json rename to xregistry/templates/ts/_templateinfo.json diff --git a/ceregistry/templates/ts/producerhttp/.gitignore.jinja b/xregistry/templates/ts/producerhttp/.gitignore.jinja similarity index 100% rename from ceregistry/templates/ts/producerhttp/.gitignore.jinja rename to xregistry/templates/ts/producerhttp/.gitignore.jinja diff --git a/ceregistry/templates/ts/producerhttp/_templateinfo.json b/xregistry/templates/ts/producerhttp/_templateinfo.json similarity index 100% rename from ceregistry/templates/ts/producerhttp/_templateinfo.json rename to xregistry/templates/ts/producerhttp/_templateinfo.json diff --git a/ceregistry/templates/ts/producerhttp/eslintrc.jinja b/xregistry/templates/ts/producerhttp/eslintrc.jinja similarity index 100% rename from ceregistry/templates/ts/producerhttp/eslintrc.jinja rename to xregistry/templates/ts/producerhttp/eslintrc.jinja diff --git a/ceregistry/templates/ts/producerhttp/package.json.jinja b/xregistry/templates/ts/producerhttp/package.json.jinja similarity index 100% rename from ceregistry/templates/ts/producerhttp/package.json.jinja rename to xregistry/templates/ts/producerhttp/package.json.jinja diff --git a/ceregistry/templates/ts/producerhttp/src/index.ts.jinja b/xregistry/templates/ts/producerhttp/src/index.ts.jinja similarity index 100% rename from ceregistry/templates/ts/producerhttp/src/index.ts.jinja rename to xregistry/templates/ts/producerhttp/src/index.ts.jinja diff --git a/ceregistry/templates/ts/producerhttp/src/producer.ts.jinja b/xregistry/templates/ts/producerhttp/src/producer.ts.jinja similarity index 100% rename from ceregistry/templates/ts/producerhttp/src/producer.ts.jinja rename to xregistry/templates/ts/producerhttp/src/producer.ts.jinja diff --git a/ceregistry/templates/ts/producerhttp/src/schema/formats.js.jinja b/xregistry/templates/ts/producerhttp/src/schema/formats.js.jinja similarity index 100% rename from ceregistry/templates/ts/producerhttp/src/schema/formats.js.jinja rename to xregistry/templates/ts/producerhttp/src/schema/formats.js.jinja diff --git a/ceregistry/templates/ts/producerhttp/src/types/_index.ts.jinja b/xregistry/templates/ts/producerhttp/src/types/_index.ts.jinja similarity index 100% rename from ceregistry/templates/ts/producerhttp/src/types/_index.ts.jinja rename to xregistry/templates/ts/producerhttp/src/types/_index.ts.jinja diff --git a/ceregistry/templates/ts/producerhttp/tsconfig.browser.json.jinja b/xregistry/templates/ts/producerhttp/tsconfig.browser.json.jinja similarity index 100% rename from ceregistry/templates/ts/producerhttp/tsconfig.browser.json.jinja rename to xregistry/templates/ts/producerhttp/tsconfig.browser.json.jinja diff --git a/ceregistry/templates/ts/producerhttp/tsconfig.json.jinja b/xregistry/templates/ts/producerhttp/tsconfig.json.jinja similarity index 100% rename from ceregistry/templates/ts/producerhttp/tsconfig.json.jinja rename to xregistry/templates/ts/producerhttp/tsconfig.json.jinja diff --git a/ceregistry/templates/ts/producerhttp/webpack.config.js.jinja b/xregistry/templates/ts/producerhttp/webpack.config.js.jinja similarity index 100% rename from ceregistry/templates/ts/producerhttp/webpack.config.js.jinja rename to xregistry/templates/ts/producerhttp/webpack.config.js.jinja diff --git a/ceregistry_vscode/.gitignore b/xregistry_vscode/.gitignore similarity index 100% rename from ceregistry_vscode/.gitignore rename to xregistry_vscode/.gitignore diff --git a/ceregistry_vscode/.vscodeignore b/xregistry_vscode/.vscodeignore similarity index 100% rename from ceregistry_vscode/.vscodeignore rename to xregistry_vscode/.vscodeignore diff --git a/ceregistry_vscode/LICENSE.txt b/xregistry_vscode/LICENSE.txt similarity index 100% rename from ceregistry_vscode/LICENSE.txt rename to xregistry_vscode/LICENSE.txt diff --git a/ceregistry_vscode/README.md b/xregistry_vscode/README.md similarity index 100% rename from ceregistry_vscode/README.md rename to xregistry_vscode/README.md diff --git a/ceregistry_vscode/cloudevents-icon-color.png b/xregistry_vscode/cloudevents-icon-color.png similarity index 100% rename from ceregistry_vscode/cloudevents-icon-color.png rename to xregistry_vscode/cloudevents-icon-color.png diff --git a/ceregistry_vscode/esbuild.js b/xregistry_vscode/esbuild.js similarity index 97% rename from ceregistry_vscode/esbuild.js rename to xregistry_vscode/esbuild.js index ec49bcc..3f78e4f 100644 --- a/ceregistry_vscode/esbuild.js +++ b/xregistry_vscode/esbuild.js @@ -22,7 +22,7 @@ const extensionConfig = { copy({ resolveFrom: "cwd", assets: { - from: ["../ceregistry/schemas/*.json"], + from: ["../xregistry/schemas/*.json"], to: ["./schemas"], }, }) diff --git a/ceregistry_vscode/package-lock.json b/xregistry_vscode/package-lock.json similarity index 99% rename from ceregistry_vscode/package-lock.json rename to xregistry_vscode/package-lock.json index 7a8bc46..8a0f6d4 100644 --- a/ceregistry_vscode/package-lock.json +++ b/xregistry_vscode/package-lock.json @@ -1,11 +1,11 @@ { - "name": "ceregistry", + "name": "xregistry", "version": "0.0.2", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "ceregistry", + "name": "xregistry", "version": "0.0.2", "license": "SEE LICENSE IN LICENSE.txt", "dependencies": { diff --git a/ceregistry_vscode/package.json b/xregistry_vscode/package.json similarity index 90% rename from ceregistry_vscode/package.json rename to xregistry_vscode/package.json index 78da698..cadcdf6 100644 --- a/ceregistry_vscode/package.json +++ b/xregistry_vscode/package.json @@ -1,5 +1,5 @@ { - "name": "ceregistry-vscode", + "name": "xregistry-vscode", "version": "0.0.2", "displayName": "CloudEvents Registry Tool", "description": "A GUI wrapper for the CloudEvents Registry CLI", @@ -12,7 +12,7 @@ }, "repository": { "type": "git", - "url": "https://github.com/clemensv/cedisco-codegen/ceregistry_vscode" + "url": "https://github.com/clemensv/cedisco-codegen/xregistry_vscode" }, "engines": { "vscode": "^1.74.0" @@ -21,7 +21,7 @@ "Other" ], "activationEvents": [ - "onCommand:ceregistry.generate" + "onCommand:xregistry.generate" ], "main": "./out/extension.js", "json.schemas": [ @@ -35,7 +35,7 @@ "contributes": { "commands": [ { - "command": "ceregistry.ui", + "command": "xregistry.ui", "title": "CloudEvents Registry Tool" } ], @@ -59,7 +59,7 @@ "explorer/context": [ { "label": "CloudEvents Registry Tool", - "command": "ceregistry.ui", + "command": "xregistry.ui", "definitiongroup": "CloudEvents@1", "when": "resourceExtname == .cereg || resourceExtname == .yaml.cereg" } diff --git a/ceregistry_vscode/package.sh b/xregistry_vscode/package.sh similarity index 100% rename from ceregistry_vscode/package.sh rename to xregistry_vscode/package.sh diff --git a/ceregistry_vscode/src/extension.ts b/xregistry_vscode/src/extension.ts similarity index 90% rename from ceregistry_vscode/src/extension.ts rename to xregistry_vscode/src/extension.ts index b49c6e7..a6d2a49 100644 --- a/ceregistry_vscode/src/extension.ts +++ b/xregistry_vscode/src/extension.ts @@ -13,7 +13,7 @@ export function activate(context: vscode.ExtensionContext) { try { // call the CLI tool with the list --format=json option and see if it works // take the stdout and parse it as JSON - let output = child_process.execSync('ceregistry list --format=json', { encoding: 'utf8' }); + let output = child_process.execSync('xregistry list --format=json', { encoding: 'utf8' }); langsStyles = JSON.parse(output); } catch (err) { toolInstalled = false; @@ -21,9 +21,9 @@ export function activate(context: vscode.ExtensionContext) { if (!toolInstalled) { let callback = async () => { - vscode.window.showInformationMessage(`The "ceregistry CLI tool" is not installed. Please install it and then reload the window.`); + vscode.window.showInformationMessage(`The "xregistry CLI tool" is not installed. Please install it and then reload the window.`); } - let disposable = vscode.commands.registerCommand('ceregistry.ui', callback); + let disposable = vscode.commands.registerCommand('xregistry.ui', callback); context.subscriptions.push(disposable); return; } @@ -38,7 +38,7 @@ export function activate(context: vscode.ExtensionContext) { } } - let disposable = vscode.commands.registerCommand('ceregistry.ui', async (filePath) => { + let disposable = vscode.commands.registerCommand('xregistry.ui', async (filePath) => { let definitionsFile = filePath ? filePath.fsPath : ""; if (!filePath) { diff --git a/ceregistry_vscode/src/panels/CodeGeneratorWizardPanel.ts b/xregistry_vscode/src/panels/CodeGeneratorWizardPanel.ts similarity index 96% rename from ceregistry_vscode/src/panels/CodeGeneratorWizardPanel.ts rename to xregistry_vscode/src/panels/CodeGeneratorWizardPanel.ts index 92b07dc..1a7c2b9 100644 --- a/ceregistry_vscode/src/panels/CodeGeneratorWizardPanel.ts +++ b/xregistry_vscode/src/panels/CodeGeneratorWizardPanel.ts @@ -151,7 +151,7 @@ export class CodeGeneratorWizardPanel { }).then((fileUri) => { if (fileUri && fileUri.length > 0) { try { - child_process.execSync(`ceregistry validate --definitions "${fileUri[0].fsPath}"`); + child_process.execSync(`xregistry validate --definitions "${fileUri[0].fsPath}"`); } catch (error: Error | any) { vscode.window.showErrorMessage("Invalid or malformed definitions file"); return; @@ -212,7 +212,7 @@ export class CodeGeneratorWizardPanel { private callCodeGenerator(output: any, projectName: any, style: any, language: any, definitions: any) { try { - child_process.execSync(`ceregistry generate --output "${output}" --projectname "${projectName}" --style "${style}" --language "${language}" --definitions "${definitions}"`); + child_process.execSync(`xregistry generate --output "${output}" --projectname "${projectName}" --style "${style}" --language "${language}" --definitions "${definitions}"`); vscode.window.showInformationMessage("Code generation completed.", "Open Folder") .then(selection => { if (selection === "Open Folder") { @@ -254,7 +254,7 @@ export class CodeGeneratorWizardPanel {

CloudEvents Discovery Tool

-

This wizard helps you validate specifications or creating code for producing or consuming CloudEvents with the CloudEvents SDK. The wizard wraps the "ceregistry" tool that uses CloudEvents Discovery registry endpoints or documents as input. The code generator always (re-)creates full projects (assemblies, modules, packages, depending on the nomenclature of the chosen language) that you can easily integrate into your own code-bases.

+

This wizard helps you validate specifications or creating code for producing or consuming CloudEvents with the CloudEvents SDK. The wizard wraps the "xregistry" tool that uses CloudEvents Discovery registry endpoints or documents as input. The code generator always (re-)creates full projects (assemblies, modules, packages, depending on the nomenclature of the chosen language) that you can easily integrate into your own code-bases.

diff --git a/ceregistry_vscode/src/utilities/getNonce.ts b/xregistry_vscode/src/utilities/getNonce.ts similarity index 100% rename from ceregistry_vscode/src/utilities/getNonce.ts rename to xregistry_vscode/src/utilities/getNonce.ts diff --git a/ceregistry_vscode/src/utilities/getUri.ts b/xregistry_vscode/src/utilities/getUri.ts similarity index 100% rename from ceregistry_vscode/src/utilities/getUri.ts rename to xregistry_vscode/src/utilities/getUri.ts diff --git a/ceregistry_vscode/src/webview/codicon.css b/xregistry_vscode/src/webview/codicon.css similarity index 100% rename from ceregistry_vscode/src/webview/codicon.css rename to xregistry_vscode/src/webview/codicon.css diff --git a/ceregistry_vscode/src/webview/codicon.ttf b/xregistry_vscode/src/webview/codicon.ttf similarity index 100% rename from ceregistry_vscode/src/webview/codicon.ttf rename to xregistry_vscode/src/webview/codicon.ttf diff --git a/ceregistry_vscode/src/webview/main.ts b/xregistry_vscode/src/webview/main.ts similarity index 100% rename from ceregistry_vscode/src/webview/main.ts rename to xregistry_vscode/src/webview/main.ts diff --git a/ceregistry_vscode/src/webview/style.css b/xregistry_vscode/src/webview/style.css similarity index 100% rename from ceregistry_vscode/src/webview/style.css rename to xregistry_vscode/src/webview/style.css diff --git a/ceregistry_vscode/themes/file-icons.json b/xregistry_vscode/themes/file-icons.json similarity index 100% rename from ceregistry_vscode/themes/file-icons.json rename to xregistry_vscode/themes/file-icons.json diff --git a/ceregistry_vscode/themes/icons/cloudevents-icon-black.svg b/xregistry_vscode/themes/icons/cloudevents-icon-black.svg similarity index 100% rename from ceregistry_vscode/themes/icons/cloudevents-icon-black.svg rename to xregistry_vscode/themes/icons/cloudevents-icon-black.svg diff --git a/ceregistry_vscode/themes/icons/cloudevents-icon-color-reversed.svg b/xregistry_vscode/themes/icons/cloudevents-icon-color-reversed.svg similarity index 100% rename from ceregistry_vscode/themes/icons/cloudevents-icon-color-reversed.svg rename to xregistry_vscode/themes/icons/cloudevents-icon-color-reversed.svg diff --git a/ceregistry_vscode/themes/icons/cloudevents-icon-color.svg b/xregistry_vscode/themes/icons/cloudevents-icon-color.svg similarity index 100% rename from ceregistry_vscode/themes/icons/cloudevents-icon-color.svg rename to xregistry_vscode/themes/icons/cloudevents-icon-color.svg diff --git a/ceregistry_vscode/themes/icons/cloudevents-icon-white.svg b/xregistry_vscode/themes/icons/cloudevents-icon-white.svg similarity index 100% rename from ceregistry_vscode/themes/icons/cloudevents-icon-white.svg rename to xregistry_vscode/themes/icons/cloudevents-icon-white.svg diff --git a/ceregistry_vscode/tsconfig.json b/xregistry_vscode/tsconfig.json similarity index 100% rename from ceregistry_vscode/tsconfig.json rename to xregistry_vscode/tsconfig.json