Closed dilini-muthumala closed 3 years ago
On a related note - it was noted that it is allowed to Generate an Async API from the following app although it does not make sense to create an Async API from an SSE source.
@App:name('SSEApp')
@App:description('Description of the plan')
@App:asyncAPI("""asyncapi: 2.0.0
info:
title: ssetest
version: 1.0.0
description: test sse
servers:
production:
url: 'localhost:8080'
protocol: http
security: []
channels:
/:
publish:
message:
$ref: '#/components/messages/RecieveProductionStreamPayload'
components:
messages:
RecieveProductionStreamPayload:
payload:
type: object
properties:
date:
$ref: '#/components/schemas/date'
schemas:
date:
type: string
securitySchemes: {}
""")
@source(type='sse',event.source.url = "http://localhost:8080",
@map(type='json'))
define stream RecieveProductionStream (date string);
@sink(type='log')
define stream LogProductionStream (date string);
@info(name='query1')
from RecieveProductionStream
select *
insert into LogProductionStream;
This is fixed now
Description: The source/sink list drop down in Async API view includes sources/sinks that cannot be exported as Async APIs.
If I choose a sink/source from the drop down that is not included in the list defined as
sinkSorceTypes
in [1], and click the button 'Generate Async API', it does not do anything. When I check the browser's JS console, the following error was there, as it is looking for the 'security' element of the source/sink insinkSorceTypes
in [1].[1] https://github.com/wso2/carbon-analytics/blob/master/components/org.wso2.carbon.siddhi.editor.core/src/main/resources/web/editor/js/async-api/async-api-generator.js#L125
Affected Product Version: wso2si-tooling-4.0.0-SNAPSHOT
Steps to reproduce: Create below app, go to Async API view, fill the fields (choose websocket as the source/sink) , and click on 'Generate Async API' button.