Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature(engine): new SETUP EventType #174

Merged
merged 7 commits into from
Feb 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
29 changes: 15 additions & 14 deletions apps/examples/client-example/api/openapi.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"openapi": "3.0.3",
"info": {
"version": "0.21",
"version": "0.22",
"title": "Client Example",
"description": "Client Example"
},
"paths": {
"/api/config-manager/0x21/runtime-apps-config": {
"/api/config-manager/0x22/runtime-apps-config": {
"get": {
"summary": "Config Manager: Runtime Apps Config",
"description": "Returns the runtime config for the Apps running on this server",
Expand Down Expand Up @@ -62,11 +62,11 @@
}
},
"tags": [
"config_manager.0x21"
"config_manager.0x22"
]
}
},
"/api/config-manager/0x21/cluster-apps-config": {
"/api/config-manager/0x22/cluster-apps-config": {
"get": {
"summary": "Config Manager: Cluster Apps Config",
"description": "Handle remote access to runtime configuration for a group of hosts",
Expand Down Expand Up @@ -122,11 +122,11 @@
}
},
"tags": [
"config_manager.0x21"
"config_manager.0x22"
]
}
},
"/api/client-example/0x21/call-unsecured": {
"/api/client-example/0x22/call-unsecured": {
"get": {
"summary": "Client Example: Call Unsecured",
"description": "List all available Something objects connecting to simple-example app",
Expand Down Expand Up @@ -196,11 +196,11 @@
}
},
"tags": [
"client_example.0x21"
"client_example.0x22"
]
}
},
"/api/client-example/0x21/count-and-save": {
"/api/client-example/0x22/count-and-save": {
"get": {
"summary": "Client Example: Count Objects and Save new one",
"description": "Count all available Something objects connecting to simple-example app",
Expand Down Expand Up @@ -267,7 +267,7 @@
}
},
"tags": [
"client_example.0x21"
"client_example.0x22"
],
"security": [
{
Expand All @@ -276,7 +276,7 @@
]
}
},
"/api/client-example/0x21/handle-responses": {
"/api/client-example/0x22/handle-responses": {
"get": {
"summary": "Client Example: Handle Responses",
"description": "Non default responses and UnhandledResponse exception\n\nTo manage different types of responses from the same endpoint we can use the `responses` parameter where we list the\nhttp response status codes expected and the corresponding data type for each one. In this example `app_call` expect\nand handle, 200 and 404 responses.\n\nAlso in the code you can see how to handle an expection of type `UnhandledResponse` and log as warining.",
Expand Down Expand Up @@ -361,7 +361,7 @@
}
},
"tags": [
"client_example.0x21"
"client_example.0x22"
],
"security": [
{
Expand Down Expand Up @@ -635,7 +635,8 @@
"POST",
"STREAM",
"SERVICE",
"MULTIPART"
"MULTIPART",
"SETUP"
],
"x-enum-name": "EventType",
"x-module-name": "hopeit.app.config"
Expand Down Expand Up @@ -704,7 +705,7 @@
}
},
"x-module-name": "hopeit.app.config",
"description": "\n Event Descriptor: configures event implementation\n\n :field: type, EventType: type of event i.e.: GET, POST, MULTIPART, STREAM, SERVICE\n :field: plug_mode, EventPlugMode: defines whether an event defined in a plugin is created in the\n current app (ON_APP) or it will be created in the original plugin (STANDALONE, default)\n :field: route, optional str: custom route for endpoint. If not specified route will be derived\n from `/api/app_name/app_version/event_name`\n :field: impl, optional str: custom event implementation Python module. If not specified, module\n with same same as event will be imported.\n :field: connections, list of EventConnection: specifies dependencies on other apps/endpoints,\n that can be used by client plugins to call events on external apps\n :field: read_stream, optional ReadStreamDescriptor: specifies source stream to read from.\n Valid only for STREAM events.\n :field: write_stream, optional WriteStreamDescriptor: for any type of events, resultant dataobjects will\n be published to the specified stream.\n :field: auth, list of AuthType: supported authentication schemas for this event. If not specified\n application default will be used.\n :field: setting_keys, list of str: by default EventContext will have access to the settings section\n with the same name of the event using `settings = context.settings(datatype=MySettingsType)`.\n In case additional sections are needed to be accessed from\n EventContext, then a list of setting keys, including the name of the event if needed,\n can be specified here. Then access to a `custom` key can be done using\n `custom_settings = context.settings(key=\"customer\", datatype=MyCustomSettingsType)`\n :field: dataobjects, list of str: list of full qualified dataobject types that this event can process.\n When not specified, the engine will inspect the module implementation and find all datatypes supported\n as payload in the functions defined as `__steps__`. In case of generic functions that support\n `payload: DataObject` argument, then a list of full qualified datatypes must be specified here.\n :field: group, str: group name, if none is assigned it is automatically assigned as 'DEFAULT'.\n "
"description": "\n Event Descriptor: configures event implementation\n\n :field: type, EventType: type of event i.e.: GET, POST, MULTIPART, STREAM, SERVICE, SETUP\n :field: plug_mode, EventPlugMode: defines whether an event defined in a plugin is created in the\n current app (ON_APP) or it will be created in the original plugin (STANDALONE, default)\n :field: route, optional str: custom route for endpoint. If not specified route will be derived\n from `/api/app_name/app_version/event_name`\n :field: impl, optional str: custom event implementation Python module. If not specified, module\n with same same as event will be imported.\n :field: connections, list of EventConnection: specifies dependencies on other apps/endpoints,\n that can be used by client plugins to call events on external apps\n :field: read_stream, optional ReadStreamDescriptor: specifies source stream to read from.\n Valid only for STREAM events.\n :field: write_stream, optional WriteStreamDescriptor: for any type of events, resultant dataobjects will\n be published to the specified stream.\n :field: auth, list of AuthType: supported authentication schemas for this event. If not specified\n application default will be used.\n :field: setting_keys, list of str: by default EventContext will have access to the settings section\n with the same name of the event using `settings = context.settings(datatype=MySettingsType)`.\n In case additional sections are needed to be accessed from\n EventContext, then a list of setting keys, including the name of the event if needed,\n can be specified here. Then access to a `custom` key can be done using\n `custom_settings = context.settings(key=\"customer\", datatype=MyCustomSettingsType)`\n :field: dataobjects, list of str: list of full qualified dataobject types that this event can process.\n When not specified, the engine will inspect the module implementation and find all datatypes supported\n as payload in the functions defined as `__steps__`. In case of generic functions that support\n `payload: DataObject` argument, then a list of full qualified datatypes must be specified here.\n :field: group, str: group name, if none is assigned it is automatically assigned as 'DEFAULT'.\n "
},
"EventConnection": {
"type": "object",
Expand Down Expand Up @@ -834,7 +835,7 @@
},
"engine_version": {
"type": "string",
"default": "0.21.3"
"default": "0.22.0"
}
},
"x-module-name": "hopeit.server.config",
Expand Down