From 3dcfe5002f8a849bd1aeb07a5bc1937f09ccfc6d Mon Sep 17 00:00:00 2001 From: Animesh Kumar Date: Fri, 5 Jul 2024 15:43:05 +0530 Subject: [PATCH] chore: remove non-essential files --- .../Components Object-json-format.json | 787 ------------------ .../Message Object-json-format.json | 730 ---------------- .../embedded-examples-error-report.md | 125 --- 3 files changed, 1642 deletions(-) delete mode 100644 scripts/validation/embed-logs/Components Object-json-format.json delete mode 100644 scripts/validation/embed-logs/Message Object-json-format.json delete mode 100644 scripts/validation/embedded-examples-error-report.md diff --git a/scripts/validation/embed-logs/Components Object-json-format.json b/scripts/validation/embed-logs/Components Object-json-format.json deleted file mode 100644 index 44bacb7e..00000000 --- a/scripts/validation/embed-logs/Components Object-json-format.json +++ /dev/null @@ -1,787 +0,0 @@ -{ - "asyncapi": "3.0.0", - "info": { - "title": "AsyncAPI", - "version": "1.x.x", - "description": "This is a very good base doc, probably.", - "termsOfService": "https://asyncapi.org/terms/", - "license": { - "name": "Apache 2.0", - "url": "https://www.apache.org/licenses/LICENSE-2.0.html" - }, - "externalDocs": { - "description": "Find more info here", - "url": "https://www.asyncapi.org" - }, - "tags": [ - { - "name": "e-commerce" - } - ] - }, - "servers": { - "production": { - "host": "rabbitmq.in.mycompany.com:5672", - "pathname": "/v1", - "protocol": "amqp", - "protocolVersion": "1.0", - "description": "Production RabbitMQ broker (uses the `production` vhost).", - "title": "Production Server", - "summary": "Production environment server", - "security": [ - { - "type": "http", - "scheme": "bearer" - } - ], - "tags": [ - { - "name": "production", - "description": "Production environment" - } - ], - "externalDocs": { - "description": "Additional documentation for the production server", - "url": "https://example.com/docs/production" - }, - "bindings": { - "amqp": { - "exchange": "my-exchange", - "queue": "my-queue" - } - } - }, - "staging": { - "host": "rabbitmq.in.mycompany.com:5672", - "pathname": "/v1", - "protocol": "amqp", - "protocolVersion": "1.0", - "description": "Staging RabbitMQ broker (uses the `staging` vhost).", - "title": "Staging Server", - "summary": "Staging environment server", - "security": [ - { - "type": "apiKey", - "in": "user", - "description": "Provide your API key as the user and leave the password empty." - } - ], - "tags": [ - { - "name": "staging", - "description": "Staging environment" - } - ], - "externalDocs": { - "description": "Additional documentation for the staging server", - "url": "https://example.com/docs/staging" - }, - "bindings": { - "amqp": { - "exchange": "my-exchange", - "queue": "my-queue" - } - } - }, - "rabbitmqInProd": { - "host": "{prod}.in.mycompany.com", - "protocol": "amqp", - "description": "Production server" - }, - "rabbitmqInStaging": { - "host": "{stage}.in.mycompany.com", - "protocol": "amqp", - "description": "Staging server" - } - }, - "channels": { - "user": { - "address": "users.{userId}", - "title": "Users channel", - "description": "This channel is used to exchange messages about user events.", - "messages": { - "userSignedUp": { - "$ref": "#/components/messages/userSignedUp" - }, - "userCompletedOrder": { - "$ref": "#/components/messages/userCompletedOrder" - } - }, - "parameters": { - "userId": { - "$ref": "#/components/parameters/userId" - } - }, - "servers": [ - { - "$ref": "#/servers/production" - } - ], - "bindings": { - "amqp": { - "is": "queue", - "queue": { - "exclusive": true - } - } - }, - "tags": [ - { - "name": "user", - "description": "User-related messages" - } - ], - "externalDocs": { - "description": "Find more info here", - "url": "https://example.com" - } - }, - "userSignup": { - "address": "users.signup", - "description": "Channel for user signups", - "messages": { - "userSignedUp": { - "$ref": "#/components/messages/userSignedUp" - } - } - }, - "userSignupReply": { - "address": "users.signup.reply", - "description": "Channel for user signup replies", - "messages": { - "userSignedUpReply": { - "summary": "User signup reply message", - "payload": { - "type": "object", - "properties": { - "status": { - "type": "string", - "description": "Status of the signup process" - }, - "message": { - "type": "string", - "description": "Additional information" - } - } - } - } - } - } - }, - "operations": { - "sendUserSignUp": { - "action": "send", - "title": "User sign up", - "summary": "Action to sign a user up.", - "description": "A longer description", - "channel": { - "$ref": "#/channels/user" - }, - "security": [ - { - "type": "oauth2", - "description": "The oauth security descriptions", - "flows": { - "clientCredentials": { - "tokenUrl": "https://example.com/api/oauth/dialog", - "availableScopes": { - "subscribe:auth_revocations": "Scope required for authorization revocation topic" - } - } - }, - "scopes": [ - "subscribe:auth_revocations" - ] - } - ], - "tags": [ - { - "name": "user" - }, - { - "name": "signup" - }, - { - "name": "register" - } - ], - "bindings": { - "amqp": { - "ack": false - } - }, - "messages": [ - { - "$ref": "#/channels/user/messages/userSignedUp" - } - ], - "reply": { - "address": { - "location": "$message.header#/replyTo" - }, - "channel": { - "$ref": "#/channels/userSignupReply" - }, - "messages": [ - { - "$ref": "#/channels/userSignupReply/messages/userSignedUpReply" - } - ] - }, - "traits": [] - } - }, - "components": { - "schemas": { - "Category": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int64" - }, - "name": { - "type": "string" - } - } - }, - "AvroExample": { - "schemaFormat": "application/vnd.apache.avro+json;version=1.9.0", - "schema": { - "type": "record", - "name": "UserCreate", - "namespace": "com.example", - "fields": [ - { - "name": "id", - "type": "int" - }, - { - "name": "name", - "type": "string" - } - ], - "$ref": "path/to/user-create.avsc#/UserCreate" - } - }, - "userCreate": { - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "The ID of the user" - }, - "name": { - "type": "string", - "description": "The name of the user" - }, - "email": { - "type": "string", - "format": "email", - "description": "The email of the user" - } - }, - "required": [ - "id", - "name", - "email" - ] - }, - "signup": { - "type": "object", - "properties": { - "timestamp": { - "type": "string", - "format": "date-time", - "description": "The timestamp of the signup" - }, - "source": { - "type": "string", - "description": "The source of the signup" - } - }, - "required": [ - "timestamp", - "source" - ] - }, - "ComplexModel": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int64" - }, - "name": { - "type": "string" - } - } - }, - "Address": { - "type": "object", - "properties": { - "street": { - "type": "string" - }, - "city": { - "type": "string" - }, - "state": { - "type": "string" - }, - "zip": { - "type": "string" - } - } - }, - "ErrorModel": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32" - }, - "message": { - "type": "string" - } - } - }, - "Pet": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int64" - }, - "name": { - "type": "string" - }, - "tag": { - "type": "string" - } - } - }, - "Tag": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int64" - }, - "name": { - "type": "string" - } - } - } - }, - "servers": { - "development": { - "host": "{stage}.in.mycompany.com:{port}", - "protocol": "amqp", - "description": "RabbitMQ broker", - "bindings": { - "$ref": "#/components/serverBindings/devAmqp" - }, - "variables": { - "stage": { - "$ref": "#/components/serverVariables/stage" - }, - "port": { - "$ref": "#/components/serverVariables/port" - } - }, - "security": [ - { - "$ref": "#/components/securitySchemes/oauth" - } - ], - "protocolVersion": "0-9-1" - } - }, - "serverVariables": { - "stage": { - "default": "demo", - "description": "This value is assigned by the service provider, in this example `mycompany.com`" - }, - "port": { - "enum": [ - "5671", - "5672" - ], - "default": "5672" - } - }, - "channels": { - "user": { - "address": "users.{userId}", - "title": "Users channel", - "description": "This channel is used to exchange messages about user events.", - "messages": { - "userSignedUp": { - "$ref": "#/components/messages/userSignUp" - } - }, - "parameters": { - "userId": { - "$ref": "#/components/parameters/userId" - } - }, - "servers": [ - { - "$ref": "#/components/servers/development" - } - ], - "bindings": { - "$ref": "#/components/channelBindings/user" - }, - "tags": [ - { - "$ref": "#/components/tags/user" - } - ], - "externalDocs": { - "$ref": "#/components/externalDocs/infoDocs" - } - }, - "user/signedup": { - "subscribe": { - "message": { - "$ref": "#/components/messages/userSignUp" - } - } - } - }, - "messages": { - "userSignUp": { - "summary": "Action to sign a user up.", - "traits": [ - { - "$ref": "#/components/messageTraits/commonHeaders" - } - ], - "payload": { - "$ref": "#/components/schemas/Category", - "type": "object", - "properties": { - "user": { - "$ref": "#/components/schemas/userCreate" - }, - "signup": { - "$ref": "#/components/schemas/signup" - } - } - }, - "correlationId": { - "$ref": "#/components/correlationIds/default" - }, - "bindings": { - "$ref": "#/components/messageBindings/user" - }, - "examples": [], - "description": "Multiline description of what this action does.\nHere you have another line.\n", - "tags": [ - { - "name": "user" - }, - { - "name": "signup" - } - ], - "headers": { - "type": "object", - "properties": { - "applicationInstanceId": { - "description": "Unique identifier for a given instance of the publishing application", - "type": "string" - } - } - } - }, - "userSignedUp": { - "name": "UserSignup", - "title": "User signup", - "summary": "Action to sign a user up.", - "description": "A longer description", - "contentType": "application/json", - "tags": [ - { - "name": "user" - }, - { - "name": "signup" - }, - { - "name": "register" - } - ], - "headers": { - "type": "object", - "properties": { - "correlationId": { - "description": "Correlation ID set by application", - "type": "string" - }, - "applicationInstanceId": { - "description": "Unique identifier for a given instance of the publishing application", - "type": "string" - } - } - }, - "payload": { - "type": "object", - "properties": { - "user": { - "$ref": "#/components/schemas/userCreate" - }, - "signup": { - "$ref": "#/components/schemas/signup" - } - } - }, - "correlationId": { - "description": "Default Correlation ID", - "location": "$message.header#/correlationId" - }, - "traits": [ - { - "$ref": "#/components/messageTraits/commonHeaders" - } - ], - "examples": [ - { - "name": "SimpleSignup", - "summary": "A simple UserSignup example message", - "headers": { - "correlationId": "my-correlation-id", - "applicationInstanceId": "myInstanceId" - }, - "payload": { - "user": { - "someUserKey": "someUserValue" - }, - "signup": { - "someSignupKey": "someSignupValue" - } - } - } - ] - }, - "userSignedUpReply": { - "name": "UserSignupReply", - "title": "User signup reply", - "summary": "User signup reply message", - "contentType": "application/json", - "payload": { - "type": "object", - "properties": { - "status": { - "type": "string", - "description": "Status of the signup process" - }, - "message": { - "type": "string", - "description": "Additional information" - } - } - } - }, - "userCompletedOrder": { - "summary": "User completed order event", - "contentType": "application/json", - "payload": { - "type": "object", - "properties": { - "orderId": { - "type": "string", - "description": "The ID of the order" - }, - "userId": { - "type": "string", - "description": "The ID of the user" - }, - "amount": { - "type": "number", - "description": "The total amount of the order" - } - } - } - } - }, - "parameters": { - "userId": { - "description": "Id of the user." - } - }, - "correlationIds": { - "default": { - "description": "Default Correlation ID", - "location": "$message.header#/correlationId" - } - }, - "operations": { - "sendUserSignUp": { - "action": "send", - "title": "User sign up", - "channel": { - "$ref": "#/channels/user" - }, - "bindings": { - "$ref": "#/components/operationBindings/sendUser" - }, - "traits": [ - { - "$ref": "#/components/operationTraits/binding" - } - ], - "reply": { - "$ref": "#/components/replies/signupReply" - } - } - }, - "replies": { - "signupReply": { - "address": { - "$ref": "#/components/replyAddresses/signupReply" - }, - "channel": { - "$ref": "#/channels/userSignupReply" - } - } - }, - "replyAddresses": { - "signupReply": { - "location": "$message.header#/replyTo" - } - }, - "securitySchemes": { - "userPasswordAuth": { - "type": "userPassword", - "description": "User password security scheme" - }, - "apiKeyAuth": { - "type": "apiKey", - "description": "API key security scheme", - "in": "user" - }, - "X509Auth": { - "type": "X509", - "description": "X509 security scheme" - }, - "symmetricEncryptionAuth": { - "type": "symmetricEncryption", - "description": "Symmetric encryption security scheme" - }, - "basicAuth": { - "type": "http", - "description": "Basic security scheme", - "scheme": "basic" - }, - "httpApiAuth": { - "type": "httpApiKey", - "name": "API Key Sample", - "description": "api_key", - "in": "header" - }, - "JWTAuth": { - "type": "http", - "scheme": "bearer", - "bearerFormat": "JWT" - }, - "saslAuth": { - "type": "scramSha256", - "description": "SASL security scheme" - }, - "oauth": { - "type": "oauth2", - "description": "The oauth security descriptions", - "flows": { - "clientCredentials": { - "tokenUrl": "https://example.com/api/oauth/dialog", - "availableScopes": { - "subscribe:auth_revocations": "Scope required for authorization revocation topic" - } - } - }, - "scopes": [ - "subscribe:auth_revocations" - ] - } - }, - "operationTraits": { - "binding": { - "bindings": { - "amqp": { - "ack": false - } - } - }, - "kafka": { - "bindings": { - "kafka": { - "groupId": false - } - } - } - }, - "messageTraits": { - "commonHeaders": { - "headers": { - "type": "object", - "properties": { - "my-app-header": { - "type": "integer", - "minimum": 0, - "maximum": 100 - } - } - } - } - }, - "tags": { - "user": { - "name": "user", - "description": "User-related messages" - } - }, - "externalDocs": { - "infoDocs": { - "url": "https://example.com/docs", - "description": "Find more info here" - } - }, - "serverBindings": { - "devAmqp": { - "amqp": { - "exchange": "my-exchange", - "queue": "my-queue" - } - } - }, - "channelBindings": { - "user": { - "amqp": { - "is": "queue", - "queue": { - "exclusive": true - } - } - } - }, - "operationBindings": { - "sendUser": { - "amqp": { - "ack": false - } - } - }, - "messageBindings": { - "user": { - "amqp": { - "contentEncoding": "gzip", - "messageType": "user.signup", - "bindingVersion": "0.3.0" - } - } - } - } -} \ No newline at end of file diff --git a/scripts/validation/embed-logs/Message Object-json-format.json b/scripts/validation/embed-logs/Message Object-json-format.json deleted file mode 100644 index 7dd95c76..00000000 --- a/scripts/validation/embed-logs/Message Object-json-format.json +++ /dev/null @@ -1,730 +0,0 @@ -{ - "asyncapi": "3.0.0", - "info": { - "title": "AsyncAPI", - "version": "1.x.x", - "description": "This is a very good base doc, probably.", - "termsOfService": "https://asyncapi.org/terms/", - "license": { - "name": "Apache 2.0", - "url": "https://www.apache.org/licenses/LICENSE-2.0.html" - }, - "externalDocs": { - "description": "Find more info here", - "url": "https://www.asyncapi.org" - }, - "tags": [ - { - "name": "e-commerce" - } - ] - }, - "servers": { - "production": { - "host": "rabbitmq.in.mycompany.com:5672", - "pathname": "/v1", - "protocol": "amqp", - "protocolVersion": "1.0", - "description": "Production RabbitMQ broker (uses the `production` vhost).", - "title": "Production Server", - "summary": "Production environment server", - "security": [ - { - "type": "http", - "scheme": "bearer" - } - ], - "tags": [ - { - "name": "production", - "description": "Production environment" - } - ], - "externalDocs": { - "description": "Additional documentation for the production server", - "url": "https://example.com/docs/production" - }, - "bindings": { - "amqp": { - "exchange": "my-exchange", - "queue": "my-queue" - } - } - }, - "staging": { - "host": "rabbitmq.in.mycompany.com:5672", - "pathname": "/v1", - "protocol": "amqp", - "protocolVersion": "1.0", - "description": "Staging RabbitMQ broker (uses the `staging` vhost).", - "title": "Staging Server", - "summary": "Staging environment server", - "security": [ - { - "type": "apiKey", - "in": "user", - "description": "Provide your API key as the user and leave the password empty." - } - ], - "tags": [ - { - "name": "staging", - "description": "Staging environment" - } - ], - "externalDocs": { - "description": "Additional documentation for the staging server", - "url": "https://example.com/docs/staging" - }, - "bindings": { - "amqp": { - "exchange": "my-exchange", - "queue": "my-queue" - } - } - }, - "rabbitmqInProd": { - "host": "{prod}.in.mycompany.com", - "protocol": "amqp", - "description": "Production server" - }, - "rabbitmqInStaging": { - "host": "{stage}.in.mycompany.com", - "protocol": "amqp", - "description": "Staging server" - } - }, - "channels": { - "user": { - "address": "users.{userId}", - "title": "Users channel", - "description": "This channel is used to exchange messages about user events.", - "messages": { - "userSignedUp": { - "$ref": "#/components/messages/userSignedUp" - }, - "userCompletedOrder": { - "$ref": "#/components/messages/userCompletedOrder" - } - }, - "parameters": { - "userId": { - "$ref": "#/components/parameters/userId" - } - }, - "servers": [ - { - "$ref": "#/servers/production" - } - ], - "bindings": { - "amqp": { - "is": "queue", - "queue": { - "exclusive": true - } - } - }, - "tags": [ - { - "name": "user", - "description": "User-related messages" - } - ], - "externalDocs": { - "description": "Find more info here", - "url": "https://example.com" - } - }, - "userSignup": { - "address": "users.signup", - "description": "Channel for user signups", - "messages": { - "userSignedUp": { - "$ref": "#/components/messages/userSignedUp" - } - } - }, - "userSignupReply": { - "address": "users.signup.reply", - "description": "Channel for user signup replies", - "messages": { - "userSignedUpReply": { - "summary": "User signup reply message", - "payload": { - "type": "object", - "properties": { - "status": { - "type": "string", - "description": "Status of the signup process" - }, - "message": { - "type": "string", - "description": "Additional information" - } - } - } - } - } - } - }, - "operations": { - "sendUserSignUp": { - "action": "send", - "title": "User sign up", - "summary": "Action to sign a user up.", - "description": "A longer description", - "channel": { - "$ref": "#/channels/user" - }, - "security": [ - { - "type": "oauth2", - "description": "The oauth security descriptions", - "flows": { - "clientCredentials": { - "tokenUrl": "https://example.com/api/oauth/dialog", - "availableScopes": { - "subscribe:auth_revocations": "Scope required for authorization revocation topic" - } - } - }, - "scopes": [ - "subscribe:auth_revocations" - ] - } - ], - "tags": [ - { - "name": "user" - }, - { - "name": "signup" - }, - { - "name": "register" - } - ], - "bindings": { - "amqp": { - "ack": false - } - }, - "messages": [ - { - "$ref": "#/channels/user/messages/userSignedUp" - } - ], - "reply": { - "address": { - "location": "$message.header#/replyTo" - }, - "channel": { - "$ref": "#/channels/userSignupReply" - }, - "messages": [ - { - "$ref": "#/channels/userSignupReply/messages/userSignedUpReply" - } - ] - }, - "traits": [] - } - }, - "components": { - "schemas": { - "Category": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int64" - } - } - }, - "AvroExample": { - "schemaFormat": "application/vnd.apache.avro+json;version=1.9.0", - "schema": { - "type": "record", - "name": "UserCreate", - "namespace": "com.example", - "fields": [ - { - "name": "id", - "type": "int" - }, - { - "name": "name", - "type": "string" - } - ] - } - }, - "userCreate": { - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "The ID of the user" - }, - "name": { - "type": "string", - "description": "The name of the user" - }, - "email": { - "type": "string", - "format": "email", - "description": "The email of the user" - } - }, - "required": [ - "id", - "name", - "email" - ] - }, - "signup": { - "type": "object", - "properties": { - "timestamp": { - "type": "string", - "format": "date-time", - "description": "The timestamp of the signup" - }, - "source": { - "type": "string", - "description": "The source of the signup" - } - }, - "required": [ - "timestamp", - "source" - ] - }, - "ComplexModel": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int64" - }, - "name": { - "type": "string" - } - } - }, - "Address": { - "type": "object", - "properties": { - "street": { - "type": "string" - }, - "city": { - "type": "string" - }, - "state": { - "type": "string" - }, - "zip": { - "type": "string" - } - } - }, - "ErrorModel": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32" - }, - "message": { - "type": "string" - } - } - }, - "Pet": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int64" - }, - "name": { - "type": "string" - }, - "tag": { - "type": "string" - } - } - } - }, - "servers": { - "development": { - "host": "{stage}.in.mycompany.com", - "protocol": "amqp", - "description": "RabbitMQ broker", - "bindings": { - "$ref": "#/components/serverBindings/devAmqp" - }, - "variables": { - "stage": { - "$ref": "#/components/serverVariables/stage" - } - }, - "security": [ - { - "$ref": "#/components/securitySchemes/oauth" - } - ] - } - }, - "serverVariables": { - "stage": { - "default": "demo", - "description": "This value is assigned by the service provider in this example of `mycompany.com`" - } - }, - "channels": { - "user": { - "address": "users.{userId}", - "title": "Users channel", - "description": "This channel is used to exchange messages about user events.", - "messages": { - "userSignedUp": { - "$ref": "#/components/messages/userSignUp" - } - }, - "parameters": { - "userId": { - "$ref": "#/components/parameters/userId" - } - }, - "servers": [ - { - "$ref": "#/components/servers/development" - } - ], - "bindings": { - "$ref": "#/components/channelBindings/user" - }, - "tags": [ - { - "$ref": "#/components/tags/user" - } - ], - "externalDocs": { - "$ref": "#/components/externalDocs/infoDocs" - } - } - }, - "messages": { - "userSignUp": { - "summary": "Action to sign a user up.", - "traits": [ - { - "$ref": "#/components/messageTraits/commonHeaders" - } - ], - "payload": { - "$ref": "#/components/schemas/Category" - }, - "correlationId": { - "$ref": "#/components/correlationIds/default" - }, - "bindings": { - "$ref": "#/components/messageBindings/user" - }, - "examples": [] - }, - "userSignedUp": { - "name": "UserSignup", - "title": "User signup", - "summary": "Action to sign a user up.", - "description": "A longer description", - "contentType": "application/json", - "tags": [ - { - "name": "user" - }, - { - "name": "signup" - }, - { - "name": "register" - } - ], - "headers": { - "type": "object", - "properties": { - "correlationId": { - "description": "Correlation ID set by application", - "type": "string" - }, - "applicationInstanceId": { - "description": "Unique identifier for a given instance of the publishing application", - "type": "string" - } - } - }, - "payload": { - "type": "object", - "properties": { - "user": { - "$ref": "#/components/schemas/userCreate" - }, - "signup": { - "$ref": "#/components/schemas/signup" - } - }, - "schemaFormat": "application/vnd.apache.avro+json;version=1.9.0", - "schema": { - "$ref": "path/to/user-create.avsc#/UserCreate" - } - }, - "correlationId": { - "description": "Default Correlation ID", - "location": "$message.header#/correlationId" - }, - "traits": [ - { - "$ref": "#/components/messageTraits/commonHeaders" - } - ], - "examples": [ - { - "name": "SimpleSignup", - "summary": "A simple UserSignup example message", - "headers": { - "correlationId": "my-correlation-id", - "applicationInstanceId": "myInstanceId" - }, - "payload": { - "user": { - "someUserKey": "someUserValue" - }, - "signup": { - "someSignupKey": "someSignupValue" - } - } - } - ] - }, - "userSignedUpReply": { - "name": "UserSignupReply", - "title": "User signup reply", - "summary": "User signup reply message", - "contentType": "application/json", - "payload": { - "type": "object", - "properties": { - "status": { - "type": "string", - "description": "Status of the signup process" - }, - "message": { - "type": "string", - "description": "Additional information" - } - } - } - }, - "userCompletedOrder": { - "summary": "User completed order event", - "contentType": "application/json", - "payload": { - "type": "object", - "properties": { - "orderId": { - "type": "string", - "description": "The ID of the order" - }, - "userId": { - "type": "string", - "description": "The ID of the user" - }, - "amount": { - "type": "number", - "description": "The total amount of the order" - } - } - } - } - }, - "parameters": { - "userId": { - "description": "Id of the user." - } - }, - "correlationIds": { - "default": { - "description": "Default Correlation ID", - "location": "$message.header#/correlationId" - } - }, - "operations": { - "sendUserSignUp": { - "action": "send", - "title": "User sign up", - "channel": { - "$ref": "#/channels/user" - }, - "bindings": { - "$ref": "#/components/operationBindings/sendUser" - }, - "traits": [ - { - "$ref": "#/components/operationTraits/binding" - } - ], - "reply": { - "$ref": "#/components/replies/signupReply" - } - } - }, - "replies": { - "signupReply": { - "address": { - "$ref": "#/components/replyAddresses/signupReply" - }, - "channel": { - "$ref": "#/channels/userSignupReply" - } - } - }, - "replyAddresses": { - "signupReply": { - "location": "$message.header#/replyTo" - } - }, - "securitySchemes": { - "userPasswordAuth": { - "type": "userPassword", - "description": "User password security scheme" - }, - "apiKeyAuth": { - "type": "apiKey", - "description": "API key security scheme", - "in": "user" - }, - "X509Auth": { - "type": "X509", - "description": "X509 security scheme" - }, - "symmetricEncryptionAuth": { - "type": "symmetricEncryption", - "description": "Symmetric encryption security scheme" - }, - "basicAuth": { - "type": "http", - "description": "Basic security scheme", - "scheme": "basic" - }, - "httpApiAuth": { - "type": "httpApiKey", - "name": "API Key Sample", - "description": "api_key", - "in": "header" - }, - "JWTAuth": { - "type": "http", - "scheme": "bearer", - "bearerFormat": "JWT" - }, - "saslAuth": { - "type": "scramSha256", - "description": "SASL security scheme" - }, - "oauth": { - "type": "oauth2", - "description": "The oauth security descriptions", - "flows": { - "clientCredentials": { - "tokenUrl": "https://example.com/api/oauth/dialog", - "availableScopes": { - "subscribe:auth_revocations": "Scope required for authorization revocation topic" - } - } - }, - "scopes": [ - "subscribe:auth_revocations" - ] - } - }, - "operationTraits": { - "binding": { - "bindings": { - "amqp": { - "ack": false - } - } - }, - "kafka": { - "bindings": { - "kafka": { - "groupId": false - } - } - } - }, - "messageTraits": { - "commonHeaders": { - "headers": { - "type": "object", - "properties": { - "my-app-header": { - "type": "integer", - "minimum": 0, - "maximum": 100 - } - } - } - } - }, - "tags": { - "user": { - "name": "user", - "description": "User-related messages" - } - }, - "externalDocs": { - "infoDocs": { - "url": "https://example.com/docs", - "description": "Find more info here" - } - }, - "serverBindings": { - "devAmqp": { - "amqp": { - "exchange": "my-exchange", - "queue": "my-queue" - } - } - }, - "channelBindings": { - "user": { - "amqp": { - "is": "queue", - "queue": { - "exclusive": true - } - } - } - }, - "operationBindings": { - "sendUser": { - "amqp": { - "ack": false - } - } - }, - "messageBindings": { - "user": { - "amqp": { - "contentEncoding": "gzip", - "messageType": "user.signup", - "bindingVersion": "0.3.0" - } - } - } - } -} \ No newline at end of file diff --git a/scripts/validation/embedded-examples-error-report.md b/scripts/validation/embedded-examples-error-report.md deleted file mode 100644 index 503efa90..00000000 --- a/scripts/validation/embedded-examples-error-report.md +++ /dev/null @@ -1,125 +0,0 @@ -# how did I locally resolved error in [Operation-Object.json](https://github.com/asyncapi/spec/blob/ced626f6f6abf80e128216793a1bdc656c36c059/scripts/validation/updated-docs/Operation-Object.json)? - -## 1st change -change line 219 in the document itself from - -```json -"$ref": "/components/messages/userSignedUp" -``` - -to -```json -"$ref": "#/components/messages/userSignedUp" -``` - -## 2nd change -and similar changes for line 231 in the document - -from - - -```json -"$ref": "/components/messages/userSignedUpReply" -``` - -```json -"$ref": "#/components/messages/userSignedUpReply" -``` - - -## 3rd change - -remove lines from 217 to 221 in the document - -Then the file becomes valid in the AsyncAPI Studio - -Try it [here](https://tinyurl.com/operation-object) - -# how did I locally resolved error in [Message-Example-Object.json](https://github.com/asyncapi/spec/blob/ced626f6f6abf80e128216793a1bdc656c36c059/scripts/validation/updated-docs/Message-Example-Object.json)? - -Added a placeholder of type array for the example at line 429 in the base doc - -```json -"examples":[] -``` -applied it via this [commit](https://github.com/asyncapi/spec/pull/1059/commits/6f18cbc36767bbce74220947b9cd9fc570c21b62) - -# how did I locally resolved error in [Operation-Traits-Object.json](https://github.com/asyncapi/spec/blob/ced626f6f6abf80e128216793a1bdc656c36c059/scripts/validation/updated-docs/Operation-Traits-Object.json)? - -Added a placeholder of type array for the example at line 231 in the base doc - -```json -"traits":[] -``` -applied it via this [commit](https://github.com/asyncapi/spec/pull/1059/commits/6f18cbc36767bbce74220947b9cd9fc570c21b62) - ---- - -# Problems with [Security-Scheme-OAuth-Flow-Object.json](https://github.com/AnimeshKumar923/asyncapi-spec/blob/254354385f0cd28bd73eaaa86a9a91adc958b13f/scripts/validation/embed-logs/Security%20Scheme%20OAuth%20Flow%20Object-json-format.json) - - -```bash -Warning in Security Scheme OAuth Flow Object-json-format: "0" property must have required property "in" -Warning in Security Scheme OAuth Flow Object-json-format: "0" property must not be valid -Warning in Security Scheme OAuth Flow Object-json-format: "0" property must have required property "scheme" -Warning in Security Scheme OAuth Flow Object-json-format: "0" property must have required property "name" -Warning in Security Scheme OAuth Flow Object-json-format: "0" property must have required property "openIdConnectUrl" -Warning in Security Scheme OAuth Flow Object-json-format: Property "flows" is not expected to be here -Warning in Security Scheme OAuth Flow Object-json-format: "clientCredentials" property must not be valid -Warning in Security Scheme OAuth Flow Object-json-format: Property "scopes" is not expected to be here -Warning in Security Scheme OAuth Flow Object-json-format: Property "flows" is not expected to be here -Warning in Security Scheme OAuth Flow Object-json-format: "clientCredentials" property must not be valid -Warning in Security Scheme OAuth Flow Object-json-format: Property "scopes" is not expected to be here -Warning in Security Scheme OAuth Flow Object-json-format: "0" property must have required property "in" -Warning in Security Scheme OAuth Flow Object-json-format: "0" property must not be valid -Warning in Security Scheme OAuth Flow Object-json-format: "0" property must have required property "scheme" -Warning in Security Scheme OAuth Flow Object-json-format: "0" property must have required property "name" -Warning in Security Scheme OAuth Flow Object-json-format: "0" property must have required property "openIdConnectUrl" -Warning in Security Scheme OAuth Flow Object-json-format: "oauth" property must have required property "in" -Warning in Security Scheme OAuth Flow Object-json-format: "oauth" property must not be valid -Warning in Security Scheme OAuth Flow Object-json-format: "oauth" property must have required property "scheme" -Warning in Security Scheme OAuth Flow Object-json-format: "oauth" property must have required property "name" -Warning in Security Scheme OAuth Flow Object-json-format: "oauth" property must have required property "openIdConnectUrl" -Warning in Security Scheme OAuth Flow Object-json-format: Property "flows" is not expected to be here -Warning in Security Scheme OAuth Flow Object-json-format: "clientCredentials" property must not be valid -Warning in Security Scheme OAuth Flow Object-json-format: Property "scopes" is not expected to be here - -``` - -## Solution for this error -For the resolution, what I found out from my observation is that if we remove this line: - -```json -"authorizationUrl": "https://example.com/api/oauth/dialog", -``` -from the examples in the spec, the files become valid. - -and we remove the same line from the yaml file as well. - -I tried removing this line from the invalid document in the Studio validator and the file became valid - -Maybe I'm wrong and we need to modify something else? I don't know as of now... - ---- - -# Problems in [Message-Object](https://github.com/AnimeshKumar923/asyncapi-spec/blob/3ffdb58ce45a7619037be7c77642eb62c33a10a4/scripts/validation/embed-logs/Message%20Object-json-format.json) - -```bash -Warning in Message Object-json-format: ENOENT: no such file or directory, open 'path/to/user-create.avsc' -``` - -# Problems in [Components-Object](https://github.com/AnimeshKumar923/asyncapi-spec/blob/3ffdb58ce45a7619037be7c77642eb62c33a10a4/scripts/validation/embed-logs/Components%20Object-json-format.json) - -```bash -Warning in Components Object-json-format: "AvroExample" property must match "then" schema -Warning in Components Object-json-format: "schema" property must match exactly one schema in oneOf -Warning in Components Object-json-format: ENOENT: no such file or directory, open 'path/to/user-create.avsc' -``` - -As far as I understand, it's referencing to some non-existent external example file. - -I've tried this in the Studio validator: - -- For the `Message Object`, if we remove [this portion](https://github.com/AnimeshKumar923/asyncapi-spec/blob/3ffdb58ce45a7619037be7c77642eb62c33a10a4/scripts/validation/embed-logs/Message%20Object-json-format.json#L479C75-L482C12), the file becomes valid. - -- For the `Components Object`, if we remove [this portion](https://github.com/AnimeshKumar923/asyncapi-spec/blob/3ffdb58ce45a7619037be7c77642eb62c33a10a4/scripts/validation/embed-logs/Components%20Object-json-format.json#L263C12-L264C57), the file becomes valid.