diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index a8c36692..5761423d 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -7,6 +7,9 @@ docs/AboutApi.md docs/ActiveEventData.md docs/ActiveEventSSE.md docs/ActiveEventSSEEvent.md +docs/AltEmbeddedVersionIKfservingResponseV2.md +docs/AltEmbeddedVersionIPlugResponseV2.md +docs/AltEmbeddedVersionIWebscriptResponseWithInvokeLinkV2.md docs/AltVersionHALLink.md docs/AnyFunctionResponse.md docs/AnyJobForFunction.md @@ -23,10 +26,8 @@ docs/AssetSummary.md docs/AssetSummaryWithHALLink.md docs/AssetSummaryWithHALLinkLinks.md docs/AssetsConditions.md -docs/AsyncDeployQuery.md docs/AsyncDeployQueryV1.md docs/AsyncQueryDefaultFalse.md -docs/AsyncQueryDefaultTrue.md docs/AsyncVerifyQuery.md docs/Batch.md docs/BatchArgs.md @@ -48,9 +49,11 @@ docs/CompletedEventSSEEvent.md docs/ContentQueryV2.md docs/ContentValidationListing.md docs/CreateFunctionQueryV2.md +docs/CreateFunctionQueryV2Copy.md docs/CreateKFServingAsyncResponse.md docs/CreatePlugAsyncResponse.md docs/CreateWebscriptAsyncResponse.md +docs/CreateWebscriptsCopyParameter.md docs/DelayedEventData.md docs/DelayedEventSSE.md docs/DelayedEventSSEEvent.md @@ -58,19 +61,18 @@ docs/Deploy.md docs/Deploy1.md docs/DeployArgs.md docs/DeployArgsDeploySpecOverrides.md -docs/DeployAttributesFilter.md docs/DeployJobStatus.md docs/DeployResult.md docs/DeploySpec.md docs/DeploySpecOpenfaasSpec.md docs/DeployType.md docs/DeprecatePreviousPolicy.md -docs/DeprecatePreviousQuery.md -docs/DeprecatedDraftFilter.md docs/Documentation.md docs/DocumentationProperty.md -docs/DryRunQuery.md docs/EntityResponse.md +docs/EntityWithLinksIKfservingResponseV2.md +docs/EntityWithLinksIPlugResponseV2.md +docs/EntityWithLinksIWebscriptResponseWithInvokeLinkV2.md docs/ErrorAndStatusResponse.md docs/ErrorResponse.md docs/EventAck.md @@ -79,6 +81,7 @@ docs/EventKeepAlive.md docs/EventSSE.md docs/EventTypeSSE.md docs/EventWithCloseSSE.md +docs/ExampleReference.md docs/ExposedOpenfaasDeploySpec.md docs/FailedEventData.md docs/FailedEventSSE.md @@ -86,10 +89,8 @@ docs/FailedEventSSEEvent.md docs/FailureReason.md docs/FileUpload.md docs/ForceDeleteQueryV1.md -docs/FunctionDeleteQuery.md docs/FunctionDeployOverrides.md docs/FunctionDeployOverridesType.md -docs/FunctionEntityQuery.md docs/FunctionJobArgs.md docs/FunctionManifest.md docs/FunctionMeta.md @@ -97,7 +98,6 @@ docs/FunctionNameVersion.md docs/FunctionRef.md docs/FunctionSpec.md docs/FunctionType.md -docs/FunctionVersionQuery.md docs/GetContentParamsV2.md docs/GetInvokableWebscriptQuery.md docs/GetModelResponseV2.md @@ -160,6 +160,7 @@ docs/JobType.md docs/JobTypeBatch.md docs/JobTypeBuild.md docs/JobTypeDeploy.md +docs/JobTypeNotify.md docs/JobTypeScale.md docs/JobTypeSchema.md docs/JobTypeUndeploy.md @@ -190,19 +191,17 @@ docs/KeepAliveEventSSE.md docs/KfservingResponseV2.md docs/LanguageRelease.md docs/LatestFunctionVersionsQuery.md +docs/LatestFunctionVersionsQueryShowRelated.md docs/LatestFunctionsQuery.md docs/LatestModelsResponseV2.md -docs/LatestModelsResponseV2EntitiesInner.md docs/LatestPlugQuery.md docs/LatestPlugVersionQueryV2.md docs/LatestPlugVersionsQuery.md docs/LatestPlugVersionsQueryV2.md docs/LatestPlugsQuery.md docs/LatestPlugsResponseV2.md -docs/LatestPlugsResponseV2EntitiesInner.md docs/LatestVersionLevel.md docs/LatestWebscriptsResponseV2.md -docs/LatestWebscriptsResponseV2EntitiesInner.md docs/LegacyConfigurationObject.md docs/LegacyConfigurationObjectFormat.md docs/LegacyConfigurationResponseObject.md @@ -229,19 +228,16 @@ docs/LegacyPlugScriptMetaRawDataInner.md docs/LegacyPlugScriptResponse.md docs/LegacyRequiredPropertiesInner.md docs/LegacyRequiredPropertyObject.md -docs/LimitQuery.md docs/MediaType.md docs/MessageAndStatusResponse.md docs/MessageResponse.md docs/Model.md docs/Model1.md docs/Model2.md -docs/ModelFunctionsApi.md docs/ModelVersionsResponseV2.md -docs/MultipartFileUpload.md +docs/ModelsApi.md docs/Name.md docs/NameAndVersion.md -docs/NamedFunctionVersionsQuery.md docs/NamedKFServingVersionsQueryV2.md docs/NamedParametersTypeofAsJobReference.md docs/NamedParametersTypeofAsJobReferenceJobStatus.md @@ -249,15 +245,14 @@ docs/NamedParametersTypeofFromLegacy.md docs/NamedParametersTypeofFromLegacyDocumentation.md docs/NamedParametersTypeofIsNotLegacy.md docs/NamedPlugVersionsQueryV2.md -docs/NamedVersionsFilter.md docs/NamedWebscriptVersionsQueryV2.md +docs/NotifyResult.md docs/OpenfaasDeployArgs.md docs/OpenfaasFunctionRef.md docs/Operation.md docs/Operation.md docs/OperationStatus.md docs/OperationStatusError.md -docs/PagingQuery.md docs/PagingResponse.md docs/ParentKeys.md docs/PatchInterfaceQuery.md @@ -267,8 +262,6 @@ docs/Plug.md docs/Plug1.md docs/Plug2.md docs/PlugDeleteForceQuery.md -docs/PlugDeleteQuery.md -docs/PlugFunctionsApi.md docs/PlugInterface.md docs/PlugListingAndQueryResponse.md docs/PlugListingResponse.md @@ -281,8 +274,8 @@ docs/PlugPropertyFormatType.md docs/PlugResponse.md docs/PlugResponseV2.md docs/PlugType.md -docs/PlugTypeQuery.md docs/PlugVersionsResponseV2.md +docs/PlugsApi.md docs/PostModelJobAsyncResponseV2.md docs/PostModelJobSyncResponseV2.md docs/PostPlugJobAsyncResponseV2.md @@ -298,13 +291,14 @@ docs/RebuildModelSyncResponseV2.md docs/RebuildPlugAsyncResponseV2.md docs/RebuildPlugSyncResponseV2.md docs/RebuildPolicy.md -docs/RebuildQueryParams.md docs/RebuildQueryV2.md docs/RebuildSubmittedResponse.md docs/RebuildWebscriptAsyncResponseV2.md docs/RebuildWebscriptSyncResponseV2.md +docs/RegistryErrorResponse.md docs/RemoveFunctionQueryV2.md docs/RemovePlugQueryV2.md +docs/RequestDeployQuery.md docs/RequestOperation.md docs/ResourceLimits.md docs/RootPageResponse.md @@ -336,8 +330,10 @@ docs/SchemaByIdParams.md docs/SchemaParams.md docs/SchemasApi.md docs/SemanticVersionRange.md +docs/ShowRelatedType.md docs/Status.md docs/StatusAny.md +docs/StatusExclude.md docs/StatusFilter.md docs/StatusInclude.md docs/StatusResponse.md @@ -347,7 +343,6 @@ docs/SupportedEvents.md docs/Tag.md docs/TagQuery.md docs/TagsFilter.md -docs/TagsQuery.md docs/TimestampAbsolute.md docs/TimestampAge.md docs/TimestampSpec.md @@ -360,7 +355,6 @@ docs/UndeploySubmittedResponseV2.md docs/UndeployType.md docs/UndeployedResponseV2.md docs/UnhealthyInvokableWebscriptError.md -docs/UpdateComment.md docs/UpdateDraftQuery.md docs/UpdateMetadataRequestV1.md docs/UpdateMetadataRequestV2.md @@ -377,7 +371,6 @@ docs/VerifyResult.md docs/VerifyType.md docs/VerifyWebscriptSyncResponseV2.md docs/VersionIncludes.md -docs/VersionsQuery.md docs/VersionsQueryV2.md docs/VersionsResponseV2.md docs/WaitingChildrenEventSSE.md @@ -388,7 +381,6 @@ docs/WaitingEventSSEEvent.md docs/Webscript.md docs/Webscript1.md docs/Webscript2.md -docs/WebscriptFunctionsApi.md docs/WebscriptLatestVersionQueryV2.md docs/WebscriptLatestVersionsQueryV1.md docs/WebscriptLatestVersionsQueryV2.md @@ -397,7 +389,11 @@ docs/WebscriptResponse.md docs/WebscriptResponseV2.md docs/WebscriptResponseWithInvokeLinkV2.md docs/WebscriptVersionsResponseV2.md +docs/WebscriptsApi.md docs/WithAssetHALLink.md +docs/WithEmbeddedAltVersionsIKfservingResponseV2.md +docs/WithEmbeddedAltVersionsIPlugResponseV2.md +docs/WithEmbeddedAltVersionsIWebscriptResponseWithInvokeLinkV2.md docs/WithEntityAttributes.md docs/WithLimit.md docs/WithPaging.md @@ -407,17 +403,20 @@ test/__init__.py test/api/__init__.py test/api/about_api_test.py test/api/jobs_api_test.py -test/api/model_functions_api_test.py -test/api/plug_functions_api_test.py +test/api/models_api_test.py +test/api/plugs_api_test.py test/api/runtimes_api_test.py test/api/schemas_api_test.py -test/api/webscript_functions_api_test.py +test/api/webscripts_api_test.py test/conftest.py test/openapi.py test/types/__init__.py test/types/active_event_data_stub.py test/types/active_event_sse_event_stub.py test/types/active_event_sse_stub.py +test/types/alt_embedded_version_i_kfserving_response_v2_stub.py +test/types/alt_embedded_version_i_plug_response_v2_stub.py +test/types/alt_embedded_version_i_webscript_response_with_invoke_link_v2_stub.py test/types/alt_version_hal_link_stub.py test/types/any_function_response_stub.py test/types/any_job_for_function_stub.py @@ -434,10 +433,8 @@ test/types/asset_summary_stub.py test/types/asset_summary_with_hal_link_links_stub.py test/types/asset_summary_with_hal_link_stub.py test/types/assets_conditions_stub.py -test/types/async_deploy_query_stub.py test/types/async_deploy_query_v1_stub.py test/types/async_query_default_false_stub.py -test/types/async_query_default_true_stub.py test/types/async_verify_query_stub.py test/types/batch_args_stub.py test/types/batch_job_status_stub.py @@ -458,17 +455,18 @@ test/types/completed_event_sse_event_stub.py test/types/completed_event_sse_stub.py test/types/content_query_v2_stub.py test/types/content_validation_listing_stub.py +test/types/create_function_query_v2_copy_stub.py test/types/create_function_query_v2_stub.py test/types/create_kf_serving_async_response_stub.py test/types/create_plug_async_response_stub.py test/types/create_webscript_async_response_stub.py +test/types/create_webscripts_copy_parameter_stub.py test/types/delayed_event_data_stub.py test/types/delayed_event_sse_event_stub.py test/types/delayed_event_sse_stub.py test/types/deploy1_stub.py test/types/deploy_args_deploy_spec_overrides_stub.py test/types/deploy_args_stub.py -test/types/deploy_attributes_filter_stub.py test/types/deploy_job_status_stub.py test/types/deploy_result_stub.py test/types/deploy_spec_openfaas_spec_stub.py @@ -476,12 +474,12 @@ test/types/deploy_spec_stub.py test/types/deploy_stub.py test/types/deploy_type_stub.py test/types/deprecate_previous_policy_stub.py -test/types/deprecate_previous_query_stub.py -test/types/deprecated_draft_filter_stub.py test/types/documentation_property_stub.py test/types/documentation_stub.py -test/types/dry_run_query_stub.py test/types/entity_response_stub.py +test/types/entity_with_links_i_kfserving_response_v2_stub.py +test/types/entity_with_links_i_plug_response_v2_stub.py +test/types/entity_with_links_i_webscript_response_with_invoke_link_v2_stub.py test/types/error_and_status_response_stub.py test/types/error_response_stub.py test/types/event_ack_stub.py @@ -490,6 +488,7 @@ test/types/event_keep_alive_stub.py test/types/event_sse_stub.py test/types/event_type_sse_stub.py test/types/event_with_close_sse_stub.py +test/types/example_reference_stub.py test/types/exposed_openfaas_deploy_spec_stub.py test/types/failed_event_data_stub.py test/types/failed_event_sse_event_stub.py @@ -497,10 +496,8 @@ test/types/failed_event_sse_stub.py test/types/failure_reason_stub.py test/types/file_upload_stub.py test/types/force_delete_query_v1_stub.py -test/types/function_delete_query_stub.py test/types/function_deploy_overrides_stub.py test/types/function_deploy_overrides_type_stub.py -test/types/function_entity_query_stub.py test/types/function_job_args_stub.py test/types/function_manifest_stub.py test/types/function_meta_stub.py @@ -508,7 +505,6 @@ test/types/function_name_version_stub.py test/types/function_ref_stub.py test/types/function_spec_stub.py test/types/function_type_stub.py -test/types/function_version_query_stub.py test/types/get_content_params_v2_stub.py test/types/get_invokable_webscript_query_stub.py test/types/get_model_response_v2_stub.py @@ -570,6 +566,7 @@ test/types/job_submitted_response_stub.py test/types/job_type_batch_stub.py test/types/job_type_build_stub.py test/types/job_type_deploy_stub.py +test/types/job_type_notify_stub.py test/types/job_type_scale_stub.py test/types/job_type_schema_stub.py test/types/job_type_stub.py @@ -599,19 +596,17 @@ test/types/kf_serving_response_stub.py test/types/kf_serving_versions_query_v1_stub.py test/types/kfserving_response_v2_stub.py test/types/language_release_stub.py +test/types/latest_function_versions_query_show_related_stub.py test/types/latest_function_versions_query_stub.py test/types/latest_functions_query_stub.py -test/types/latest_models_response_v2_entities_inner_stub.py test/types/latest_models_response_v2_stub.py test/types/latest_plug_query_stub.py test/types/latest_plug_version_query_v2_stub.py test/types/latest_plug_versions_query_stub.py test/types/latest_plug_versions_query_v2_stub.py test/types/latest_plugs_query_stub.py -test/types/latest_plugs_response_v2_entities_inner_stub.py test/types/latest_plugs_response_v2_stub.py test/types/latest_version_level_stub.py -test/types/latest_webscripts_response_v2_entities_inner_stub.py test/types/latest_webscripts_response_v2_stub.py test/types/legacy_configuration_object_format_stub.py test/types/legacy_configuration_object_stub.py @@ -639,7 +634,6 @@ test/types/legacy_plug_script_meta_stub.py test/types/legacy_plug_script_response_stub.py test/types/legacy_required_properties_inner_stub.py test/types/legacy_required_property_object_stub.py -test/types/limit_query_stub.py test/types/media_type_stub.py test/types/message_and_status_response_stub.py test/types/message_response_stub.py @@ -647,10 +641,8 @@ test/types/model1_stub.py test/types/model2_stub.py test/types/model_stub.py test/types/model_versions_response_v2_stub.py -test/types/multipart_file_upload_stub.py test/types/name_and_version_stub.py test/types/name_stub.py -test/types/named_function_versions_query_stub.py test/types/named_kf_serving_versions_query_v2_stub.py test/types/named_parameters_typeof_as_job_reference_job_status_stub.py test/types/named_parameters_typeof_as_job_reference_stub.py @@ -658,14 +650,13 @@ test/types/named_parameters_typeof_from_legacy_documentation_stub.py test/types/named_parameters_typeof_from_legacy_stub.py test/types/named_parameters_typeof_is_not_legacy_stub.py test/types/named_plug_versions_query_v2_stub.py -test/types/named_versions_filter_stub.py test/types/named_webscript_versions_query_v2_stub.py +test/types/notify_result_stub.py test/types/openfaas_deploy_args_stub.py test/types/openfaas_function_ref_stub.py test/types/operation_status_error_stub.py test/types/operation_status_stub.py test/types/operation_stub.py -test/types/paging_query_stub.py test/types/paging_response_stub.py test/types/parent_keys_stub.py test/types/patch_interface_query_stub.py @@ -674,7 +665,6 @@ test/types/patch_plug_request_v1_stub.py test/types/plug1_stub.py test/types/plug2_stub.py test/types/plug_delete_force_query_stub.py -test/types/plug_delete_query_stub.py test/types/plug_interface_stub.py test/types/plug_listing_and_query_response_stub.py test/types/plug_listing_response_stub.py @@ -687,7 +677,6 @@ test/types/plug_property_stub.py test/types/plug_response_stub.py test/types/plug_response_v2_stub.py test/types/plug_stub.py -test/types/plug_type_query_stub.py test/types/plug_type_stub.py test/types/plug_versions_response_v2_stub.py test/types/post_model_job_async_response_v2_stub.py @@ -705,13 +694,14 @@ test/types/rebuild_model_sync_response_v2_stub.py test/types/rebuild_plug_async_response_v2_stub.py test/types/rebuild_plug_sync_response_v2_stub.py test/types/rebuild_policy_stub.py -test/types/rebuild_query_params_stub.py test/types/rebuild_query_v2_stub.py test/types/rebuild_submitted_response_stub.py test/types/rebuild_webscript_async_response_v2_stub.py test/types/rebuild_webscript_sync_response_v2_stub.py +test/types/registry_error_response_stub.py test/types/remove_function_query_v2_stub.py test/types/remove_plug_query_v2_stub.py +test/types/request_deploy_query_stub.py test/types/request_operation_stub.py test/types/resource_limits_stub.py test/types/root_page_response_stub.py @@ -741,7 +731,9 @@ test/types/scale_type_stub.py test/types/schema_by_id_params_stub.py test/types/schema_params_stub.py test/types/semantic_version_range_stub.py +test/types/show_related_type_stub.py test/types/status_any_stub.py +test/types/status_exclude_stub.py test/types/status_filter_stub.py test/types/status_include_stub.py test/types/status_response_stub.py @@ -752,7 +744,6 @@ test/types/supported_events_stub.py test/types/tag_query_stub.py test/types/tag_stub.py test/types/tags_filter_stub.py -test/types/tags_query_stub.py test/types/timestamp_absolute_stub.py test/types/timestamp_age_stub.py test/types/timestamp_spec_stub.py @@ -765,7 +756,6 @@ test/types/undeploy_submitted_response_v2_stub.py test/types/undeploy_type_stub.py test/types/undeployed_response_v2_stub.py test/types/unhealthy_invokable_webscript_error_stub.py -test/types/update_comment_stub.py test/types/update_draft_query_stub.py test/types/update_metadata_request_v1_stub.py test/types/update_metadata_request_v2_stub.py @@ -782,7 +772,6 @@ test/types/verify_stub.py test/types/verify_type_stub.py test/types/verify_webscript_sync_response_v2_stub.py test/types/version_includes_stub.py -test/types/versions_query_stub.py test/types/versions_query_v2_stub.py test/types/versions_response_v2_stub.py test/types/waiting_children_event_sse_event_stub.py @@ -802,6 +791,9 @@ test/types/webscript_response_with_invoke_link_v2_stub.py test/types/webscript_stub.py test/types/webscript_versions_response_v2_stub.py test/types/with_asset_hal_link_stub.py +test/types/with_embedded_alt_versions_i_kfserving_response_v2_stub.py +test/types/with_embedded_alt_versions_i_plug_response_v2_stub.py +test/types/with_embedded_alt_versions_i_webscript_response_with_invoke_link_v2_stub.py test/types/with_entity_attributes_stub.py test/types/with_limit_stub.py test/types/with_paging_stub.py diff --git a/README.md b/README.md index 8bbed2d5..ebf26c2e 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ V2 API to build and deploy Waylay functions (plugs, webscripts, BYOML models). This Python package is automatically generated based on the -Waylay Registry OpenAPI specification (API version: 2.12.4) +Waylay Registry OpenAPI specification (API version: 2.13.0) For more information, please visit [the openapi specification](https://docs.waylay.io/openapi/public/redocly/registry.html). It consists of two sub-packages that are both plugins for the waylay-sdk-core package. @@ -51,7 +51,7 @@ For more information, please visit the [Waylay API documentation](https://docs.w ## Documentation for API Endpoints -All URIs are relative to *https://api.waylay.io* +All URIs are relative to *https://api-aws-dev.waylay.io* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- @@ -59,41 +59,41 @@ Class | Method | HTTP request | Description *JobsApi* | [**events**](docs/JobsApi.md#events) | **GET** /registry/v2/jobs/events | Stream Events *JobsApi* | [**get**](docs/JobsApi.md#get) | **GET** /registry/v2/jobs/{type}/{id} | Get Job *JobsApi* | [**list**](docs/JobsApi.md#list) | **GET** /registry/v2/jobs/ | List Jobs -*ModelFunctionsApi* | [**create**](docs/ModelFunctionsApi.md#create) | **POST** /registry/v2/models/ | Create Model -*ModelFunctionsApi* | [**delete_asset**](docs/ModelFunctionsApi.md#delete_asset) | **DELETE** /registry/v2/models/{name}/versions/{version}/content/{wildcard} | Delete Model Asset -*ModelFunctionsApi* | [**get_archive**](docs/ModelFunctionsApi.md#get_archive) | **GET** /registry/v2/models/{name}/versions/{version}/content | Get Model Archive -*ModelFunctionsApi* | [**get_asset**](docs/ModelFunctionsApi.md#get_asset) | **GET** /registry/v2/models/{name}/versions/{version}/content/{wildcard} | Get File From Model Archive -*ModelFunctionsApi* | [**get_latest**](docs/ModelFunctionsApi.md#get_latest) | **GET** /registry/v2/models/{name} | Get Latest Model Version -*ModelFunctionsApi* | [**get**](docs/ModelFunctionsApi.md#get) | **GET** /registry/v2/models/{name}/versions/{version} | Get Model Version -*ModelFunctionsApi* | [**jobs**](docs/ModelFunctionsApi.md#jobs) | **GET** /registry/v2/models/{name}/versions/{version}/jobs | List Model Jobs -*ModelFunctionsApi* | [**list**](docs/ModelFunctionsApi.md#list) | **GET** /registry/v2/models/ | List Models -*ModelFunctionsApi* | [**list_versions**](docs/ModelFunctionsApi.md#list_versions) | **GET** /registry/v2/models/{name}/versions | List Model Versions -*ModelFunctionsApi* | [**patch_metadata**](docs/ModelFunctionsApi.md#patch_metadata) | **PATCH** /registry/v2/models/{name}/versions/{version}/metadata | Patch Model Metadata -*ModelFunctionsApi* | [**publish**](docs/ModelFunctionsApi.md#publish) | **POST** /registry/v2/models/{name}/versions/{version}/publish | Publish Draft Model -*ModelFunctionsApi* | [**rebuild**](docs/ModelFunctionsApi.md#rebuild) | **POST** /registry/v2/models/{name}/versions/{version}/rebuild | Rebuild Model -*ModelFunctionsApi* | [**remove_version**](docs/ModelFunctionsApi.md#remove_version) | **DELETE** /registry/v2/models/{name}/versions/{version} | Remove Model Version -*ModelFunctionsApi* | [**remove_versions**](docs/ModelFunctionsApi.md#remove_versions) | **DELETE** /registry/v2/models/{name} | Remove Model -*ModelFunctionsApi* | [**update_asset**](docs/ModelFunctionsApi.md#update_asset) | **PUT** /registry/v2/models/{name}/versions/{version}/content/{wildcard} | Update Model Asset -*ModelFunctionsApi* | [**update_assets**](docs/ModelFunctionsApi.md#update_assets) | **PUT** /registry/v2/models/{name}/versions/{version}/content | Update Model Assets -*ModelFunctionsApi* | [**verify**](docs/ModelFunctionsApi.md#verify) | **POST** /registry/v2/models/{name}/versions/{version}/verify | Verify Health Of Model -*PlugFunctionsApi* | [**create**](docs/PlugFunctionsApi.md#create) | **POST** /registry/v2/plugs/ | Create Plug -*PlugFunctionsApi* | [**delete_asset**](docs/PlugFunctionsApi.md#delete_asset) | **DELETE** /registry/v2/plugs/{name}/versions/{version}/content/{wildcard} | Delete Plug Asset -*PlugFunctionsApi* | [**get_archive**](docs/PlugFunctionsApi.md#get_archive) | **GET** /registry/v2/plugs/{name}/versions/{version}/content | Get Plug Archive -*PlugFunctionsApi* | [**get_asset**](docs/PlugFunctionsApi.md#get_asset) | **GET** /registry/v2/plugs/{name}/versions/{version}/content/{wildcard} | Get File From Plug Archive -*PlugFunctionsApi* | [**get_latest**](docs/PlugFunctionsApi.md#get_latest) | **GET** /registry/v2/plugs/{name} | Get Latest Plug Version -*PlugFunctionsApi* | [**get**](docs/PlugFunctionsApi.md#get) | **GET** /registry/v2/plugs/{name}/versions/{version} | Get Plug Version -*PlugFunctionsApi* | [**jobs**](docs/PlugFunctionsApi.md#jobs) | **GET** /registry/v2/plugs/{name}/versions/{version}/jobs | List Plug Jobs -*PlugFunctionsApi* | [**list**](docs/PlugFunctionsApi.md#list) | **GET** /registry/v2/plugs/ | List Plugs -*PlugFunctionsApi* | [**list_versions**](docs/PlugFunctionsApi.md#list_versions) | **GET** /registry/v2/plugs/{name}/versions | List Plug Versions -*PlugFunctionsApi* | [**patch_interface**](docs/PlugFunctionsApi.md#patch_interface) | **PATCH** /registry/v2/plugs/{name}/versions/{version}/interface | Patch Plug Interface -*PlugFunctionsApi* | [**patch_metadata**](docs/PlugFunctionsApi.md#patch_metadata) | **PATCH** /registry/v2/plugs/{name}/versions/{version}/metadata | Patch Plug Metadata -*PlugFunctionsApi* | [**publish**](docs/PlugFunctionsApi.md#publish) | **POST** /registry/v2/plugs/{name}/versions/{version}/publish | Publish Draft Plug -*PlugFunctionsApi* | [**rebuild**](docs/PlugFunctionsApi.md#rebuild) | **POST** /registry/v2/plugs/{name}/versions/{version}/rebuild | Rebuild Plug -*PlugFunctionsApi* | [**remove_version**](docs/PlugFunctionsApi.md#remove_version) | **DELETE** /registry/v2/plugs/{name}/versions/{version} | Remove Plug Version -*PlugFunctionsApi* | [**remove_versions**](docs/PlugFunctionsApi.md#remove_versions) | **DELETE** /registry/v2/plugs/{name} | Remove Plug -*PlugFunctionsApi* | [**update_asset**](docs/PlugFunctionsApi.md#update_asset) | **PUT** /registry/v2/plugs/{name}/versions/{version}/content/{wildcard} | Update Plug Asset -*PlugFunctionsApi* | [**update_assets**](docs/PlugFunctionsApi.md#update_assets) | **PUT** /registry/v2/plugs/{name}/versions/{version}/content | Update Plug Assets -*PlugFunctionsApi* | [**verify**](docs/PlugFunctionsApi.md#verify) | **POST** /registry/v2/plugs/{name}/versions/{version}/verify | Verify Health Of Plug +*ModelsApi* | [**create**](docs/ModelsApi.md#create) | **POST** /registry/v2/models/ | Create Model +*ModelsApi* | [**delete_asset**](docs/ModelsApi.md#delete_asset) | **DELETE** /registry/v2/models/{name}/versions/{version}/content/{wildcard} | Delete Model Asset +*ModelsApi* | [**get_archive**](docs/ModelsApi.md#get_archive) | **GET** /registry/v2/models/{name}/versions/{version}/content | Get Model Archive +*ModelsApi* | [**get_asset**](docs/ModelsApi.md#get_asset) | **GET** /registry/v2/models/{name}/versions/{version}/content/{wildcard} | Get File From Model Archive +*ModelsApi* | [**get_latest**](docs/ModelsApi.md#get_latest) | **GET** /registry/v2/models/{name} | Get Latest Model Version +*ModelsApi* | [**get**](docs/ModelsApi.md#get) | **GET** /registry/v2/models/{name}/versions/{version} | Get Model Version +*ModelsApi* | [**jobs**](docs/ModelsApi.md#jobs) | **GET** /registry/v2/models/{name}/versions/{version}/jobs | List Model Jobs +*ModelsApi* | [**list**](docs/ModelsApi.md#list) | **GET** /registry/v2/models/ | List Models +*ModelsApi* | [**list_versions**](docs/ModelsApi.md#list_versions) | **GET** /registry/v2/models/{name}/versions | List Model Versions +*ModelsApi* | [**patch_metadata**](docs/ModelsApi.md#patch_metadata) | **PATCH** /registry/v2/models/{name}/versions/{version}/metadata | Patch Model Metadata +*ModelsApi* | [**publish**](docs/ModelsApi.md#publish) | **POST** /registry/v2/models/{name}/versions/{version}/publish | Publish Draft Model +*ModelsApi* | [**rebuild**](docs/ModelsApi.md#rebuild) | **POST** /registry/v2/models/{name}/versions/{version}/rebuild | Rebuild Model +*ModelsApi* | [**remove_version**](docs/ModelsApi.md#remove_version) | **DELETE** /registry/v2/models/{name}/versions/{version} | Remove Model Version +*ModelsApi* | [**remove_versions**](docs/ModelsApi.md#remove_versions) | **DELETE** /registry/v2/models/{name} | Remove Model +*ModelsApi* | [**update_asset**](docs/ModelsApi.md#update_asset) | **PUT** /registry/v2/models/{name}/versions/{version}/content/{wildcard} | Update Model Asset +*ModelsApi* | [**update_assets**](docs/ModelsApi.md#update_assets) | **PUT** /registry/v2/models/{name}/versions/{version}/content | Update Model Assets +*ModelsApi* | [**verify**](docs/ModelsApi.md#verify) | **POST** /registry/v2/models/{name}/versions/{version}/verify | Verify Health Of Model +*PlugsApi* | [**create**](docs/PlugsApi.md#create) | **POST** /registry/v2/plugs/ | Create Plug +*PlugsApi* | [**delete_asset**](docs/PlugsApi.md#delete_asset) | **DELETE** /registry/v2/plugs/{name}/versions/{version}/content/{wildcard} | Delete Plug Asset +*PlugsApi* | [**get_archive**](docs/PlugsApi.md#get_archive) | **GET** /registry/v2/plugs/{name}/versions/{version}/content | Get Plug Archive +*PlugsApi* | [**get_asset**](docs/PlugsApi.md#get_asset) | **GET** /registry/v2/plugs/{name}/versions/{version}/content/{wildcard} | Get File From Plug Archive +*PlugsApi* | [**get_latest**](docs/PlugsApi.md#get_latest) | **GET** /registry/v2/plugs/{name} | Get Latest Plug Version +*PlugsApi* | [**get**](docs/PlugsApi.md#get) | **GET** /registry/v2/plugs/{name}/versions/{version} | Get Plug Version +*PlugsApi* | [**jobs**](docs/PlugsApi.md#jobs) | **GET** /registry/v2/plugs/{name}/versions/{version}/jobs | List Plug Jobs +*PlugsApi* | [**list**](docs/PlugsApi.md#list) | **GET** /registry/v2/plugs/ | List Plugs +*PlugsApi* | [**list_versions**](docs/PlugsApi.md#list_versions) | **GET** /registry/v2/plugs/{name}/versions | List Plug Versions +*PlugsApi* | [**patch_interface**](docs/PlugsApi.md#patch_interface) | **PATCH** /registry/v2/plugs/{name}/versions/{version}/interface | Patch Plug Interface +*PlugsApi* | [**patch_metadata**](docs/PlugsApi.md#patch_metadata) | **PATCH** /registry/v2/plugs/{name}/versions/{version}/metadata | Patch Plug Metadata +*PlugsApi* | [**publish**](docs/PlugsApi.md#publish) | **POST** /registry/v2/plugs/{name}/versions/{version}/publish | Publish Draft Plug +*PlugsApi* | [**rebuild**](docs/PlugsApi.md#rebuild) | **POST** /registry/v2/plugs/{name}/versions/{version}/rebuild | Rebuild Plug +*PlugsApi* | [**remove_version**](docs/PlugsApi.md#remove_version) | **DELETE** /registry/v2/plugs/{name}/versions/{version} | Remove Plug Version +*PlugsApi* | [**remove_versions**](docs/PlugsApi.md#remove_versions) | **DELETE** /registry/v2/plugs/{name} | Remove Plug +*PlugsApi* | [**update_asset**](docs/PlugsApi.md#update_asset) | **PUT** /registry/v2/plugs/{name}/versions/{version}/content/{wildcard} | Update Plug Asset +*PlugsApi* | [**update_assets**](docs/PlugsApi.md#update_assets) | **PUT** /registry/v2/plugs/{name}/versions/{version}/content | Update Plug Assets +*PlugsApi* | [**verify**](docs/PlugsApi.md#verify) | **POST** /registry/v2/plugs/{name}/versions/{version}/verify | Verify Health Of Plug *RuntimesApi* | [**example_archive**](docs/RuntimesApi.md#example_archive) | **GET** /registry/v2/runtimes/{name}/versions/{version}/example | Get Runtime Example Archive *RuntimesApi* | [**get_example_asset**](docs/RuntimesApi.md#get_example_asset) | **GET** /registry/v2/runtimes/{name}/versions/{version}/example/{wildcard} | Get File From Runtime Example Archive *RuntimesApi* | [**get_latest**](docs/RuntimesApi.md#get_latest) | **GET** /registry/v2/runtimes/{name} | Get Latest Runtime Version @@ -102,23 +102,23 @@ Class | Method | HTTP request | Description *RuntimesApi* | [**list_versions**](docs/RuntimesApi.md#list_versions) | **GET** /registry/v2/runtimes/{name}/versions | List Runtime Versions *SchemasApi* | [**get_by_role**](docs/SchemasApi.md#get_by_role) | **GET** /registry/v2/schemas/{functionType}/{role}/schema | Get Asset Schema *SchemasApi* | [**get**](docs/SchemasApi.md#get) | **GET** /registry/v2/schemas/{schemaId} | Get Asset Schema -*WebscriptFunctionsApi* | [**create**](docs/WebscriptFunctionsApi.md#create) | **POST** /registry/v2/webscripts/ | Create Webscript Version -*WebscriptFunctionsApi* | [**delete_asset**](docs/WebscriptFunctionsApi.md#delete_asset) | **DELETE** /registry/v2/webscripts/{name}/versions/{version}/content/{wildcard} | Delete Webscript Asset -*WebscriptFunctionsApi* | [**get_archive**](docs/WebscriptFunctionsApi.md#get_archive) | **GET** /registry/v2/webscripts/{name}/versions/{version}/content | Get Webscript Archive -*WebscriptFunctionsApi* | [**get_asset**](docs/WebscriptFunctionsApi.md#get_asset) | **GET** /registry/v2/webscripts/{name}/versions/{version}/content/{wildcard} | Get File From Webscript Archive -*WebscriptFunctionsApi* | [**get_latest**](docs/WebscriptFunctionsApi.md#get_latest) | **GET** /registry/v2/webscripts/{name} | Get Latest Webscript Version -*WebscriptFunctionsApi* | [**get**](docs/WebscriptFunctionsApi.md#get) | **GET** /registry/v2/webscripts/{name}/versions/{version} | Get Webscript Version -*WebscriptFunctionsApi* | [**jobs**](docs/WebscriptFunctionsApi.md#jobs) | **GET** /registry/v2/webscripts/{name}/versions/{version}/jobs | List Webscript Jobs -*WebscriptFunctionsApi* | [**list_versions**](docs/WebscriptFunctionsApi.md#list_versions) | **GET** /registry/v2/webscripts/{name}/versions | List Webscript Versions -*WebscriptFunctionsApi* | [**list**](docs/WebscriptFunctionsApi.md#list) | **GET** /registry/v2/webscripts/ | List Webscripts -*WebscriptFunctionsApi* | [**patch_metadata**](docs/WebscriptFunctionsApi.md#patch_metadata) | **PATCH** /registry/v2/webscripts/{name}/versions/{version}/metadata | Patch Webscript Metadata -*WebscriptFunctionsApi* | [**publish**](docs/WebscriptFunctionsApi.md#publish) | **POST** /registry/v2/webscripts/{name}/versions/{version}/publish | Publish Draft Webscript -*WebscriptFunctionsApi* | [**rebuild**](docs/WebscriptFunctionsApi.md#rebuild) | **POST** /registry/v2/webscripts/{name}/versions/{version}/rebuild | Rebuild Webscript -*WebscriptFunctionsApi* | [**remove_version**](docs/WebscriptFunctionsApi.md#remove_version) | **DELETE** /registry/v2/webscripts/{name}/versions/{version} | Remove Webscript Version -*WebscriptFunctionsApi* | [**remove_versions**](docs/WebscriptFunctionsApi.md#remove_versions) | **DELETE** /registry/v2/webscripts/{name} | Remove Webscript -*WebscriptFunctionsApi* | [**update_asset**](docs/WebscriptFunctionsApi.md#update_asset) | **PUT** /registry/v2/webscripts/{name}/versions/{version}/content/{wildcard} | Update Webscript Asset -*WebscriptFunctionsApi* | [**update_assets**](docs/WebscriptFunctionsApi.md#update_assets) | **PUT** /registry/v2/webscripts/{name}/versions/{version}/content | Update Webscript Assets -*WebscriptFunctionsApi* | [**verify**](docs/WebscriptFunctionsApi.md#verify) | **POST** /registry/v2/webscripts/{name}/versions/{version}/verify | Verify Health Of Webscript +*WebscriptsApi* | [**create**](docs/WebscriptsApi.md#create) | **POST** /registry/v2/webscripts/ | Create Webscript Version +*WebscriptsApi* | [**delete_asset**](docs/WebscriptsApi.md#delete_asset) | **DELETE** /registry/v2/webscripts/{name}/versions/{version}/content/{wildcard} | Delete Webscript Asset +*WebscriptsApi* | [**get_archive**](docs/WebscriptsApi.md#get_archive) | **GET** /registry/v2/webscripts/{name}/versions/{version}/content | Get Webscript Archive +*WebscriptsApi* | [**get_asset**](docs/WebscriptsApi.md#get_asset) | **GET** /registry/v2/webscripts/{name}/versions/{version}/content/{wildcard} | Get File From Webscript Archive +*WebscriptsApi* | [**get_latest**](docs/WebscriptsApi.md#get_latest) | **GET** /registry/v2/webscripts/{name} | Get Latest Webscript Version +*WebscriptsApi* | [**get**](docs/WebscriptsApi.md#get) | **GET** /registry/v2/webscripts/{name}/versions/{version} | Get Webscript Version +*WebscriptsApi* | [**jobs**](docs/WebscriptsApi.md#jobs) | **GET** /registry/v2/webscripts/{name}/versions/{version}/jobs | List Webscript Jobs +*WebscriptsApi* | [**list_versions**](docs/WebscriptsApi.md#list_versions) | **GET** /registry/v2/webscripts/{name}/versions | List Webscript Versions +*WebscriptsApi* | [**list**](docs/WebscriptsApi.md#list) | **GET** /registry/v2/webscripts/ | List Webscripts +*WebscriptsApi* | [**patch_metadata**](docs/WebscriptsApi.md#patch_metadata) | **PATCH** /registry/v2/webscripts/{name}/versions/{version}/metadata | Patch Webscript Metadata +*WebscriptsApi* | [**publish**](docs/WebscriptsApi.md#publish) | **POST** /registry/v2/webscripts/{name}/versions/{version}/publish | Publish Draft Webscript +*WebscriptsApi* | [**rebuild**](docs/WebscriptsApi.md#rebuild) | **POST** /registry/v2/webscripts/{name}/versions/{version}/rebuild | Rebuild Webscript +*WebscriptsApi* | [**remove_version**](docs/WebscriptsApi.md#remove_version) | **DELETE** /registry/v2/webscripts/{name}/versions/{version} | Remove Webscript Version +*WebscriptsApi* | [**remove_versions**](docs/WebscriptsApi.md#remove_versions) | **DELETE** /registry/v2/webscripts/{name} | Remove Webscript +*WebscriptsApi* | [**update_asset**](docs/WebscriptsApi.md#update_asset) | **PUT** /registry/v2/webscripts/{name}/versions/{version}/content/{wildcard} | Update Webscript Asset +*WebscriptsApi* | [**update_assets**](docs/WebscriptsApi.md#update_assets) | **PUT** /registry/v2/webscripts/{name}/versions/{version}/content | Update Webscript Assets +*WebscriptsApi* | [**verify**](docs/WebscriptsApi.md#verify) | **POST** /registry/v2/webscripts/{name}/versions/{version}/verify | Verify Health Of Webscript ## Documentation For Models @@ -126,6 +126,9 @@ Class | Method | HTTP request | Description - [ActiveEventData](docs/ActiveEventData.md) - [ActiveEventSSE](docs/ActiveEventSSE.md) - [ActiveEventSSEEvent](docs/ActiveEventSSEEvent.md) + - [AltEmbeddedVersionIKfservingResponseV2](docs/AltEmbeddedVersionIKfservingResponseV2.md) + - [AltEmbeddedVersionIPlugResponseV2](docs/AltEmbeddedVersionIPlugResponseV2.md) + - [AltEmbeddedVersionIWebscriptResponseWithInvokeLinkV2](docs/AltEmbeddedVersionIWebscriptResponseWithInvokeLinkV2.md) - [AltVersionHALLink](docs/AltVersionHALLink.md) - [AnyFunctionResponse](docs/AnyFunctionResponse.md) - [AnyJobForFunction](docs/AnyJobForFunction.md) @@ -142,10 +145,8 @@ Class | Method | HTTP request | Description - [AssetSummaryWithHALLink](docs/AssetSummaryWithHALLink.md) - [AssetSummaryWithHALLinkLinks](docs/AssetSummaryWithHALLinkLinks.md) - [AssetsConditions](docs/AssetsConditions.md) - - [AsyncDeployQuery](docs/AsyncDeployQuery.md) - [AsyncDeployQueryV1](docs/AsyncDeployQueryV1.md) - [AsyncQueryDefaultFalse](docs/AsyncQueryDefaultFalse.md) - - [AsyncQueryDefaultTrue](docs/AsyncQueryDefaultTrue.md) - [AsyncVerifyQuery](docs/AsyncVerifyQuery.md) - [Batch](docs/Batch.md) - [BatchArgs](docs/BatchArgs.md) @@ -167,9 +168,11 @@ Class | Method | HTTP request | Description - [ContentQueryV2](docs/ContentQueryV2.md) - [ContentValidationListing](docs/ContentValidationListing.md) - [CreateFunctionQueryV2](docs/CreateFunctionQueryV2.md) + - [CreateFunctionQueryV2Copy](docs/CreateFunctionQueryV2Copy.md) - [CreateKFServingAsyncResponse](docs/CreateKFServingAsyncResponse.md) - [CreatePlugAsyncResponse](docs/CreatePlugAsyncResponse.md) - [CreateWebscriptAsyncResponse](docs/CreateWebscriptAsyncResponse.md) + - [CreateWebscriptsCopyParameter](docs/CreateWebscriptsCopyParameter.md) - [DelayedEventData](docs/DelayedEventData.md) - [DelayedEventSSE](docs/DelayedEventSSE.md) - [DelayedEventSSEEvent](docs/DelayedEventSSEEvent.md) @@ -177,19 +180,18 @@ Class | Method | HTTP request | Description - [Deploy1](docs/Deploy1.md) - [DeployArgs](docs/DeployArgs.md) - [DeployArgsDeploySpecOverrides](docs/DeployArgsDeploySpecOverrides.md) - - [DeployAttributesFilter](docs/DeployAttributesFilter.md) - [DeployJobStatus](docs/DeployJobStatus.md) - [DeployResult](docs/DeployResult.md) - [DeploySpec](docs/DeploySpec.md) - [DeploySpecOpenfaasSpec](docs/DeploySpecOpenfaasSpec.md) - [DeployType](docs/DeployType.md) - [DeprecatePreviousPolicy](docs/DeprecatePreviousPolicy.md) - - [DeprecatePreviousQuery](docs/DeprecatePreviousQuery.md) - - [DeprecatedDraftFilter](docs/DeprecatedDraftFilter.md) - [Documentation](docs/Documentation.md) - [DocumentationProperty](docs/DocumentationProperty.md) - - [DryRunQuery](docs/DryRunQuery.md) - [EntityResponse](docs/EntityResponse.md) + - [EntityWithLinksIKfservingResponseV2](docs/EntityWithLinksIKfservingResponseV2.md) + - [EntityWithLinksIPlugResponseV2](docs/EntityWithLinksIPlugResponseV2.md) + - [EntityWithLinksIWebscriptResponseWithInvokeLinkV2](docs/EntityWithLinksIWebscriptResponseWithInvokeLinkV2.md) - [ErrorAndStatusResponse](docs/ErrorAndStatusResponse.md) - [ErrorResponse](docs/ErrorResponse.md) - [EventAck](docs/EventAck.md) @@ -198,6 +200,7 @@ Class | Method | HTTP request | Description - [EventSSE](docs/EventSSE.md) - [EventTypeSSE](docs/EventTypeSSE.md) - [EventWithCloseSSE](docs/EventWithCloseSSE.md) + - [ExampleReference](docs/ExampleReference.md) - [ExposedOpenfaasDeploySpec](docs/ExposedOpenfaasDeploySpec.md) - [FailedEventData](docs/FailedEventData.md) - [FailedEventSSE](docs/FailedEventSSE.md) @@ -205,10 +208,8 @@ Class | Method | HTTP request | Description - [FailureReason](docs/FailureReason.md) - [FileUpload](docs/FileUpload.md) - [ForceDeleteQueryV1](docs/ForceDeleteQueryV1.md) - - [FunctionDeleteQuery](docs/FunctionDeleteQuery.md) - [FunctionDeployOverrides](docs/FunctionDeployOverrides.md) - [FunctionDeployOverridesType](docs/FunctionDeployOverridesType.md) - - [FunctionEntityQuery](docs/FunctionEntityQuery.md) - [FunctionJobArgs](docs/FunctionJobArgs.md) - [FunctionManifest](docs/FunctionManifest.md) - [FunctionMeta](docs/FunctionMeta.md) @@ -216,7 +217,6 @@ Class | Method | HTTP request | Description - [FunctionRef](docs/FunctionRef.md) - [FunctionSpec](docs/FunctionSpec.md) - [FunctionType](docs/FunctionType.md) - - [FunctionVersionQuery](docs/FunctionVersionQuery.md) - [GetContentParamsV2](docs/GetContentParamsV2.md) - [GetInvokableWebscriptQuery](docs/GetInvokableWebscriptQuery.md) - [GetModelResponseV2](docs/GetModelResponseV2.md) @@ -279,6 +279,7 @@ Class | Method | HTTP request | Description - [JobTypeBatch](docs/JobTypeBatch.md) - [JobTypeBuild](docs/JobTypeBuild.md) - [JobTypeDeploy](docs/JobTypeDeploy.md) + - [JobTypeNotify](docs/JobTypeNotify.md) - [JobTypeScale](docs/JobTypeScale.md) - [JobTypeSchema](docs/JobTypeSchema.md) - [JobTypeUndeploy](docs/JobTypeUndeploy.md) @@ -308,19 +309,17 @@ Class | Method | HTTP request | Description - [KfservingResponseV2](docs/KfservingResponseV2.md) - [LanguageRelease](docs/LanguageRelease.md) - [LatestFunctionVersionsQuery](docs/LatestFunctionVersionsQuery.md) + - [LatestFunctionVersionsQueryShowRelated](docs/LatestFunctionVersionsQueryShowRelated.md) - [LatestFunctionsQuery](docs/LatestFunctionsQuery.md) - [LatestModelsResponseV2](docs/LatestModelsResponseV2.md) - - [LatestModelsResponseV2EntitiesInner](docs/LatestModelsResponseV2EntitiesInner.md) - [LatestPlugQuery](docs/LatestPlugQuery.md) - [LatestPlugVersionQueryV2](docs/LatestPlugVersionQueryV2.md) - [LatestPlugVersionsQuery](docs/LatestPlugVersionsQuery.md) - [LatestPlugVersionsQueryV2](docs/LatestPlugVersionsQueryV2.md) - [LatestPlugsQuery](docs/LatestPlugsQuery.md) - [LatestPlugsResponseV2](docs/LatestPlugsResponseV2.md) - - [LatestPlugsResponseV2EntitiesInner](docs/LatestPlugsResponseV2EntitiesInner.md) - [LatestVersionLevel](docs/LatestVersionLevel.md) - [LatestWebscriptsResponseV2](docs/LatestWebscriptsResponseV2.md) - - [LatestWebscriptsResponseV2EntitiesInner](docs/LatestWebscriptsResponseV2EntitiesInner.md) - [LegacyConfigurationObject](docs/LegacyConfigurationObject.md) - [LegacyConfigurationObjectFormat](docs/LegacyConfigurationObjectFormat.md) - [LegacyConfigurationResponseObject](docs/LegacyConfigurationResponseObject.md) @@ -347,7 +346,6 @@ Class | Method | HTTP request | Description - [LegacyPlugScriptResponse](docs/LegacyPlugScriptResponse.md) - [LegacyRequiredPropertiesInner](docs/LegacyRequiredPropertiesInner.md) - [LegacyRequiredPropertyObject](docs/LegacyRequiredPropertyObject.md) - - [LimitQuery](docs/LimitQuery.md) - [MediaType](docs/MediaType.md) - [MessageAndStatusResponse](docs/MessageAndStatusResponse.md) - [MessageResponse](docs/MessageResponse.md) @@ -355,10 +353,8 @@ Class | Method | HTTP request | Description - [Model1](docs/Model1.md) - [Model2](docs/Model2.md) - [ModelVersionsResponseV2](docs/ModelVersionsResponseV2.md) - - [MultipartFileUpload](docs/MultipartFileUpload.md) - [Name](docs/Name.md) - [NameAndVersion](docs/NameAndVersion.md) - - [NamedFunctionVersionsQuery](docs/NamedFunctionVersionsQuery.md) - [NamedKFServingVersionsQueryV2](docs/NamedKFServingVersionsQueryV2.md) - [NamedParametersTypeofAsJobReference](docs/NamedParametersTypeofAsJobReference.md) - [NamedParametersTypeofAsJobReferenceJobStatus](docs/NamedParametersTypeofAsJobReferenceJobStatus.md) @@ -366,14 +362,13 @@ Class | Method | HTTP request | Description - [NamedParametersTypeofFromLegacyDocumentation](docs/NamedParametersTypeofFromLegacyDocumentation.md) - [NamedParametersTypeofIsNotLegacy](docs/NamedParametersTypeofIsNotLegacy.md) - [NamedPlugVersionsQueryV2](docs/NamedPlugVersionsQueryV2.md) - - [NamedVersionsFilter](docs/NamedVersionsFilter.md) - [NamedWebscriptVersionsQueryV2](docs/NamedWebscriptVersionsQueryV2.md) + - [NotifyResult](docs/NotifyResult.md) - [OpenfaasDeployArgs](docs/OpenfaasDeployArgs.md) - [OpenfaasFunctionRef](docs/OpenfaasFunctionRef.md) - [Operation](docs/Operation.md) - [OperationStatus](docs/OperationStatus.md) - [OperationStatusError](docs/OperationStatusError.md) - - [PagingQuery](docs/PagingQuery.md) - [PagingResponse](docs/PagingResponse.md) - [ParentKeys](docs/ParentKeys.md) - [PatchInterfaceQuery](docs/PatchInterfaceQuery.md) @@ -383,7 +378,6 @@ Class | Method | HTTP request | Description - [Plug1](docs/Plug1.md) - [Plug2](docs/Plug2.md) - [PlugDeleteForceQuery](docs/PlugDeleteForceQuery.md) - - [PlugDeleteQuery](docs/PlugDeleteQuery.md) - [PlugInterface](docs/PlugInterface.md) - [PlugListingAndQueryResponse](docs/PlugListingAndQueryResponse.md) - [PlugListingResponse](docs/PlugListingResponse.md) @@ -396,7 +390,6 @@ Class | Method | HTTP request | Description - [PlugResponse](docs/PlugResponse.md) - [PlugResponseV2](docs/PlugResponseV2.md) - [PlugType](docs/PlugType.md) - - [PlugTypeQuery](docs/PlugTypeQuery.md) - [PlugVersionsResponseV2](docs/PlugVersionsResponseV2.md) - [PostModelJobAsyncResponseV2](docs/PostModelJobAsyncResponseV2.md) - [PostModelJobSyncResponseV2](docs/PostModelJobSyncResponseV2.md) @@ -413,13 +406,14 @@ Class | Method | HTTP request | Description - [RebuildPlugAsyncResponseV2](docs/RebuildPlugAsyncResponseV2.md) - [RebuildPlugSyncResponseV2](docs/RebuildPlugSyncResponseV2.md) - [RebuildPolicy](docs/RebuildPolicy.md) - - [RebuildQueryParams](docs/RebuildQueryParams.md) - [RebuildQueryV2](docs/RebuildQueryV2.md) - [RebuildSubmittedResponse](docs/RebuildSubmittedResponse.md) - [RebuildWebscriptAsyncResponseV2](docs/RebuildWebscriptAsyncResponseV2.md) - [RebuildWebscriptSyncResponseV2](docs/RebuildWebscriptSyncResponseV2.md) + - [RegistryErrorResponse](docs/RegistryErrorResponse.md) - [RemoveFunctionQueryV2](docs/RemoveFunctionQueryV2.md) - [RemovePlugQueryV2](docs/RemovePlugQueryV2.md) + - [RequestDeployQuery](docs/RequestDeployQuery.md) - [RequestOperation](docs/RequestOperation.md) - [ResourceLimits](docs/ResourceLimits.md) - [RootPageResponse](docs/RootPageResponse.md) @@ -449,8 +443,10 @@ Class | Method | HTTP request | Description - [SchemaByIdParams](docs/SchemaByIdParams.md) - [SchemaParams](docs/SchemaParams.md) - [SemanticVersionRange](docs/SemanticVersionRange.md) + - [ShowRelatedType](docs/ShowRelatedType.md) - [Status](docs/Status.md) - [StatusAny](docs/StatusAny.md) + - [StatusExclude](docs/StatusExclude.md) - [StatusFilter](docs/StatusFilter.md) - [StatusInclude](docs/StatusInclude.md) - [StatusResponse](docs/StatusResponse.md) @@ -460,7 +456,6 @@ Class | Method | HTTP request | Description - [Tag](docs/Tag.md) - [TagQuery](docs/TagQuery.md) - [TagsFilter](docs/TagsFilter.md) - - [TagsQuery](docs/TagsQuery.md) - [TimestampAbsolute](docs/TimestampAbsolute.md) - [TimestampAge](docs/TimestampAge.md) - [TimestampSpec](docs/TimestampSpec.md) @@ -473,7 +468,6 @@ Class | Method | HTTP request | Description - [UndeployType](docs/UndeployType.md) - [UndeployedResponseV2](docs/UndeployedResponseV2.md) - [UnhealthyInvokableWebscriptError](docs/UnhealthyInvokableWebscriptError.md) - - [UpdateComment](docs/UpdateComment.md) - [UpdateDraftQuery](docs/UpdateDraftQuery.md) - [UpdateMetadataRequestV1](docs/UpdateMetadataRequestV1.md) - [UpdateMetadataRequestV2](docs/UpdateMetadataRequestV2.md) @@ -490,7 +484,6 @@ Class | Method | HTTP request | Description - [VerifyType](docs/VerifyType.md) - [VerifyWebscriptSyncResponseV2](docs/VerifyWebscriptSyncResponseV2.md) - [VersionIncludes](docs/VersionIncludes.md) - - [VersionsQuery](docs/VersionsQuery.md) - [VersionsQueryV2](docs/VersionsQueryV2.md) - [VersionsResponseV2](docs/VersionsResponseV2.md) - [WaitingChildrenEventSSE](docs/WaitingChildrenEventSSE.md) @@ -510,6 +503,9 @@ Class | Method | HTTP request | Description - [WebscriptResponseWithInvokeLinkV2](docs/WebscriptResponseWithInvokeLinkV2.md) - [WebscriptVersionsResponseV2](docs/WebscriptVersionsResponseV2.md) - [WithAssetHALLink](docs/WithAssetHALLink.md) + - [WithEmbeddedAltVersionsIKfservingResponseV2](docs/WithEmbeddedAltVersionsIKfservingResponseV2.md) + - [WithEmbeddedAltVersionsIPlugResponseV2](docs/WithEmbeddedAltVersionsIPlugResponseV2.md) + - [WithEmbeddedAltVersionsIWebscriptResponseWithInvokeLinkV2](docs/WithEmbeddedAltVersionsIWebscriptResponseWithInvokeLinkV2.md) - [WithEntityAttributes](docs/WithEntityAttributes.md) - [WithLimit](docs/WithLimit.md) - [WithPaging](docs/WithPaging.md) diff --git a/docs/AboutApi.md b/docs/AboutApi.md index 82e14a1f..561abb04 100644 --- a/docs/AboutApi.md +++ b/docs/AboutApi.md @@ -1,6 +1,6 @@ # waylay.services.registry.AboutApi -All URIs are relative to *https://api.waylay.io* +All URIs are relative to *https://api-aws-dev.waylay.io* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/docs/AltEmbeddedVersionIKfservingResponseV2.md b/docs/AltEmbeddedVersionIKfservingResponseV2.md new file mode 100644 index 00000000..59d04fad --- /dev/null +++ b/docs/AltEmbeddedVersionIKfservingResponseV2.md @@ -0,0 +1,31 @@ +# AltEmbeddedVersionIKfservingResponseV2 + +Embedded representations of the _latest_ draft/published versions. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**draft** | [**KfservingResponseV2**](KfservingResponseV2.md) | | [optional] +**published** | [**KfservingResponseV2**](KfservingResponseV2.md) | | [optional] + +## Example + +```python +from waylay.services.registry.models.alt_embedded_version_i_kfserving_response_v2 import AltEmbeddedVersionIKfservingResponseV2 + +# TODO update the JSON string below +json = "{}" +# create an instance of AltEmbeddedVersionIKfservingResponseV2 from a JSON string +alt_embedded_version_i_kfserving_response_v2_instance = AltEmbeddedVersionIKfservingResponseV2.from_json(json) +# print the JSON string representation of the object +print AltEmbeddedVersionIKfservingResponseV2.to_json() + +# convert the object into a dict +alt_embedded_version_i_kfserving_response_v2_dict = alt_embedded_version_i_kfserving_response_v2_instance.to_dict() +# create an instance of AltEmbeddedVersionIKfservingResponseV2 from a dict +alt_embedded_version_i_kfserving_response_v2_form_dict = alt_embedded_version_i_kfserving_response_v2.from_dict(alt_embedded_version_i_kfserving_response_v2_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AltEmbeddedVersionIPlugResponseV2.md b/docs/AltEmbeddedVersionIPlugResponseV2.md new file mode 100644 index 00000000..56aba713 --- /dev/null +++ b/docs/AltEmbeddedVersionIPlugResponseV2.md @@ -0,0 +1,31 @@ +# AltEmbeddedVersionIPlugResponseV2 + +Embedded representations of the _latest_ draft/published versions. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**draft** | [**PlugResponseV2**](PlugResponseV2.md) | | [optional] +**published** | [**PlugResponseV2**](PlugResponseV2.md) | | [optional] + +## Example + +```python +from waylay.services.registry.models.alt_embedded_version_i_plug_response_v2 import AltEmbeddedVersionIPlugResponseV2 + +# TODO update the JSON string below +json = "{}" +# create an instance of AltEmbeddedVersionIPlugResponseV2 from a JSON string +alt_embedded_version_i_plug_response_v2_instance = AltEmbeddedVersionIPlugResponseV2.from_json(json) +# print the JSON string representation of the object +print AltEmbeddedVersionIPlugResponseV2.to_json() + +# convert the object into a dict +alt_embedded_version_i_plug_response_v2_dict = alt_embedded_version_i_plug_response_v2_instance.to_dict() +# create an instance of AltEmbeddedVersionIPlugResponseV2 from a dict +alt_embedded_version_i_plug_response_v2_form_dict = alt_embedded_version_i_plug_response_v2.from_dict(alt_embedded_version_i_plug_response_v2_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AltEmbeddedVersionIWebscriptResponseWithInvokeLinkV2.md b/docs/AltEmbeddedVersionIWebscriptResponseWithInvokeLinkV2.md new file mode 100644 index 00000000..b43c2a43 --- /dev/null +++ b/docs/AltEmbeddedVersionIWebscriptResponseWithInvokeLinkV2.md @@ -0,0 +1,31 @@ +# AltEmbeddedVersionIWebscriptResponseWithInvokeLinkV2 + +Embedded representations of the _latest_ draft/published versions. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**draft** | [**WebscriptResponseWithInvokeLinkV2**](WebscriptResponseWithInvokeLinkV2.md) | | [optional] +**published** | [**WebscriptResponseWithInvokeLinkV2**](WebscriptResponseWithInvokeLinkV2.md) | | [optional] + +## Example + +```python +from waylay.services.registry.models.alt_embedded_version_i_webscript_response_with_invoke_link_v2 import AltEmbeddedVersionIWebscriptResponseWithInvokeLinkV2 + +# TODO update the JSON string below +json = "{}" +# create an instance of AltEmbeddedVersionIWebscriptResponseWithInvokeLinkV2 from a JSON string +alt_embedded_version_i_webscript_response_with_invoke_link_v2_instance = AltEmbeddedVersionIWebscriptResponseWithInvokeLinkV2.from_json(json) +# print the JSON string representation of the object +print AltEmbeddedVersionIWebscriptResponseWithInvokeLinkV2.to_json() + +# convert the object into a dict +alt_embedded_version_i_webscript_response_with_invoke_link_v2_dict = alt_embedded_version_i_webscript_response_with_invoke_link_v2_instance.to_dict() +# create an instance of AltEmbeddedVersionIWebscriptResponseWithInvokeLinkV2 from a dict +alt_embedded_version_i_webscript_response_with_invoke_link_v2_form_dict = alt_embedded_version_i_webscript_response_with_invoke_link_v2.from_dict(alt_embedded_version_i_webscript_response_with_invoke_link_v2_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AnyJobResult.md b/docs/AnyJobResult.md index 163e4457..ceb5fafc 100644 --- a/docs/AnyJobResult.md +++ b/docs/AnyJobResult.md @@ -16,6 +16,7 @@ Name | Type | Description | Notes **registration** | **bool** | | **job_count** | **float** | | [optional] **scheduled_job** | [**JobReference**](JobReference.md) | | [optional] +**operation** | [**RequestOperation**](RequestOperation.md) | | ## Example diff --git a/docs/AsyncDeployQuery.md b/docs/AsyncDeployQuery.md deleted file mode 100644 index 0176b1a4..00000000 --- a/docs/AsyncDeployQuery.md +++ /dev/null @@ -1,32 +0,0 @@ -# AsyncDeployQuery - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**deprecate_previous** | [**DeprecatePreviousPolicy**](DeprecatePreviousPolicy.md) | | [optional] -**dry_run** | **bool** | If set to <code>true</code>, validates the deployment conditions, but does not change anything. | [optional] -**var_async** | **bool** | Unless this is set to <code>false</code>, the server will start the required job actions asynchronously and return a <code>202</code> <em>Accepted</em> response. If <code>false</code> the request will block until the job actions are completed, or a timeout occurs. | [optional] [default to True] -**scale_to_zero** | **bool** | If set to <code>true</code>, after successful deployment, the deployed function will be scaled to zero. Saves computing resources when the function is not to be used immediately. | [optional] [default to False] - -## Example - -```python -from waylay.services.registry.models.async_deploy_query import AsyncDeployQuery - -# TODO update the JSON string below -json = "{}" -# create an instance of AsyncDeployQuery from a JSON string -async_deploy_query_instance = AsyncDeployQuery.from_json(json) -# print the JSON string representation of the object -print AsyncDeployQuery.to_json() - -# convert the object into a dict -async_deploy_query_dict = async_deploy_query_instance.to_dict() -# create an instance of AsyncDeployQuery from a dict -async_deploy_query_form_dict = async_deploy_query.from_dict(async_deploy_query_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/AsyncDeployQueryV1.md b/docs/AsyncDeployQueryV1.md index d9db3b28..bb4cbcf4 100644 --- a/docs/AsyncDeployQueryV1.md +++ b/docs/AsyncDeployQueryV1.md @@ -5,9 +5,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**scale_to_zero** | **bool** | If set to <code>true</code>, after successful deployment, the deployed function will be scaled to zero. Saves computing resources when the function is not to be used immediately. | [optional] [default to False] **var_async** | **bool** | Unless this is set to <code>false</code>, the server will start the required job actions asynchronously and return a <code>202</code> <em>Accepted</em> response. If <code>false</code> the request will block until the job actions are completed, or a timeout occurs. | [optional] [default to True] **dry_run** | **bool** | If set to <code>true</code>, validates the deployment conditions, but does not change anything. | [optional] +**scale_to_zero** | **bool** | If set to <code>true</code>, after successful deployment, the deployed function will be scaled to zero. This saves computing resources when the function is not to be used immediately. | [optional] [default to False] ## Example diff --git a/docs/AsyncQueryDefaultTrue.md b/docs/AsyncQueryDefaultTrue.md deleted file mode 100644 index ed192c31..00000000 --- a/docs/AsyncQueryDefaultTrue.md +++ /dev/null @@ -1,29 +0,0 @@ -# AsyncQueryDefaultTrue - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**var_async** | **bool** | Unless this is set to <code>false</code>, the server will start the required job actions asynchronously and return a <code>202</code> <em>Accepted</em> response. If <code>false</code> the request will block until the job actions are completed, or a timeout occurs. | [optional] [default to True] - -## Example - -```python -from waylay.services.registry.models.async_query_default_true import AsyncQueryDefaultTrue - -# TODO update the JSON string below -json = "{}" -# create an instance of AsyncQueryDefaultTrue from a JSON string -async_query_default_true_instance = AsyncQueryDefaultTrue.from_json(json) -# print the JSON string representation of the object -print AsyncQueryDefaultTrue.to_json() - -# convert the object into a dict -async_query_default_true_dict = async_query_default_true_instance.to_dict() -# create an instance of AsyncQueryDefaultTrue from a dict -async_query_default_true_form_dict = async_query_default_true.from_dict(async_query_default_true_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/AsyncVerifyQuery.md b/docs/AsyncVerifyQuery.md index 5d20bd67..88b19280 100644 --- a/docs/AsyncVerifyQuery.md +++ b/docs/AsyncVerifyQuery.md @@ -5,9 +5,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**comment** | **str** | An optional user-specified comment corresponding to the operation. | [optional] -**var_async** | **bool** | Unless this is set to <code>false</code>, the server will start the required job actions asynchronously and return a <code>202</code> <em>Accepted</em> response. If <code>false</code> the request will block until the job actions are completed, or a timeout occurs. | [optional] [default to True] **scale_to_zero** | **bool** | Indicates whether the function needs to be scaled down after successful verification. If not set, the function is scaled to zero only if it was not active before this command. | [optional] +**var_async** | **bool** | Unless this is set to <code>false</code>, the server will start the required job actions asynchronously and return a <code>202</code> <em>Accepted</em> response. If <code>false</code> the request will block until the job actions are completed, or a timeout occurs. | [optional] [default to True] ## Example diff --git a/docs/BuildArgs.md b/docs/BuildArgs.md index 1d835f3a..68703c80 100644 --- a/docs/BuildArgs.md +++ b/docs/BuildArgs.md @@ -8,7 +8,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **runtime_name** | **str** | | **runtime_version** | **str** | A semantic version with _exactly_ a `major`, `minor` and `patch` specifier. No `pre-release` or `build` identifiers are allowed. See https://semver.org | -**revision** | **str** | The revision hash of the current (draft) function revision | [optional] +**revision** | **str** | The revision hash of the current (draft) function revision | **storage_location** | **str** | Location of the function assets. | **image_name** | **str** | Provided (or defaulted) image name to publish the function image. | **args** | **Dict[str, str]** | Parameters to the runtime configuration. | diff --git a/docs/CompletedEventData.md b/docs/CompletedEventData.md index 317a9f3f..cc5a4356 100644 --- a/docs/CompletedEventData.md +++ b/docs/CompletedEventData.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **prev** | [**QueueEvents**](QueueEvents.md) | | [optional] -**return_value** | [**AnyJobResult**](AnyJobResult.md) | | +**returnvalue** | [**AnyJobResult**](AnyJobResult.md) | | ## Example diff --git a/docs/CreateFunctionQueryV2.md b/docs/CreateFunctionQueryV2.md index 3d68d4dd..6907bea1 100644 --- a/docs/CreateFunctionQueryV2.md +++ b/docs/CreateFunctionQueryV2.md @@ -5,13 +5,18 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**deploy** | **bool** | Indicates that a function should be _deployed_ when its assets are valid. * If `true` (default), jobs to build and deploy the function will be initiated after it is checked that the assets are valid. Invalid assets lead to a validation error, and the function and its assets are not created or updated. * If `false`, the uploaded assets are stored and the function is created/updated in `registered` state. Asset validation errors are only returned as warning, and stored as `failureReason` on the function entity. Use an _asset update_ or _rebuild_ to initiate a build and deploy at a later stage. | [optional] [default to True] +**author** | **str** | Optionally changes the author metadata when updating a function. | [optional] +**comment** | **str** | An optional user-specified comment corresponding to the operation. | [optional] +**scale_to_zero** | **bool** | If set to <code>true</code>, after successful deployment, the deployed function will be scaled to zero. This saves computing resources when the function is not to be used immediately. | [optional] [default to False] **deprecate_previous** | [**DeprecatePreviousPolicy**](DeprecatePreviousPolicy.md) | | [optional] **dry_run** | **bool** | If set to <code>true</code>, validates the deployment conditions, but does not change anything. | [optional] **var_async** | **bool** | Unless this is set to <code>false</code>, the server will start the required job actions asynchronously and return a <code>202</code> <em>Accepted</em> response. If <code>false</code> the request will block until the job actions are completed, or a timeout occurs. | [optional] [default to True] -**scale_to_zero** | **bool** | If set to <code>true</code>, after successful deployment, the deployed function will be scaled to zero. Saves computing resources when the function is not to be used immediately. | [optional] [default to False] **version** | [**SemanticVersionRange**](SemanticVersionRange.md) | | [optional] **name** | **str** | If set, the value will be used as the function name instead of the one specified in the manifest. | [optional] **draft** | **bool** | If set, the created function will be a draft function and its assets are still mutable. A build and deploy is initiated only in the case when all necessary assets are present and valid. | [optional] [default to False] +**runtime** | **str** | A name reference with optional version range: `<name>[@<versionRange>]`. References (a version range of) a named and versioned entity like _function_ or _runtime_. | [optional] +**copy_from** | [**CreateFunctionQueryV2Copy**](CreateFunctionQueryV2Copy.md) | | [optional] ## Example diff --git a/docs/CreateFunctionQueryV2Copy.md b/docs/CreateFunctionQueryV2Copy.md new file mode 100644 index 00000000..eb81fa1b --- /dev/null +++ b/docs/CreateFunctionQueryV2Copy.md @@ -0,0 +1,29 @@ +# CreateFunctionQueryV2Copy + +Indicates the _source_ of initial assets for a _new function_. When using this query parameter, the request body does not need to contain assets, but any assets in the request body will overwrite the copied assets. #### Selection of _assets_ source * If set as `[@]`, the _new function_ will be created with copied assets of the selected _source function_. * If set as `!example`, a `runtime` query parameter is required, and the _new function_ will be initialized with assets of the _runtime example_. #### Selection of the _source function_ When `` is a range (or is not given), the latest _published_ version (in that range) is used. If no _published_ version exists, the latest _draft_ is selected. If no versions in the range exist, a `404` _Not Found_ error is returned. #### The `name` of the _new function_ If a `name` is NOT specified (either as query parameter, or in an optional manifest asset in the request body), the `name` of the _new function_ will be that of the _source function_. #### The `version` of the _new function_ When the _target_ and _source_ name are equal, the `version` query parameters is defaulted to `` (`~` when it's an exact version) The version of the _new function_ will be: * If a `version` is NOT specified (either as query parameter, in an optional manifest asset, or as `` _default_) * a **patch increment** (`..+1`) of the latest **existing version** with the target `name` * **`1.0.0`** otherwise * If a `version` is specified: * the **lowest version** in that range **if no existing version** is in that range. * an **increment** of the latest existing version, **at the highest level** (_major_,_minor_,_patch_) allowed by that range. * otherwise, if all allowed versions already exist, a **`409` _Duplicate_ error** is raised. #### Deployment overrides The new function will use the deployment overrides of the copied function, unless a _manifest_ was specified in the request body. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Example + +```python +from waylay.services.registry.models.create_function_query_v2_copy import CreateFunctionQueryV2Copy + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateFunctionQueryV2Copy from a JSON string +create_function_query_v2_copy_instance = CreateFunctionQueryV2Copy.from_json(json) +# print the JSON string representation of the object +print CreateFunctionQueryV2Copy.to_json() + +# convert the object into a dict +create_function_query_v2_copy_dict = create_function_query_v2_copy_instance.to_dict() +# create an instance of CreateFunctionQueryV2Copy from a dict +create_function_query_v2_copy_form_dict = create_function_query_v2_copy.from_dict(create_function_query_v2_copy_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateWebscriptsCopyParameter.md b/docs/CreateWebscriptsCopyParameter.md new file mode 100644 index 00000000..94ece30f --- /dev/null +++ b/docs/CreateWebscriptsCopyParameter.md @@ -0,0 +1,28 @@ +# CreateWebscriptsCopyParameter + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Example + +```python +from waylay.services.registry.models.create_webscripts_copy_parameter import CreateWebscriptsCopyParameter + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateWebscriptsCopyParameter from a JSON string +create_webscripts_copy_parameter_instance = CreateWebscriptsCopyParameter.from_json(json) +# print the JSON string representation of the object +print CreateWebscriptsCopyParameter.to_json() + +# convert the object into a dict +create_webscripts_copy_parameter_dict = create_webscripts_copy_parameter_instance.to_dict() +# create an instance of CreateWebscriptsCopyParameter from a dict +create_webscripts_copy_parameter_form_dict = create_webscripts_copy_parameter.from_dict(create_webscripts_copy_parameter_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DeployArgs.md b/docs/DeployArgs.md index b21a532e..475acb4d 100644 --- a/docs/DeployArgs.md +++ b/docs/DeployArgs.md @@ -11,7 +11,7 @@ Name | Type | Description | Notes **image_name** | **str** | The image name to use for deploying this function | **runtime_name** | **str** | | **runtime_version** | **str** | A semantic version with _exactly_ a `major`, `minor` and `patch` specifier. No `pre-release` or `build` identifiers are allowed. See https://semver.org | -**revision** | **str** | The revision hash of the current (draft) function revision | [optional] +**revision** | **str** | The revision hash of the current (draft) function revision | **deploy_spec_overrides** | [**DeployArgsDeploySpecOverrides**](DeployArgsDeploySpecOverrides.md) | | ## Example diff --git a/docs/DeployAttributesFilter.md b/docs/DeployAttributesFilter.md deleted file mode 100644 index 4b30af9e..00000000 --- a/docs/DeployAttributesFilter.md +++ /dev/null @@ -1,31 +0,0 @@ -# DeployAttributesFilter - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**endpoint** | **str** | Filter on the openfaas endpoint. This is case-insensitive and supports wild-cards `?` (any one character) and `*` (any sequence of characters). | [optional] -**image_name** | **str** | Filter on the container image name. This is case-insensitive and supports wild-cards `?` (any one character) and `*` (any sequence of characters). | [optional] -**storage_location** | **str** | Filter on the storageLocation. This is case-insensitive and supports wild-cards `?` (any one character) and `*` (any sequence of characters). | [optional] - -## Example - -```python -from waylay.services.registry.models.deploy_attributes_filter import DeployAttributesFilter - -# TODO update the JSON string below -json = "{}" -# create an instance of DeployAttributesFilter from a JSON string -deploy_attributes_filter_instance = DeployAttributesFilter.from_json(json) -# print the JSON string representation of the object -print DeployAttributesFilter.to_json() - -# convert the object into a dict -deploy_attributes_filter_dict = deploy_attributes_filter_instance.to_dict() -# create an instance of DeployAttributesFilter from a dict -deploy_attributes_filter_form_dict = deploy_attributes_filter.from_dict(deploy_attributes_filter_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/DeprecatePreviousQuery.md b/docs/DeprecatePreviousQuery.md deleted file mode 100644 index 9bd3543b..00000000 --- a/docs/DeprecatePreviousQuery.md +++ /dev/null @@ -1,29 +0,0 @@ -# DeprecatePreviousQuery - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**deprecate_previous** | [**DeprecatePreviousPolicy**](DeprecatePreviousPolicy.md) | | [optional] - -## Example - -```python -from waylay.services.registry.models.deprecate_previous_query import DeprecatePreviousQuery - -# TODO update the JSON string below -json = "{}" -# create an instance of DeprecatePreviousQuery from a JSON string -deprecate_previous_query_instance = DeprecatePreviousQuery.from_json(json) -# print the JSON string representation of the object -print DeprecatePreviousQuery.to_json() - -# convert the object into a dict -deprecate_previous_query_dict = deprecate_previous_query_instance.to_dict() -# create an instance of DeprecatePreviousQuery from a dict -deprecate_previous_query_form_dict = deprecate_previous_query.from_dict(deprecate_previous_query_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/DeprecatedDraftFilter.md b/docs/DeprecatedDraftFilter.md deleted file mode 100644 index 48b5c2cd..00000000 --- a/docs/DeprecatedDraftFilter.md +++ /dev/null @@ -1,30 +0,0 @@ -# DeprecatedDraftFilter - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**deprecated** | **bool** | Filter on the deprecation status of the function. | [optional] -**draft** | **bool** | Filter on the draft status of the function. | [optional] - -## Example - -```python -from waylay.services.registry.models.deprecated_draft_filter import DeprecatedDraftFilter - -# TODO update the JSON string below -json = "{}" -# create an instance of DeprecatedDraftFilter from a JSON string -deprecated_draft_filter_instance = DeprecatedDraftFilter.from_json(json) -# print the JSON string representation of the object -print DeprecatedDraftFilter.to_json() - -# convert the object into a dict -deprecated_draft_filter_dict = deprecated_draft_filter_instance.to_dict() -# create an instance of DeprecatedDraftFilter from a dict -deprecated_draft_filter_form_dict = deprecated_draft_filter.from_dict(deprecated_draft_filter_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/DryRunQuery.md b/docs/DryRunQuery.md deleted file mode 100644 index 9b7f036f..00000000 --- a/docs/DryRunQuery.md +++ /dev/null @@ -1,29 +0,0 @@ -# DryRunQuery - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**dry_run** | **bool** | If set to <code>true</code>, validates the deployment conditions, but does not change anything. | [optional] - -## Example - -```python -from waylay.services.registry.models.dry_run_query import DryRunQuery - -# TODO update the JSON string below -json = "{}" -# create an instance of DryRunQuery from a JSON string -dry_run_query_instance = DryRunQuery.from_json(json) -# print the JSON string representation of the object -print DryRunQuery.to_json() - -# convert the object into a dict -dry_run_query_dict = dry_run_query_instance.to_dict() -# create an instance of DryRunQuery from a dict -dry_run_query_form_dict = dry_run_query.from_dict(dry_run_query_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/LatestModelsResponseV2EntitiesInner.md b/docs/EntityWithLinksIKfservingResponseV2.md similarity index 61% rename from docs/LatestModelsResponseV2EntitiesInner.md rename to docs/EntityWithLinksIKfservingResponseV2.md index 89f5823f..e07382a0 100644 --- a/docs/LatestModelsResponseV2EntitiesInner.md +++ b/docs/EntityWithLinksIKfservingResponseV2.md @@ -1,11 +1,12 @@ -# LatestModelsResponseV2EntitiesInner +# EntityWithLinksIKfservingResponseV2 ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**links** | [**AltVersionHALLink**](AltVersionHALLink.md) | | +**embedded** | [**AltEmbeddedVersionIKfservingResponseV2**](AltEmbeddedVersionIKfservingResponseV2.md) | | [optional] +**links** | [**AltVersionHALLink**](AltVersionHALLink.md) | | [optional] **created_by** | **str** | The user that created this entity. | **created_at** | **datetime** | The timestamp at which this entity was created. | **updated_by** | **str** | The user that last updated this entity. | @@ -21,19 +22,19 @@ Name | Type | Description | Notes ## Example ```python -from waylay.services.registry.models.latest_models_response_v2_entities_inner import LatestModelsResponseV2EntitiesInner +from waylay.services.registry.models.entity_with_links_i_kfserving_response_v2 import EntityWithLinksIKfservingResponseV2 # TODO update the JSON string below json = "{}" -# create an instance of LatestModelsResponseV2EntitiesInner from a JSON string -latest_models_response_v2_entities_inner_instance = LatestModelsResponseV2EntitiesInner.from_json(json) +# create an instance of EntityWithLinksIKfservingResponseV2 from a JSON string +entity_with_links_i_kfserving_response_v2_instance = EntityWithLinksIKfservingResponseV2.from_json(json) # print the JSON string representation of the object -print LatestModelsResponseV2EntitiesInner.to_json() +print EntityWithLinksIKfservingResponseV2.to_json() # convert the object into a dict -latest_models_response_v2_entities_inner_dict = latest_models_response_v2_entities_inner_instance.to_dict() -# create an instance of LatestModelsResponseV2EntitiesInner from a dict -latest_models_response_v2_entities_inner_form_dict = latest_models_response_v2_entities_inner.from_dict(latest_models_response_v2_entities_inner_dict) +entity_with_links_i_kfserving_response_v2_dict = entity_with_links_i_kfserving_response_v2_instance.to_dict() +# create an instance of EntityWithLinksIKfservingResponseV2 from a dict +entity_with_links_i_kfserving_response_v2_form_dict = entity_with_links_i_kfserving_response_v2.from_dict(entity_with_links_i_kfserving_response_v2_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/LatestPlugsResponseV2EntitiesInner.md b/docs/EntityWithLinksIPlugResponseV2.md similarity index 63% rename from docs/LatestPlugsResponseV2EntitiesInner.md rename to docs/EntityWithLinksIPlugResponseV2.md index c4ea63b2..0e4a6f36 100644 --- a/docs/LatestPlugsResponseV2EntitiesInner.md +++ b/docs/EntityWithLinksIPlugResponseV2.md @@ -1,11 +1,12 @@ -# LatestPlugsResponseV2EntitiesInner +# EntityWithLinksIPlugResponseV2 ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**links** | [**AltVersionHALLink**](AltVersionHALLink.md) | | +**embedded** | [**AltEmbeddedVersionIPlugResponseV2**](AltEmbeddedVersionIPlugResponseV2.md) | | [optional] +**links** | [**AltVersionHALLink**](AltVersionHALLink.md) | | [optional] **created_by** | **str** | The user that created this entity. | **created_at** | **datetime** | The timestamp at which this entity was created. | **updated_by** | **str** | The user that last updated this entity. | @@ -21,19 +22,19 @@ Name | Type | Description | Notes ## Example ```python -from waylay.services.registry.models.latest_plugs_response_v2_entities_inner import LatestPlugsResponseV2EntitiesInner +from waylay.services.registry.models.entity_with_links_i_plug_response_v2 import EntityWithLinksIPlugResponseV2 # TODO update the JSON string below json = "{}" -# create an instance of LatestPlugsResponseV2EntitiesInner from a JSON string -latest_plugs_response_v2_entities_inner_instance = LatestPlugsResponseV2EntitiesInner.from_json(json) +# create an instance of EntityWithLinksIPlugResponseV2 from a JSON string +entity_with_links_i_plug_response_v2_instance = EntityWithLinksIPlugResponseV2.from_json(json) # print the JSON string representation of the object -print LatestPlugsResponseV2EntitiesInner.to_json() +print EntityWithLinksIPlugResponseV2.to_json() # convert the object into a dict -latest_plugs_response_v2_entities_inner_dict = latest_plugs_response_v2_entities_inner_instance.to_dict() -# create an instance of LatestPlugsResponseV2EntitiesInner from a dict -latest_plugs_response_v2_entities_inner_form_dict = latest_plugs_response_v2_entities_inner.from_dict(latest_plugs_response_v2_entities_inner_dict) +entity_with_links_i_plug_response_v2_dict = entity_with_links_i_plug_response_v2_instance.to_dict() +# create an instance of EntityWithLinksIPlugResponseV2 from a dict +entity_with_links_i_plug_response_v2_form_dict = entity_with_links_i_plug_response_v2.from_dict(entity_with_links_i_plug_response_v2_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/LatestWebscriptsResponseV2EntitiesInner.md b/docs/EntityWithLinksIWebscriptResponseWithInvokeLinkV2.md similarity index 58% rename from docs/LatestWebscriptsResponseV2EntitiesInner.md rename to docs/EntityWithLinksIWebscriptResponseWithInvokeLinkV2.md index 7122808c..946848cf 100644 --- a/docs/LatestWebscriptsResponseV2EntitiesInner.md +++ b/docs/EntityWithLinksIWebscriptResponseWithInvokeLinkV2.md @@ -1,11 +1,12 @@ -# LatestWebscriptsResponseV2EntitiesInner +# EntityWithLinksIWebscriptResponseWithInvokeLinkV2 ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**links** | [**InvokeHALLink**](InvokeHALLink.md) | | +**embedded** | [**AltEmbeddedVersionIWebscriptResponseWithInvokeLinkV2**](AltEmbeddedVersionIWebscriptResponseWithInvokeLinkV2.md) | | [optional] +**links** | [**InvokeHALLink**](InvokeHALLink.md) | | [optional] **created_by** | **str** | The user that created this entity. | **created_at** | **datetime** | The timestamp at which this entity was created. | **updated_by** | **str** | The user that last updated this entity. | @@ -22,19 +23,19 @@ Name | Type | Description | Notes ## Example ```python -from waylay.services.registry.models.latest_webscripts_response_v2_entities_inner import LatestWebscriptsResponseV2EntitiesInner +from waylay.services.registry.models.entity_with_links_i_webscript_response_with_invoke_link_v2 import EntityWithLinksIWebscriptResponseWithInvokeLinkV2 # TODO update the JSON string below json = "{}" -# create an instance of LatestWebscriptsResponseV2EntitiesInner from a JSON string -latest_webscripts_response_v2_entities_inner_instance = LatestWebscriptsResponseV2EntitiesInner.from_json(json) +# create an instance of EntityWithLinksIWebscriptResponseWithInvokeLinkV2 from a JSON string +entity_with_links_i_webscript_response_with_invoke_link_v2_instance = EntityWithLinksIWebscriptResponseWithInvokeLinkV2.from_json(json) # print the JSON string representation of the object -print LatestWebscriptsResponseV2EntitiesInner.to_json() +print EntityWithLinksIWebscriptResponseWithInvokeLinkV2.to_json() # convert the object into a dict -latest_webscripts_response_v2_entities_inner_dict = latest_webscripts_response_v2_entities_inner_instance.to_dict() -# create an instance of LatestWebscriptsResponseV2EntitiesInner from a dict -latest_webscripts_response_v2_entities_inner_form_dict = latest_webscripts_response_v2_entities_inner.from_dict(latest_webscripts_response_v2_entities_inner_dict) +entity_with_links_i_webscript_response_with_invoke_link_v2_dict = entity_with_links_i_webscript_response_with_invoke_link_v2_instance.to_dict() +# create an instance of EntityWithLinksIWebscriptResponseWithInvokeLinkV2 from a dict +entity_with_links_i_webscript_response_with_invoke_link_v2_form_dict = entity_with_links_i_webscript_response_with_invoke_link_v2.from_dict(entity_with_links_i_webscript_response_with_invoke_link_v2_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ExampleReference.md b/docs/ExampleReference.md new file mode 100644 index 00000000..182440ed --- /dev/null +++ b/docs/ExampleReference.md @@ -0,0 +1,12 @@ +# ExampleReference + +Example reference. References the example assets from the selected runtime. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/FunctionDeleteQuery.md b/docs/FunctionDeleteQuery.md deleted file mode 100644 index c0d403d9..00000000 --- a/docs/FunctionDeleteQuery.md +++ /dev/null @@ -1,30 +0,0 @@ -# FunctionDeleteQuery - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**force** | **bool** | If <code>true</code>, the function version will be immediately undeployed and removed. Otherwise, the removal will be delayed to allow current invocations to end. During that period, the function is marked _deprecated_. | [optional] -**undeploy** | **bool** | If `true`, the `DELETE` operation * undeploys the (openfaas) function: it becomes no longer available for invocation. * does NOT remove the function from registry: it stays in an `undeployed` status. All assets and definitions are retained, so the version can be restored later with a _rebuild_ action. If `false`, the `DELETE` operation * _only_ marks the plug function as _deprecated_, the function remains active but is removed from the default listings. This also applies to _draft_ versions. This parameter is incompatible with `force=true`. If not set the default behaviour applies: * _draft_ versions are _undeployed_ and _removed_ from registry. * non-_draft_ versions are marked _deprecated_ only. | [optional] - -## Example - -```python -from waylay.services.registry.models.function_delete_query import FunctionDeleteQuery - -# TODO update the JSON string below -json = "{}" -# create an instance of FunctionDeleteQuery from a JSON string -function_delete_query_instance = FunctionDeleteQuery.from_json(json) -# print the JSON string representation of the object -print FunctionDeleteQuery.to_json() - -# convert the object into a dict -function_delete_query_dict = function_delete_query_instance.to_dict() -# create an instance of FunctionDeleteQuery from a dict -function_delete_query_form_dict = function_delete_query.from_dict(function_delete_query_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/FunctionEntityQuery.md b/docs/FunctionEntityQuery.md deleted file mode 100644 index 2dd07dee..00000000 --- a/docs/FunctionEntityQuery.md +++ /dev/null @@ -1,32 +0,0 @@ -# FunctionEntityQuery - -Filter on function attributes that do not change across function versions. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **str** | Filter on the name of the function. This is case-insensitive and supports wild-cards `?` (any one character) and `*` (any sequence of characters). | [optional] -**archive_format** | [**List[ArchiveFormat]**](ArchiveFormat.md) | Filter on the archive format of the function. | [optional] -**runtime** | **List[str]** | Filter on the runtime of the function. | [optional] - -## Example - -```python -from waylay.services.registry.models.function_entity_query import FunctionEntityQuery - -# TODO update the JSON string below -json = "{}" -# create an instance of FunctionEntityQuery from a JSON string -function_entity_query_instance = FunctionEntityQuery.from_json(json) -# print the JSON string representation of the object -print FunctionEntityQuery.to_json() - -# convert the object into a dict -function_entity_query_dict = function_entity_query_instance.to_dict() -# create an instance of FunctionEntityQuery from a dict -function_entity_query_form_dict = function_entity_query.from_dict(function_entity_query_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/FunctionJobArgs.md b/docs/FunctionJobArgs.md index 3bf80563..e1b9b646 100644 --- a/docs/FunctionJobArgs.md +++ b/docs/FunctionJobArgs.md @@ -8,7 +8,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **runtime_name** | **str** | | **runtime_version** | **str** | A semantic version with _exactly_ a `major`, `minor` and `patch` specifier. No `pre-release` or `build` identifiers are allowed. See https://semver.org | -**revision** | **str** | The revision hash of the current (draft) function revision | [optional] +**revision** | **str** | The revision hash of the current (draft) function revision | ## Example diff --git a/docs/FunctionVersionQuery.md b/docs/FunctionVersionQuery.md deleted file mode 100644 index b7dec719..00000000 --- a/docs/FunctionVersionQuery.md +++ /dev/null @@ -1,38 +0,0 @@ -# FunctionVersionQuery - -Filter on function attributes that can change across function versions. When these query parameters are used, the query is considered a _function version_ listing and no HAL links to latest (_draft_, _published_) versions are included. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**version** | **str** | Filter on the version of the function (case-sensitive, supports wildcards). | [optional] -**status** | [**List[StatusFilter]**](StatusFilter.md) | Filter on the status of the plug. Filter values with a `-` postfix exclude the status. Use the `any` filter value to include all states. When not specified, a default `undeployed-` filter excludes _undeployed_ functions. | [optional] -**runtime_version** | [**SemanticVersionRange**](SemanticVersionRange.md) | | [optional] -**created_by** | **str** | Filter on the user that create the plug. You can use the `@me` token to indicate your own plugs. | [optional] -**updated_by** | **str** | Filter on the user that last updated the plug. You can use the `@me` token to indicate your own plugs. | [optional] -**created_before** | [**TimestampSpec**](TimestampSpec.md) | | [optional] -**created_after** | [**TimestampSpec**](TimestampSpec.md) | | [optional] -**updated_before** | [**TimestampSpec**](TimestampSpec.md) | | [optional] -**updated_after** | [**TimestampSpec**](TimestampSpec.md) | | [optional] - -## Example - -```python -from waylay.services.registry.models.function_version_query import FunctionVersionQuery - -# TODO update the JSON string below -json = "{}" -# create an instance of FunctionVersionQuery from a JSON string -function_version_query_instance = FunctionVersionQuery.from_json(json) -# print the JSON string representation of the object -print FunctionVersionQuery.to_json() - -# convert the object into a dict -function_version_query_dict = function_version_query_instance.to_dict() -# create an instance of FunctionVersionQuery from a dict -function_version_query_form_dict = function_version_query.from_dict(function_version_query_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/JobTypeNotify.md b/docs/JobTypeNotify.md new file mode 100644 index 00000000..57a8c69a --- /dev/null +++ b/docs/JobTypeNotify.md @@ -0,0 +1,12 @@ +# JobTypeNotify + +A job to notify that an function version has changed. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/JobsApi.md b/docs/JobsApi.md index 405467ea..6df17b4d 100644 --- a/docs/JobsApi.md +++ b/docs/JobsApi.md @@ -1,6 +1,6 @@ # waylay.services.registry.JobsApi -All URIs are relative to *https://api.waylay.io* +All URIs are relative to *https://api-aws-dev.waylay.io* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/docs/KFServingLatestVersionsQueryV2.md b/docs/KFServingLatestVersionsQueryV2.md index 649d60ef..8a331cb0 100644 --- a/docs/KFServingLatestVersionsQueryV2.md +++ b/docs/KFServingLatestVersionsQueryV2.md @@ -26,6 +26,7 @@ Name | Type | Description | Notes **archive_format** | [**List[ArchiveFormat]**](ArchiveFormat.md) | Filter on the archive format of the function. | [optional] **runtime** | **List[str]** | Filter on the runtime of the function. | [optional] **latest** | **bool** | When `true`, only the latest version per function name is returned. If set to `false`, multiple versions per named function can be returned. Defaults to `true`, except when specific versions are selected with the `nameVersion` filter. | [optional] +**show_related** | [**ShowRelatedType**](ShowRelatedType.md) | | [optional] ## Example diff --git a/docs/LatestFunctionVersionsQuery.md b/docs/LatestFunctionVersionsQuery.md index b0f180ee..abd30400 100644 --- a/docs/LatestFunctionVersionsQuery.md +++ b/docs/LatestFunctionVersionsQuery.md @@ -26,6 +26,7 @@ Name | Type | Description | Notes **archive_format** | [**List[ArchiveFormat]**](ArchiveFormat.md) | Filter on the archive format of the function. | [optional] **runtime** | **List[str]** | Filter on the runtime of the function. | [optional] **latest** | **bool** | When `true`, only the latest version per function name is returned. If set to `false`, multiple versions per named function can be returned. Defaults to `true`, except when specific versions are selected with the `nameVersion` filter. | [optional] +**show_related** | [**LatestFunctionVersionsQueryShowRelated**](LatestFunctionVersionsQueryShowRelated.md) | | [optional] ## Example diff --git a/docs/LatestFunctionVersionsQueryShowRelated.md b/docs/LatestFunctionVersionsQueryShowRelated.md new file mode 100644 index 00000000..dc22ba16 --- /dev/null +++ b/docs/LatestFunctionVersionsQueryShowRelated.md @@ -0,0 +1,11 @@ +# LatestFunctionVersionsQueryShowRelated + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/LatestFunctionsQuery.md b/docs/LatestFunctionsQuery.md index 3531d366..53df20fe 100644 --- a/docs/LatestFunctionsQuery.md +++ b/docs/LatestFunctionsQuery.md @@ -6,6 +6,7 @@ Request to list latest function versions per named function. A request that only Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**show_related** | [**ShowRelatedType**](ShowRelatedType.md) | | [optional] **limit** | **float** | The maximum number of items to be return from this query. Has a deployment-defined default and maximum value. | [optional] **page** | **float** | The number of pages to skip when returning result to this query. | [optional] **include_draft** | **bool** | Configures the inclusion of _draft_ versions when selecting latest versions per name. By default, draft versions are only considered when no other versions are available. If set to `true`, draft versions are **included**. If set to `false`, draft versions are **excluded**. | [optional] diff --git a/docs/LatestModelsResponseV2.md b/docs/LatestModelsResponseV2.md index 8429929e..2175d54a 100644 --- a/docs/LatestModelsResponseV2.md +++ b/docs/LatestModelsResponseV2.md @@ -9,7 +9,7 @@ Name | Type | Description | Notes **limit** | **float** | The page size used for this query result. | [optional] **count** | **float** | The total count of matching items, from which this result is one page. | **page** | **float** | The page number of a paged query result. | [optional] -**entities** | [**List[LatestModelsResponseV2EntitiesInner]**](LatestModelsResponseV2EntitiesInner.md) | The specification and deployment status of the queried functions | +**entities** | [**List[EntityWithLinksIKfservingResponseV2]**](EntityWithLinksIKfservingResponseV2.md) | The specification and deployment status of the queried functions | ## Example diff --git a/docs/LatestPlugVersionsQuery.md b/docs/LatestPlugVersionsQuery.md index f2ad246e..3c344d44 100644 --- a/docs/LatestPlugVersionsQuery.md +++ b/docs/LatestPlugVersionsQuery.md @@ -28,6 +28,7 @@ Name | Type | Description | Notes **archive_format** | [**List[ArchiveFormat]**](ArchiveFormat.md) | Filter on the archive format of the function. | [optional] **runtime** | **List[str]** | Filter on the runtime of the function. | [optional] **latest** | **bool** | When `true`, only the latest version per function name is returned. If set to `false`, multiple versions per named function can be returned. Defaults to `true`, except when specific versions are selected with the `nameVersion` filter. | [optional] +**show_related** | [**LatestFunctionVersionsQueryShowRelated**](LatestFunctionVersionsQueryShowRelated.md) | | [optional] ## Example diff --git a/docs/LatestPlugVersionsQueryV2.md b/docs/LatestPlugVersionsQueryV2.md index 76546f24..a18ad54f 100644 --- a/docs/LatestPlugVersionsQueryV2.md +++ b/docs/LatestPlugVersionsQueryV2.md @@ -28,6 +28,7 @@ Name | Type | Description | Notes **archive_format** | [**List[ArchiveFormat]**](ArchiveFormat.md) | Filter on the archive format of the function. | [optional] **runtime** | **List[str]** | Filter on the runtime of the function. | [optional] **latest** | **bool** | When `true`, only the latest version per function name is returned. If set to `false`, multiple versions per named function can be returned. Defaults to `true`, except when specific versions are selected with the `nameVersion` filter. | [optional] +**show_related** | [**ShowRelatedType**](ShowRelatedType.md) | | [optional] ## Example diff --git a/docs/LatestPlugsQuery.md b/docs/LatestPlugsQuery.md index 5b962f5f..f8e997f7 100644 --- a/docs/LatestPlugsQuery.md +++ b/docs/LatestPlugsQuery.md @@ -7,6 +7,7 @@ Latest plug versions listing query with latest links. A request that only uses t Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **type** | [**PlugType**](PlugType.md) | | [optional] +**show_related** | [**ShowRelatedType**](ShowRelatedType.md) | | [optional] **limit** | **float** | The maximum number of items to be return from this query. Has a deployment-defined default and maximum value. | [optional] **page** | **float** | The number of pages to skip when returning result to this query. | [optional] **include_draft** | **bool** | Configures the inclusion of _draft_ versions when selecting latest versions per name. By default, draft versions are only considered when no other versions are available. If set to `true`, draft versions are **included**. If set to `false`, draft versions are **excluded**. | [optional] diff --git a/docs/LatestPlugsResponseV2.md b/docs/LatestPlugsResponseV2.md index faf5491f..4632f8a6 100644 --- a/docs/LatestPlugsResponseV2.md +++ b/docs/LatestPlugsResponseV2.md @@ -9,7 +9,7 @@ Name | Type | Description | Notes **limit** | **float** | The page size used for this query result. | [optional] **count** | **float** | The total count of matching items, from which this result is one page. | **page** | **float** | The page number of a paged query result. | [optional] -**entities** | [**List[LatestPlugsResponseV2EntitiesInner]**](LatestPlugsResponseV2EntitiesInner.md) | The specification and deployment status of the queried functions | +**entities** | [**List[EntityWithLinksIPlugResponseV2]**](EntityWithLinksIPlugResponseV2.md) | The specification and deployment status of the queried functions | ## Example diff --git a/docs/LatestWebscriptsResponseV2.md b/docs/LatestWebscriptsResponseV2.md index 5967e272..cac1bb13 100644 --- a/docs/LatestWebscriptsResponseV2.md +++ b/docs/LatestWebscriptsResponseV2.md @@ -9,7 +9,7 @@ Name | Type | Description | Notes **limit** | **float** | The page size used for this query result. | [optional] **count** | **float** | The total count of matching items, from which this result is one page. | **page** | **float** | The page number of a paged query result. | [optional] -**entities** | [**List[LatestWebscriptsResponseV2EntitiesInner]**](LatestWebscriptsResponseV2EntitiesInner.md) | The specification and deployment status of the queried functions | +**entities** | [**List[EntityWithLinksIWebscriptResponseWithInvokeLinkV2]**](EntityWithLinksIWebscriptResponseWithInvokeLinkV2.md) | The specification and deployment status of the queried functions | ## Example diff --git a/docs/LimitQuery.md b/docs/LimitQuery.md deleted file mode 100644 index 671d56e4..00000000 --- a/docs/LimitQuery.md +++ /dev/null @@ -1,29 +0,0 @@ -# LimitQuery - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**limit** | **float** | The maximum number of items to be return from this query. Has a deployment-defined default and maximum value. | [optional] - -## Example - -```python -from waylay.services.registry.models.limit_query import LimitQuery - -# TODO update the JSON string below -json = "{}" -# create an instance of LimitQuery from a JSON string -limit_query_instance = LimitQuery.from_json(json) -# print the JSON string representation of the object -print LimitQuery.to_json() - -# convert the object into a dict -limit_query_dict = limit_query_instance.to_dict() -# create an instance of LimitQuery from a dict -limit_query_form_dict = limit_query.from_dict(limit_query_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ModelFunctionsApi.md b/docs/ModelsApi.md similarity index 76% rename from docs/ModelFunctionsApi.md rename to docs/ModelsApi.md index a55a1025..dfa36cc0 100644 --- a/docs/ModelFunctionsApi.md +++ b/docs/ModelsApi.md @@ -1,26 +1,26 @@ -# waylay.services.registry.ModelFunctionsApi +# waylay.services.registry.ModelsApi -All URIs are relative to *https://api.waylay.io* +All URIs are relative to *https://api-aws-dev.waylay.io* Method | HTTP request | Description ------------- | ------------- | ------------- -[**create**](ModelFunctionsApi.md#create) | **POST** /registry/v2/models/ | Create Model -[**delete_asset**](ModelFunctionsApi.md#delete_asset) | **DELETE** /registry/v2/models/{name}/versions/{version}/content/{wildcard} | Delete Model Asset -[**get_archive**](ModelFunctionsApi.md#get_archive) | **GET** /registry/v2/models/{name}/versions/{version}/content | Get Model Archive -[**get_asset**](ModelFunctionsApi.md#get_asset) | **GET** /registry/v2/models/{name}/versions/{version}/content/{wildcard} | Get File From Model Archive -[**get_latest**](ModelFunctionsApi.md#get_latest) | **GET** /registry/v2/models/{name} | Get Latest Model Version -[**get**](ModelFunctionsApi.md#get) | **GET** /registry/v2/models/{name}/versions/{version} | Get Model Version -[**jobs**](ModelFunctionsApi.md#jobs) | **GET** /registry/v2/models/{name}/versions/{version}/jobs | List Model Jobs -[**list**](ModelFunctionsApi.md#list) | **GET** /registry/v2/models/ | List Models -[**list_versions**](ModelFunctionsApi.md#list_versions) | **GET** /registry/v2/models/{name}/versions | List Model Versions -[**patch_metadata**](ModelFunctionsApi.md#patch_metadata) | **PATCH** /registry/v2/models/{name}/versions/{version}/metadata | Patch Model Metadata -[**publish**](ModelFunctionsApi.md#publish) | **POST** /registry/v2/models/{name}/versions/{version}/publish | Publish Draft Model -[**rebuild**](ModelFunctionsApi.md#rebuild) | **POST** /registry/v2/models/{name}/versions/{version}/rebuild | Rebuild Model -[**remove_version**](ModelFunctionsApi.md#remove_version) | **DELETE** /registry/v2/models/{name}/versions/{version} | Remove Model Version -[**remove_versions**](ModelFunctionsApi.md#remove_versions) | **DELETE** /registry/v2/models/{name} | Remove Model -[**update_asset**](ModelFunctionsApi.md#update_asset) | **PUT** /registry/v2/models/{name}/versions/{version}/content/{wildcard} | Update Model Asset -[**update_assets**](ModelFunctionsApi.md#update_assets) | **PUT** /registry/v2/models/{name}/versions/{version}/content | Update Model Assets -[**verify**](ModelFunctionsApi.md#verify) | **POST** /registry/v2/models/{name}/versions/{version}/verify | Verify Health Of Model +[**create**](ModelsApi.md#create) | **POST** /registry/v2/models/ | Create Model +[**delete_asset**](ModelsApi.md#delete_asset) | **DELETE** /registry/v2/models/{name}/versions/{version}/content/{wildcard} | Delete Model Asset +[**get_archive**](ModelsApi.md#get_archive) | **GET** /registry/v2/models/{name}/versions/{version}/content | Get Model Archive +[**get_asset**](ModelsApi.md#get_asset) | **GET** /registry/v2/models/{name}/versions/{version}/content/{wildcard} | Get File From Model Archive +[**get_latest**](ModelsApi.md#get_latest) | **GET** /registry/v2/models/{name} | Get Latest Model Version +[**get**](ModelsApi.md#get) | **GET** /registry/v2/models/{name}/versions/{version} | Get Model Version +[**jobs**](ModelsApi.md#jobs) | **GET** /registry/v2/models/{name}/versions/{version}/jobs | List Model Jobs +[**list**](ModelsApi.md#list) | **GET** /registry/v2/models/ | List Models +[**list_versions**](ModelsApi.md#list_versions) | **GET** /registry/v2/models/{name}/versions | List Model Versions +[**patch_metadata**](ModelsApi.md#patch_metadata) | **PATCH** /registry/v2/models/{name}/versions/{version}/metadata | Patch Model Metadata +[**publish**](ModelsApi.md#publish) | **POST** /registry/v2/models/{name}/versions/{version}/publish | Publish Draft Model +[**rebuild**](ModelsApi.md#rebuild) | **POST** /registry/v2/models/{name}/versions/{version}/rebuild | Rebuild Model +[**remove_version**](ModelsApi.md#remove_version) | **DELETE** /registry/v2/models/{name}/versions/{version} | Remove Model Version +[**remove_versions**](ModelsApi.md#remove_versions) | **DELETE** /registry/v2/models/{name} | Remove Model +[**update_asset**](ModelsApi.md#update_asset) | **PUT** /registry/v2/models/{name}/versions/{version}/content/{wildcard} | Update Model Asset +[**update_assets**](ModelsApi.md#update_assets) | **PUT** /registry/v2/models/{name}/versions/{version}/content | Update Model Assets +[**verify**](ModelsApi.md#verify) | **POST** /registry/v2/models/{name}/versions/{version}/verify | Verify Health Of Model # **create** > create( @@ -31,7 +31,7 @@ Method | HTTP request | Description Create Model -Creates a new model function by uploading its assets. The assets for a model function can be provided as either
  • a single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
  • separate files in a multipart/form-data request
The required model.json json file contains the function metadata, and must have a runtime attribute that is one of the supported runtimes (see GET /registry/v2/runtimes?functionType=kfserving). For each runtime other files will be required or supported. +Creates a new model function by uploading its assets. The assets for a model function can be provided as
  • A single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
  • Separate files in a multipart/form-data request
  • A reference to the assets of another model in the copy argument
The required model.json json file contains the function metadata, and must have a runtime attribute that is one of the supported runtimes (see GET /registry/v2/runtimes?functionType=kfserving). For each runtime other files will be required or supported. ### Example @@ -47,32 +47,34 @@ waylay_client = WaylayClient.from_profile() # Note that the typed model classes for responses/parameters/... are only available when `waylay-sdk-registry-types` is installed from waylay.services.registry.models.deprecate_previous_policy import DeprecatePreviousPolicy -from waylay.services.registry.models.multipart_file_upload import MultipartFileUpload from waylay.services.registry.models.post_model_job_sync_response_v2 import PostModelJobSyncResponseV2 try: # Create Model # calls `POST /registry/v2/models/` - api_response = await waylay_client.registry.model_functions.create( + api_response = await waylay_client.registry.models.create( # query parameters: query = { + 'deploy': True + 'scaleToZero': False 'deprecatePrevious': 'none' 'dryRun': True 'async': True - 'scaleToZero': False 'draft': False }, + # json data: use a generated model or a json-serializable python data structure (dict, list) + json = None # bytearray | The assets for a model function can be provided as
  • A single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
  • Separate files in a multipart/form-data request
  • A reference to the assets of another model in the copy argument
The required model.json json file contains the function metadata, and must have a runtime attribute that is one of the supported runtimes (see GET /registry/v2/runtimes?functionType=kfserving). For each runtime other files will be required or supported. (optional) # non-json binary data: use a byte array or a generator of bytearray chuncks content=b'my-binary-data', # this operation supports multiple request content types: use `headers` to specify the one used - # alternatives: 'application/tar+gzip', 'application/x-gzip', 'application/x-tar', 'application/gzip', 'multipart/form-data', + # alternatives: 'application/tar', 'application/tar+gzip', 'application/x-gzip', 'application/x-tar', 'application/gzip', 'multipart/form-data', 'application/json', '*/*+json', headers = { 'content-type': 'application/octet-stream' }, ) - print("The response of registry.model_functions.create:\n") + print("The response of registry.models.create:\n") pprint(api_response) except ApiError as e: - print("Exception when calling registry.model_functions.create: %s\n" % e) + print("Exception when calling registry.models.create: %s\n" % e) ``` ### Endpoint @@ -83,18 +85,24 @@ POST /registry/v2/models/ Name | Type | API binding | Description | Notes -------- | ----- | ------------- | ------------- | ------------- -**content** | **[ContentRequest](Operation.md#req_arg_content)** | binary request body | The assets for a <em>model</em> function can be provided as either <ul> <li>a single <em>tar</em> archive (optionally compressed), with one of the content types <code>application/octet-stream</code>, <code>application/tar+gzip</code>, <code>application/x-gzip</code>, <code>application/x-tar</code>, <code>application/gzip</code></li> <li>separate files in a <code>multipart/form-data</code> request</li> </ul> The required <code>model.json</code> json file contains the function metadata, and must have a <code>runtime</code> attribute that is one of the supported <em>runtime</em>s (see <code>GET /registry/v2/runtimes?functionType=kfserving</code>). For each <em>runtime</em> other files will be required or supported. | [optional] +**json** | **bytearray** | json request body | The assets for a <em>model</em> function can be provided as <ul> <li>A single <em>tar</em> archive (optionally compressed), with one of the content types <code>application/octet-stream</code>, <code>application/tar</code>, <code>application/tar+gzip</code>, <code>application/x-gzip</code>, <code>application/x-tar</code>, <code>application/gzip</code></li> <li>Separate files in a <code>multipart/form-data</code> request</li> <li>A reference to the assets of another <em>model</em> in the <code>copy</code> argument</li> </ul> The required <code>model.json</code> json file contains the function metadata, and must have a <code>runtime</code> attribute that is one of the supported <em>runtime</em>s (see <code>GET /registry/v2/runtimes?functionType=kfserving</code>). For each <em>runtime</em> other files will be required or supported. | [optional] +**content** | **[ContentRequest](Operation.md#req_arg_content)** | binary request body | The assets for a <em>model</em> function can be provided as <ul> <li>A single <em>tar</em> archive (optionally compressed), with one of the content types <code>application/octet-stream</code>, <code>application/tar</code>, <code>application/tar+gzip</code>, <code>application/x-gzip</code>, <code>application/x-tar</code>, <code>application/gzip</code></li> <li>Separate files in a <code>multipart/form-data</code> request</li> <li>A reference to the assets of another <em>model</em> in the <code>copy</code> argument</li> </ul> The required <code>model.json</code> json file contains the function metadata, and must have a <code>runtime</code> attribute that is one of the supported <em>runtime</em>s (see <code>GET /registry/v2/runtimes?functionType=kfserving</code>). For each <em>runtime</em> other files will be required or supported. | [optional] **files** | **[FileTypes](Operation.md#req_arg_files)** | request body files | | **query** | [QueryParamTypes](Operation.md#req_arg_query) \| **None** | URL query parameter | | +**query['deploy']** (dict)
**query.deploy** (Query) | **bool** | query parameter `"deploy"` | Indicates that a function should be _deployed_ when its assets are valid. * If `true` (default), jobs to build and deploy the function will be initiated after it is checked that the assets are valid. Invalid assets lead to a validation error, and the function and its assets are not created or updated. * If `false`, the uploaded assets are stored and the function is created/updated in `registered` state. Asset validation errors are only returned as warning, and stored as `failureReason` on the function entity. Use an _asset update_ or _rebuild_ to initiate a build and deploy at a later stage. | [optional] [default True] +**query['author']** (dict)
**query.author** (Query) | **str** | query parameter `"author"` | Optionally changes the author metadata when updating a function. | [optional] +**query['comment']** (dict)
**query.comment** (Query) | **str** | query parameter `"comment"` | An optional user-specified comment corresponding to the operation. | [optional] +**query['scaleToZero']** (dict)
**query.scale_to_zero** (Query) | **bool** | query parameter `"scaleToZero"` | If set to <code>true</code>, after successful deployment, the deployed function will be scaled to zero. This saves computing resources when the function is not to be used immediately. | [optional] [default False] **query['deprecatePrevious']** (dict)
**query.deprecate_previous** (Query) | [**DeprecatePreviousPolicy**](.md) | query parameter `"deprecatePrevious"` | Set the cleanup policy used to automatically deprecate/delete previous versions. | [optional] **query['dryRun']** (dict)
**query.dry_run** (Query) | **bool** | query parameter `"dryRun"` | If set to <code>true</code>, validates the deployment conditions, but does not change anything. | [optional] **query['async']** (dict)
**query.var_async** (Query) | **bool** | query parameter `"async"` | Unless this is set to <code>false</code>, the server will start the required job actions asynchronously and return a <code>202</code> <em>Accepted</em> response. If <code>false</code> the request will block until the job actions are completed, or a timeout occurs. | [optional] [default True] -**query['scaleToZero']** (dict)
**query.scale_to_zero** (Query) | **bool** | query parameter `"scaleToZero"` | If set to <code>true</code>, after successful deployment, the deployed function will be scaled to zero. Saves computing resources when the function is not to be used immediately. | [optional] [default False] **query['version']** (dict)
**query.version** (Query) | [**SemanticVersionRange**](.md) | query parameter `"version"` | If set, the function version will be an increment of the latest existing version that satisfies the `version` range. Note that this increment always takes precedence over an explicit `version` in the function manifest. | [optional] **query['name']** (dict)
**query.name** (Query) | **str** | query parameter `"name"` | If set, the value will be used as the function name instead of the one specified in the manifest. | [optional] **query['draft']** (dict)
**query.draft** (Query) | **bool** | query parameter `"draft"` | If set, the created function will be a draft function and its assets are still mutable. A build and deploy is initiated only in the case when all necessary assets are present and valid. | [optional] [default False] +**query['runtime']** (dict)
**query.runtime** (Query) | **str** | query parameter `"runtime"` | If set, the created function will use the indicated runtime (latest version within specified range). This takes precedence over the runtime specified in a function manifest (copied or from request body). | [optional] +**query['copy']** (dict)
**query.copy_from** (Query) | [**CreateWebscriptsCopyParameter**](.md) | query parameter `"copy"` | Indicates the _source_ of initial assets for a _new function_. When using this query parameter, the request body does not need to contain assets, but any assets in the request body will overwrite the copied assets. #### Selection of _assets_ source * If set as `<sourceName>[@<sourceVersionRange>]`, the _new function_ will be created with copied assets of the selected _source function_. * If set as `!example`, a `runtime` query parameter is required, and the _new function_ will be initialized with assets of the _runtime example_. #### Selection of the _source function_ When `<sourceVersionRange>` is a range (or is not given), the latest _published_ version (in that range) is used. If no _published_ version exists, the latest _draft_ is selected. If no versions in the range exist, a `404` _Not Found_ error is returned. #### The `name` of the _new function_ If a `name` is NOT specified (either as query parameter, or in an optional manifest asset in the request body), the `name` of the _new function_ will be that of the _source function_. #### The `version` of the _new function_ When the _target_ and _source_ name are equal, the `version` query parameters is defaulted to `<sourceVersionRange>` (`~<sourceVersionRange>` when it's an exact version) The version of the _new function_ will be: * If a `version` is NOT specified (either as query parameter, in an optional manifest asset, or as `<sourceVersionRange>` _default_) * a **patch increment** (`<major>.<minor>.<patch>+1`) of the latest **existing version** with the target `name` * **`1.0.0`** otherwise * If a `version` is specified: * the **lowest version** in that range **if no existing version** is in that range. * an **increment** of the latest existing version, **at the highest level** (_major_,_minor_,_patch_) allowed by that range. * otherwise, if all allowed versions already exist, a **`409` _Duplicate_ error** is raised. #### Deployment overrides The new function will use the deployment overrides of the copied function, unless a _manifest_ was specified in the request body. | [optional] **headers** | [HeaderTypes](Operation.md#req_headers) | request headers | | -**headers['content-type']** | **str** | content type | request header `"content-type"` | should match mediaType `application/octet-stream`, `application/tar+gzip`, `application/x-gzip`, `application/x-tar`, `application/gzip`, `multipart/form-data` +**headers['content-type']** | **str** | content type | request header `"content-type"` | should match mediaType `application/octet-stream`, `application/tar`, `application/tar+gzip`, `application/x-gzip`, `application/x-tar`, `application/gzip`, `multipart/form-data`, `application/json`, `*/*+json` ### Return type @@ -106,7 +114,7 @@ str | False _(default)_ | **`Any`** | If any other string value for the selected ### HTTP request headers - - **Content-Type**: application/octet-stream, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip, multipart/form-data + - **Content-Type**: application/octet-stream, application/tar, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip, multipart/form-data, application/json, */*+json - **Accept**: application/json ### HTTP response details @@ -148,20 +156,22 @@ from waylay.services.registry.models.post_model_job_sync_response_v2 import Post try: # Delete Model Asset # calls `DELETE /registry/v2/models/{name}/versions/{version}/content/{wildcard}` - api_response = await waylay_client.registry.model_functions.delete_asset( + api_response = await waylay_client.registry.models.delete_asset( 'name_example', # name | path param "name" 'version_example', # version | path param "version" 'wildcard_example', # wildcard | path param "wildcard" # query parameters: query = { - 'async': True + 'scaleToZero': False + 'deploy': True 'chown': False + 'async': True }, ) - print("The response of registry.model_functions.delete_asset:\n") + print("The response of registry.models.delete_asset:\n") pprint(api_response) except ApiError as e: - print("Exception when calling registry.model_functions.delete_asset: %s\n" % e) + print("Exception when calling registry.models.delete_asset: %s\n" % e) ``` ### Endpoint @@ -176,9 +186,12 @@ Name | Type | API binding | Description | Notes **version** | **str** | path parameter `"version"` | The version of the function. | **wildcard** | **str** | path parameter `"wildcard"` | Full path or path prefix of the asset within the archive | **query** | [QueryParamTypes](Operation.md#req_arg_query) \| **None** | URL query parameter | | +**query['scaleToZero']** (dict)
**query.scale_to_zero** (Query) | **bool** | query parameter `"scaleToZero"` | If set to <code>true</code>, after successful deployment, the deployed function will be scaled to zero. This saves computing resources when the function is not to be used immediately. | [optional] [default False] +**query['deploy']** (dict)
**query.deploy** (Query) | **bool** | query parameter `"deploy"` | Indicates that a function should be _deployed_ when its assets are valid. * If `true` (default), jobs to build and deploy the function will be initiated after it is checked that the assets are valid. Invalid assets lead to a validation error, and the function and its assets are not created or updated. * If `false`, the uploaded assets are stored and the function is created/updated in `registered` state. Asset validation errors are only returned as warning, and stored as `failureReason` on the function entity. Use an _asset update_ or _rebuild_ to initiate a build and deploy at a later stage. | [optional] [default True] +**query['chown']** (dict)
**query.chown** (Query) | **bool** | query parameter `"chown"` | If set, ownership of the draft function is transferred to the current user. | [optional] [default False] **query['comment']** (dict)
**query.comment** (Query) | **str** | query parameter `"comment"` | An optional user-specified comment corresponding to the operation. | [optional] +**query['author']** (dict)
**query.author** (Query) | **str** | query parameter `"author"` | Optionally changes the author metadata when updating a function. | [optional] **query['async']** (dict)
**query.var_async** (Query) | **bool** | query parameter `"async"` | Unless this is set to <code>false</code>, the server will start the required job actions asynchronously and return a <code>202</code> <em>Accepted</em> response. If <code>false</code> the request will block until the job actions are completed, or a timeout occurs. | [optional] [default True] -**query['chown']** (dict)
**query.chown** (Query) | **bool** | query parameter `"chown"` | If set, ownership of the draft function is transferred to the current user. | [default False] **headers** | [HeaderTypes](Operation.md#req_headers) | request headers | | ### Return type @@ -200,6 +213,7 @@ str | False _(default)_ | **`Any`** | If any other string value for the selected |-------------|-------------|------------------| **201** | Default Response | - | **202** | Default Response | - | +**403** | Default Response | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -231,7 +245,7 @@ waylay_client = WaylayClient.from_profile() try: # Get Model Archive # calls `GET /registry/v2/models/{name}/versions/{version}/content` - api_response = await waylay_client.registry.model_functions.get_archive( + api_response = await waylay_client.registry.models.get_archive( 'name_example', # name | path param "name" 'version_example', # version | path param "version" # query parameters: @@ -239,10 +253,10 @@ try: 'ls': False }, ) - print("The response of registry.model_functions.get_archive:\n") + print("The response of registry.models.get_archive:\n") pprint(api_response) except ApiError as e: - print("Exception when calling registry.model_functions.get_archive: %s\n" % e) + print("Exception when calling registry.models.get_archive: %s\n" % e) ``` ### Endpoint @@ -270,7 +284,7 @@ str | False _(default)_ | **`Any`** | If any other string value for the selected ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/octet-stream, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip, application/json + - **Accept**: application/octet-stream, application/tar, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip, application/json ### HTTP response details @@ -309,7 +323,7 @@ waylay_client = WaylayClient.from_profile() try: # Get File From Model Archive # calls `GET /registry/v2/models/{name}/versions/{version}/content/{wildcard}` - api_response = await waylay_client.registry.model_functions.get_asset( + api_response = await waylay_client.registry.models.get_asset( 'name_example', # name | path param "name" 'version_example', # version | path param "version" 'wildcard_example', # wildcard | path param "wildcard" @@ -318,10 +332,10 @@ try: 'ls': False }, ) - print("The response of registry.model_functions.get_asset:\n") + print("The response of registry.models.get_asset:\n") pprint(api_response) except ApiError as e: - print("Exception when calling registry.model_functions.get_asset: %s\n" % e) + print("Exception when calling registry.models.get_asset: %s\n" % e) ``` ### Endpoint @@ -350,7 +364,7 @@ str | False _(default)_ | **`Any`** | If any other string value for the selected ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/octet-stream, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip, application/json + - **Accept**: application/octet-stream, application/tar, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip, application/json ### HTTP response details @@ -388,7 +402,7 @@ from waylay.services.registry.models.get_model_response_v2 import GetModelRespon try: # Get Latest Model Version # calls `GET /registry/v2/models/{name}` - api_response = await waylay_client.registry.model_functions.get_latest( + api_response = await waylay_client.registry.models.get_latest( 'name_example', # name | path param "name" # query parameters: query = { @@ -396,10 +410,10 @@ try: 'includeDeprecated': True }, ) - print("The response of registry.model_functions.get_latest:\n") + print("The response of registry.models.get_latest:\n") pprint(api_response) except ApiError as e: - print("Exception when calling registry.model_functions.get_latest: %s\n" % e) + print("Exception when calling registry.models.get_latest: %s\n" % e) ``` ### Endpoint @@ -465,14 +479,14 @@ from waylay.services.registry.models.get_model_response_v2 import GetModelRespon try: # Get Model Version # calls `GET /registry/v2/models/{name}/versions/{version}` - api_response = await waylay_client.registry.model_functions.get( + api_response = await waylay_client.registry.models.get( 'name_example', # name | path param "name" 'version_example', # version | path param "version" ) - print("The response of registry.model_functions.get:\n") + print("The response of registry.models.get:\n") pprint(api_response) except ApiError as e: - print("Exception when calling registry.model_functions.get: %s\n" % e) + print("Exception when calling registry.models.get: %s\n" % e) ``` ### Endpoint @@ -540,17 +554,17 @@ from waylay.services.registry.models.jobs_for_model_response_v2 import JobsForMo try: # List Model Jobs # calls `GET /registry/v2/models/{name}/versions/{version}/jobs` - api_response = await waylay_client.registry.model_functions.jobs( + api_response = await waylay_client.registry.models.jobs( 'name_example', # name | path param "name" 'version_example', # version | path param "version" # query parameters: query = { }, ) - print("The response of registry.model_functions.jobs:\n") + print("The response of registry.models.jobs:\n") pprint(api_response) except ApiError as e: - print("Exception when calling registry.model_functions.jobs: %s\n" % e) + print("Exception when calling registry.models.jobs: %s\n" % e) ``` ### Endpoint @@ -601,7 +615,7 @@ str | False _(default)_ | **`Any`** | If any other string value for the selected List Models -List the (latest) versions of available models. ### List Latest Model Versions By default, the result includes the latest non-deprecated, non-draft version for each model name. If there is no such version, the latest _deprecated_ or the latest _draft_ version is included, with the former taking precedence. Use the boolean query parameters includeDeprecated or includeDraft to change this behaviour:
  • includeDeprecated=true: do not prefer non-deprecated versions as a latest version: if the latest version is a deprecated one, it will be shown, even if there are older non-deprecated versions.
  • includeDraft=true: do not prefer non-draft versions as a latest version: if the latest version is a draft, it will be shown, even if there are older non-draft versions.
As long as no _version filters_ are used, each listed model version item will contain a HAL **link to the latest** _draft_ (`entities[]._links.draft`) or latest _published_ (`entities[]._links.publisned`) version (if existing and different). ### List Latest Model Versions (with filter) When any of the _version filter_ query parameters are used, the response contains the _latest_ version per named model that satisfy the filters, but **without links**. ### List All Model Versions When using `latest=false` (default when using the `namedVersion` filter), the listing contains _all_ models versions that satisfy the query, possibly multiple versions per named models. No HAL links are provided. #### Filter on _status_ By default model versions with status `undeployed` are **excluded** in all cases. Use the _version filter_ `status` to include/exclude a status from the results. By example, > `?status=any&includeDeprecated=true&includeDraft=true&latest=false` will list _ALL_ versions known to the function registry. #### Version filter parameters The following query parameters are _version filters_ for the model listing: > `version`, `status`, `runtimeVersion`, `createdBy`, `createdBefore`, `createdAfter`, `updatedBy`, `updatedBefore`, `updatedAfter`, `nameVersion`, `deprecated`, `draft` +List the (latest) versions of available models. ### List Latest Model Versions By default, the result includes the latest non-deprecated, non-draft version for each model name. If there is no such version, the latest _deprecated_ or the latest _draft_ version is included, with the former taking precedence. Use the boolean query parameters includeDeprecated or includeDraft to change this behaviour:
  • includeDeprecated=true: do not prefer non-deprecated versions as a latest version: if the latest version is a deprecated one, it will be shown, even if there are older non-deprecated versions.
  • includeDraft=true: do not prefer non-draft versions as a latest version: if the latest version is a draft, it will be shown, even if there are older non-draft versions.
As long as no version filters are used, each listed model version contains representations of the latest draft (`entities[]._links.draft`) or latest published (`entities[]._links.published`) version (if existing and different). Use the query parameter `showRelated` to include only a link (default `showRelated=link`) or a full representation (`showRelated=embed`). ### List Latest Model Versions (with filter) When any of the _version filter_ query parameters are used, the response contains the _latest_ version per named model that satisfy the filters, but **without links**. ### List All Model Versions When using `latest=false` (default when using the `namedVersion` filter), the listing contains _all_ models versions that satisfy the query, possibly multiple versions per named models. No HAL links are provided. #### Filter on _status_ By default model versions with status `undeployed` are **excluded** in all cases. Use the _version filter_ `status` to include/exclude a status from the results. By example, > `?status=any&includeDeprecated=true&includeDraft=true&latest=false` will list _ALL_ versions known to the function registry. #### Version filter parameters The following query parameters are _version filters_ for the model listing: > `version`, `status`, `runtimeVersion`, `createdBy`, `createdBefore`, `createdAfter`, `updatedBy`, `updatedBefore`, `updatedAfter`, `nameVersion`, `deprecated`, `draft` ### Example @@ -618,11 +632,12 @@ waylay_client = WaylayClient.from_profile() # Note that the typed model classes for responses/parameters/... are only available when `waylay-sdk-registry-types` is installed from waylay.services.registry.models.archive_format import ArchiveFormat from waylay.services.registry.models.latest_models_response_v2 import LatestModelsResponseV2 +from waylay.services.registry.models.show_related_type import ShowRelatedType from waylay.services.registry.models.status_filter import StatusFilter try: # List Models # calls `GET /registry/v2/models/` - api_response = await waylay_client.registry.model_functions.list( + api_response = await waylay_client.registry.models.list( # query parameters: query = { 'includeDraft': True @@ -632,12 +647,13 @@ try: 'createdBy': '@me' 'updatedBy': '@me' 'latest': True + 'showRelated': 'embed' }, ) - print("The response of registry.model_functions.list:\n") + print("The response of registry.models.list:\n") pprint(api_response) except ApiError as e: - print("Exception when calling registry.model_functions.list: %s\n" % e) + print("Exception when calling registry.models.list: %s\n" % e) ``` ### Endpoint @@ -669,6 +685,7 @@ Name | Type | API binding | Description | Notes **query['archiveFormat']** (dict)
**query.archive_format** (Query) | [**List[ArchiveFormat]**](ArchiveFormat.md) | query parameter `"archiveFormat"` | Filter on the archive format of the function. | [optional] **query['runtime']** (dict)
**query.runtime** (Query) | [**List[str]**](str.md) | query parameter `"runtime"` | Filter on the runtime of the function. | [optional] **query['latest']** (dict)
**query.latest** (Query) | **bool** | query parameter `"latest"` | When `true`, only the latest version per function name is returned. If set to `false`, multiple versions per named function can be returned. Defaults to `true`, except when specific versions are selected with the `nameVersion` filter. | [optional] +**query['showRelated']** (dict)
**query.show_related** (Query) | [**ShowRelatedType**](.md) | query parameter `"showRelated"` | Sets the representation of related function versions (like the _latest_ draft and/or published) in the response. - `embed`: as full summary representation (in `_embedded`). - `link`: as HAL link in (in `_links`). - `none`: omitted. | [optional] **headers** | [HeaderTypes](Operation.md#req_headers) | request headers | | ### Return type @@ -722,7 +739,7 @@ from waylay.services.registry.models.status_filter import StatusFilter try: # List Model Versions # calls `GET /registry/v2/models/{name}/versions` - api_response = await waylay_client.registry.model_functions.list_versions( + api_response = await waylay_client.registry.models.list_versions( 'name_example', # name | path param "name" # query parameters: query = { @@ -732,10 +749,10 @@ try: 'updatedBy': '@me' }, ) - print("The response of registry.model_functions.list_versions:\n") + print("The response of registry.models.list_versions:\n") pprint(api_response) except ApiError as e: - print("Exception when calling registry.model_functions.list_versions: %s\n" % e) + print("Exception when calling registry.models.list_versions: %s\n" % e) ``` ### Endpoint @@ -816,7 +833,7 @@ from waylay.services.registry.models.get_model_response_v2 import GetModelRespon try: # Patch Model Metadata # calls `PATCH /registry/v2/models/{name}/versions/{version}/metadata` - api_response = await waylay_client.registry.model_functions.patch_metadata( + api_response = await waylay_client.registry.models.patch_metadata( 'name_example', # name | path param "name" 'version_example', # version | path param "version" # query parameters: @@ -825,10 +842,10 @@ try: # json data: use a generated model or a json-serializable python data structure (dict, list) json = waylay.services.registry.FunctionMeta() # FunctionMeta | (optional) ) - print("The response of registry.model_functions.patch_metadata:\n") + print("The response of registry.models.patch_metadata:\n") pprint(api_response) except ApiError as e: - print("Exception when calling registry.model_functions.patch_metadata: %s\n" % e) + print("Exception when calling registry.models.patch_metadata: %s\n" % e) ``` ### Endpoint @@ -897,19 +914,20 @@ from waylay.services.registry.models.post_model_job_sync_response_v2 import Post try: # Publish Draft Model # calls `POST /registry/v2/models/{name}/versions/{version}/publish` - api_response = await waylay_client.registry.model_functions.publish( + api_response = await waylay_client.registry.models.publish( 'name_example', # name | path param "name" 'version_example', # version | path param "version" # query parameters: query = { + 'chown': False 'deprecatePrevious': 'none' 'async': True }, ) - print("The response of registry.model_functions.publish:\n") + print("The response of registry.models.publish:\n") pprint(api_response) except ApiError as e: - print("Exception when calling registry.model_functions.publish: %s\n" % e) + print("Exception when calling registry.models.publish: %s\n" % e) ``` ### Endpoint @@ -923,7 +941,9 @@ Name | Type | API binding | Description | Notes **name** | **str** | path parameter `"name"` | The name of the function. | **version** | **str** | path parameter `"version"` | The version of the function. | **query** | [QueryParamTypes](Operation.md#req_arg_query) \| **None** | URL query parameter | | +**query['chown']** (dict)
**query.chown** (Query) | **bool** | query parameter `"chown"` | If set, ownership of the draft function is transferred to the current user. | [optional] [default False] **query['comment']** (dict)
**query.comment** (Query) | **str** | query parameter `"comment"` | An optional user-specified comment corresponding to the operation. | [optional] +**query['author']** (dict)
**query.author** (Query) | **str** | query parameter `"author"` | Optionally changes the author metadata when updating a function. | [optional] **query['deprecatePrevious']** (dict)
**query.deprecate_previous** (Query) | [**DeprecatePreviousPolicy**](.md) | query parameter `"deprecatePrevious"` | Set the cleanup policy used to automatically deprecate/delete previous versions. | [optional] **query['async']** (dict)
**query.var_async** (Query) | **bool** | query parameter `"async"` | Unless this is set to <code>false</code>, the server will start the required job actions asynchronously and return a <code>202</code> <em>Accepted</em> response. If <code>false</code> the request will block until the job actions are completed, or a timeout occurs. | [optional] [default True] **headers** | [HeaderTypes](Operation.md#req_headers) | request headers | | @@ -980,23 +1000,23 @@ from waylay.services.registry.models.rebuild_policy import RebuildPolicy try: # Rebuild Model # calls `POST /registry/v2/models/{name}/versions/{version}/rebuild` - api_response = await waylay_client.registry.model_functions.rebuild( + api_response = await waylay_client.registry.models.rebuild( 'name_example', # name | path param "name" 'version_example', # version | path param "version" # query parameters: query = { + 'scaleToZero': True 'dryRun': True 'async': True 'upgrade': 'patch' 'ignoreChecks': True - 'scaleToZero': True 'skipRebuild': True }, ) - print("The response of registry.model_functions.rebuild:\n") + print("The response of registry.models.rebuild:\n") pprint(api_response) except ApiError as e: - print("Exception when calling registry.model_functions.rebuild: %s\n" % e) + print("Exception when calling registry.models.rebuild: %s\n" % e) ``` ### Endpoint @@ -1010,13 +1030,13 @@ Name | Type | API binding | Description | Notes **name** | **str** | path parameter `"name"` | The name of the function. | **version** | **str** | path parameter `"version"` | The version of the function. | **query** | [QueryParamTypes](Operation.md#req_arg_query) \| **None** | URL query parameter | | +**query['scaleToZero']** (dict)
**query.scale_to_zero** (Query) | **bool** | query parameter `"scaleToZero"` | Indicates whether the function needs to be scaled down after successful verification. If not set, the function is scaled to zero only if it was not active before this command. | [optional] **query['comment']** (dict)
**query.comment** (Query) | **str** | query parameter `"comment"` | An optional user-specified comment corresponding to the operation. | [optional] **query['dryRun']** (dict)
**query.dry_run** (Query) | **bool** | query parameter `"dryRun"` | If set to <code>true</code>, checks whether rebuild jobs are needed, but do not start any jobs. | [optional] **query['async']** (dict)
**query.var_async** (Query) | **bool** | query parameter `"async"` | Unless this is set to <code>false</code>, the server will start the required job actions asynchronously and return a <code>202</code> <em>Accepted</em> response. If <code>false</code> the request will block until the job actions are completed, or a timeout occurs. | [optional] [default True] **query['upgrade']** (dict)
**query.upgrade** (Query) | [**RebuildPolicy**](.md) | query parameter `"upgrade"` | If set, force a rebuild with the given <em>runtime</em> version selection policy. <ul> <li><code>same</code> <b>patch</b> version. This should only include backward compatible upgrades. </li> <li><code>minor</code> <b>major</b> version. This might include an upgrade of e.g. the language runtime and/or provided dependencies that could break compatiblity with the function. .</li> </ul> | [optional] **query['forceVersion']** (dict)
**query.force_version** (Query) | **str** | query parameter `"forceVersion"` | If set, force a rebuild with the given runtime version (including downgrades). This parameter is mutually exclusive to the `upgrade` parameter. | [optional] **query['ignoreChecks']** (dict)
**query.ignore_checks** (Query) | **bool** | query parameter `"ignoreChecks"` | If set to true, checks that normally prevent a rebuild are overriden. These checks include: * function state in `pending`, `running`, `failed` or `undeployed` * backoff period due to recent failures * usage of deprecated dependencies * running jobs on entity * the `dryRun` option | [optional] -**query['scaleToZero']** (dict)
**query.scale_to_zero** (Query) | **bool** | query parameter `"scaleToZero"` | Indicates whether the function needs to be scaled down after successful (re-)deployment. If not set, the function is scaled to zero only if it was not active before this command. | [optional] **query['skipRebuild']** (dict)
**query.skip_rebuild** (Query) | **bool** | query parameter `"skipRebuild"` | If set, the function will not be rebuild. Always uses the current runtime version when re-deploying/re-verifying the function. | [optional] **headers** | [HeaderTypes](Operation.md#req_headers) | request headers | | @@ -1071,7 +1091,7 @@ from waylay.services.registry.models.undeployed_response_v2 import UndeployedRes try: # Remove Model Version # calls `DELETE /registry/v2/models/{name}/versions/{version}` - api_response = await waylay_client.registry.model_functions.remove_version( + api_response = await waylay_client.registry.models.remove_version( 'name_example', # name | path param "name" 'version_example', # version | path param "version" # query parameters: @@ -1081,10 +1101,10 @@ try: 'undeploy': True }, ) - print("The response of registry.model_functions.remove_version:\n") + print("The response of registry.models.remove_version:\n") pprint(api_response) except ApiError as e: - print("Exception when calling registry.model_functions.remove_version: %s\n" % e) + print("Exception when calling registry.models.remove_version: %s\n" % e) ``` ### Endpoint @@ -1154,7 +1174,7 @@ from waylay.services.registry.models.undeployed_response_v2 import UndeployedRes try: # Remove Model # calls `DELETE /registry/v2/models/{name}` - api_response = await waylay_client.registry.model_functions.remove_versions( + api_response = await waylay_client.registry.models.remove_versions( 'name_example', # name | path param "name" # query parameters: query = { @@ -1163,10 +1183,10 @@ try: 'async': True }, ) - print("The response of registry.model_functions.remove_versions:\n") + print("The response of registry.models.remove_versions:\n") pprint(api_response) except ApiError as e: - print("Exception when calling registry.model_functions.remove_versions: %s\n" % e) + print("Exception when calling registry.models.remove_versions: %s\n" % e) ``` ### Endpoint @@ -1238,14 +1258,16 @@ from waylay.services.registry.models.post_model_job_sync_response_v2 import Post try: # Update Model Asset # calls `PUT /registry/v2/models/{name}/versions/{version}/content/{wildcard}` - api_response = await waylay_client.registry.model_functions.update_asset( + api_response = await waylay_client.registry.models.update_asset( 'name_example', # name | path param "name" 'version_example', # version | path param "version" 'wildcard_example', # wildcard | path param "wildcard" # query parameters: query = { - 'async': True + 'scaleToZero': False + 'deploy': True 'chown': False + 'async': True }, # non-json binary data: use a byte array or a generator of bytearray chuncks content=b'my-binary-data', @@ -1255,10 +1277,10 @@ try: 'content-type': 'application/octet-stream' }, ) - print("The response of registry.model_functions.update_asset:\n") + print("The response of registry.models.update_asset:\n") pprint(api_response) except ApiError as e: - print("Exception when calling registry.model_functions.update_asset: %s\n" % e) + print("Exception when calling registry.models.update_asset: %s\n" % e) ``` ### Endpoint @@ -1274,11 +1296,14 @@ Name | Type | API binding | Description | Notes **wildcard** | **str** | path parameter `"wildcard"` | Full path or path prefix of the asset within the archive | **content** | **[ContentRequest](Operation.md#req_arg_content)** | binary request body | A single asset file. | [optional] **query** | [QueryParamTypes](Operation.md#req_arg_query) \| **None** | URL query parameter | | +**query['scaleToZero']** (dict)
**query.scale_to_zero** (Query) | **bool** | query parameter `"scaleToZero"` | If set to <code>true</code>, after successful deployment, the deployed function will be scaled to zero. This saves computing resources when the function is not to be used immediately. | [optional] [default False] +**query['deploy']** (dict)
**query.deploy** (Query) | **bool** | query parameter `"deploy"` | Indicates that a function should be _deployed_ when its assets are valid. * If `true` (default), jobs to build and deploy the function will be initiated after it is checked that the assets are valid. Invalid assets lead to a validation error, and the function and its assets are not created or updated. * If `false`, the uploaded assets are stored and the function is created/updated in `registered` state. Asset validation errors are only returned as warning, and stored as `failureReason` on the function entity. Use an _asset update_ or _rebuild_ to initiate a build and deploy at a later stage. | [optional] [default True] +**query['chown']** (dict)
**query.chown** (Query) | **bool** | query parameter `"chown"` | If set, ownership of the draft function is transferred to the current user. | [optional] [default False] **query['comment']** (dict)
**query.comment** (Query) | **str** | query parameter `"comment"` | An optional user-specified comment corresponding to the operation. | [optional] +**query['author']** (dict)
**query.author** (Query) | **str** | query parameter `"author"` | Optionally changes the author metadata when updating a function. | [optional] **query['async']** (dict)
**query.var_async** (Query) | **bool** | query parameter `"async"` | Unless this is set to <code>false</code>, the server will start the required job actions asynchronously and return a <code>202</code> <em>Accepted</em> response. If <code>false</code> the request will block until the job actions are completed, or a timeout occurs. | [optional] [default True] -**query['chown']** (dict)
**query.chown** (Query) | **bool** | query parameter `"chown"` | If set, ownership of the draft function is transferred to the current user. | [default False] **headers** | [HeaderTypes](Operation.md#req_headers) | request headers | | -**headers['content-type']** | **str** | content type | request header `"content-type"` | should match mediaType `application/octet-stream` +**headers['content-type']** | **str** | content type | request header `"content-type"` | should match mediaType ### Return type @@ -1290,7 +1315,7 @@ str | False _(default)_ | **`Any`** | If any other string value for the selected ### HTTP request headers - - **Content-Type**: application/octet-stream + - **Content-Type**: Not defined - **Accept**: application/json ### HTTP response details @@ -1299,6 +1324,7 @@ str | False _(default)_ | **`Any`** | If any other string value for the selected |-------------|-------------|------------------| **201** | Default Response | - | **202** | Default Response | - | +**403** | Default Response | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -1313,7 +1339,7 @@ str | False _(default)_ | **`Any`** | If any other string value for the selected Update Model Assets -Update a draft model function by updating its assets. The assets for a model function can be provided as either
  • a single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
  • separate files in a multipart/form-data request
The provided assets will be added to the model function's collection of existing assets, replacing any existing assets with the same name. Please note that it is not allowed to update the model.json json file with a changed value for any of the name, version and/or runtime attributes. For each runtime other files are supported. +Update a draft model function by updating its assets. The assets for a model function can be provided as either
  • a single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
  • separate files in a multipart/form-data request
The provided assets will be added to the model function's collection of existing assets, replacing any existing assets with the same name. Please note that it is not allowed to update the model.json json file with a changed value for any of the name, version and/or runtime attributes. For each runtime other files are supported. ### Example @@ -1328,31 +1354,32 @@ from waylay.sdk.api.api_exceptions import ApiError waylay_client = WaylayClient.from_profile() # Note that the typed model classes for responses/parameters/... are only available when `waylay-sdk-registry-types` is installed -from waylay.services.registry.models.multipart_file_upload import MultipartFileUpload from waylay.services.registry.models.post_model_job_sync_response_v2 import PostModelJobSyncResponseV2 try: # Update Model Assets # calls `PUT /registry/v2/models/{name}/versions/{version}/content` - api_response = await waylay_client.registry.model_functions.update_assets( + api_response = await waylay_client.registry.models.update_assets( 'name_example', # name | path param "name" 'version_example', # version | path param "version" # query parameters: query = { - 'async': True + 'scaleToZero': False + 'deploy': True 'chown': False + 'async': True }, # non-json binary data: use a byte array or a generator of bytearray chuncks content=b'my-binary-data', # this operation supports multiple request content types: use `headers` to specify the one used - # alternatives: 'application/tar+gzip', 'application/x-gzip', 'application/x-tar', 'application/gzip', 'multipart/form-data', + # alternatives: 'application/tar', 'application/tar+gzip', 'application/x-gzip', 'application/x-tar', 'application/gzip', 'multipart/form-data', headers = { 'content-type': 'application/octet-stream' }, ) - print("The response of registry.model_functions.update_assets:\n") + print("The response of registry.models.update_assets:\n") pprint(api_response) except ApiError as e: - print("Exception when calling registry.model_functions.update_assets: %s\n" % e) + print("Exception when calling registry.models.update_assets: %s\n" % e) ``` ### Endpoint @@ -1365,14 +1392,17 @@ Name | Type | API binding | Description | Notes -------- | ----- | ------------- | ------------- | ------------- **name** | **str** | path parameter `"name"` | The name of the function. | **version** | **str** | path parameter `"version"` | The version of the function. | -**content** | **[ContentRequest](Operation.md#req_arg_content)** | binary request body | The assets for a <em>model</em> function can be provided as either <ul> <li>a single <em>tar</em> archive (optionally compressed), with one of the content types <code>application/octet-stream</code>, <code>application/tar+gzip</code>, <code>application/x-gzip</code>, <code>application/x-tar</code>, <code>application/gzip</code></li> <li>separate files in a <code>multipart/form-data</code> request</li> </ul> The provided assets will be added to the <em>model</em> function's collection of existing assets, replacing any existing assets with the same name. Please note that it is not allowed to update the model.json</code> json file with a changed value for any of the <code>name</code>, <code>version</code> and/or <code>runtime</code> attributes. For each <em>runtime</em> other files are supported. | [optional] +**content** | **[ContentRequest](Operation.md#req_arg_content)** | binary request body | The assets for a <em>model</em> function can be provided as either <ul> <li>a single <em>tar</em> archive (optionally compressed), with one of the content types <code>application/octet-stream</code>, <code>application/tar</code>, <code>application/tar+gzip</code>, <code>application/x-gzip</code>, <code>application/x-tar</code>, <code>application/gzip</code></li> <li>separate files in a <code>multipart/form-data</code> request</li> </ul> The provided assets will be added to the <em>model</em> function's collection of existing assets, replacing any existing assets with the same name. Please note that it is not allowed to update the model.json</code> json file with a changed value for any of the <code>name</code>, <code>version</code> and/or <code>runtime</code> attributes. For each <em>runtime</em> other files are supported. | [optional] **files** | **[FileTypes](Operation.md#req_arg_files)** | request body files | | **query** | [QueryParamTypes](Operation.md#req_arg_query) \| **None** | URL query parameter | | +**query['scaleToZero']** (dict)
**query.scale_to_zero** (Query) | **bool** | query parameter `"scaleToZero"` | If set to <code>true</code>, after successful deployment, the deployed function will be scaled to zero. This saves computing resources when the function is not to be used immediately. | [optional] [default False] +**query['deploy']** (dict)
**query.deploy** (Query) | **bool** | query parameter `"deploy"` | Indicates that a function should be _deployed_ when its assets are valid. * If `true` (default), jobs to build and deploy the function will be initiated after it is checked that the assets are valid. Invalid assets lead to a validation error, and the function and its assets are not created or updated. * If `false`, the uploaded assets are stored and the function is created/updated in `registered` state. Asset validation errors are only returned as warning, and stored as `failureReason` on the function entity. Use an _asset update_ or _rebuild_ to initiate a build and deploy at a later stage. | [optional] [default True] +**query['chown']** (dict)
**query.chown** (Query) | **bool** | query parameter `"chown"` | If set, ownership of the draft function is transferred to the current user. | [optional] [default False] **query['comment']** (dict)
**query.comment** (Query) | **str** | query parameter `"comment"` | An optional user-specified comment corresponding to the operation. | [optional] +**query['author']** (dict)
**query.author** (Query) | **str** | query parameter `"author"` | Optionally changes the author metadata when updating a function. | [optional] **query['async']** (dict)
**query.var_async** (Query) | **bool** | query parameter `"async"` | Unless this is set to <code>false</code>, the server will start the required job actions asynchronously and return a <code>202</code> <em>Accepted</em> response. If <code>false</code> the request will block until the job actions are completed, or a timeout occurs. | [optional] [default True] -**query['chown']** (dict)
**query.chown** (Query) | **bool** | query parameter `"chown"` | If set, ownership of the draft function is transferred to the current user. | [default False] **headers** | [HeaderTypes](Operation.md#req_headers) | request headers | | -**headers['content-type']** | **str** | content type | request header `"content-type"` | should match mediaType `application/octet-stream`, `application/tar+gzip`, `application/x-gzip`, `application/x-tar`, `application/gzip`, `multipart/form-data` +**headers['content-type']** | **str** | content type | request header `"content-type"` | should match mediaType `application/octet-stream`, `application/tar`, `application/tar+gzip`, `application/x-gzip`, `application/x-tar`, `application/gzip`, `multipart/form-data` ### Return type @@ -1384,7 +1414,7 @@ str | False _(default)_ | **`Any`** | If any other string value for the selected ### HTTP request headers - - **Content-Type**: application/octet-stream, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip, multipart/form-data + - **Content-Type**: application/octet-stream, application/tar, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip, multipart/form-data - **Accept**: application/json ### HTTP response details @@ -1393,6 +1423,7 @@ str | False _(default)_ | **`Any`** | If any other string value for the selected |-------------|-------------|------------------| **201** | Default Response | - | **202** | Default Response | - | +**403** | Default Response | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -1425,19 +1456,19 @@ from waylay.services.registry.models.verify_model_sync_response_v2 import Verify try: # Verify Health Of Model # calls `POST /registry/v2/models/{name}/versions/{version}/verify` - api_response = await waylay_client.registry.model_functions.verify( + api_response = await waylay_client.registry.models.verify( 'name_example', # name | path param "name" 'version_example', # version | path param "version" # query parameters: query = { - 'async': True 'scaleToZero': True + 'async': True }, ) - print("The response of registry.model_functions.verify:\n") + print("The response of registry.models.verify:\n") pprint(api_response) except ApiError as e: - print("Exception when calling registry.model_functions.verify: %s\n" % e) + print("Exception when calling registry.models.verify: %s\n" % e) ``` ### Endpoint @@ -1451,9 +1482,8 @@ Name | Type | API binding | Description | Notes **name** | **str** | path parameter `"name"` | The name of the function. | **version** | **str** | path parameter `"version"` | The version of the function. | **query** | [QueryParamTypes](Operation.md#req_arg_query) \| **None** | URL query parameter | | -**query['comment']** (dict)
**query.comment** (Query) | **str** | query parameter `"comment"` | An optional user-specified comment corresponding to the operation. | [optional] -**query['async']** (dict)
**query.var_async** (Query) | **bool** | query parameter `"async"` | Unless this is set to <code>false</code>, the server will start the required job actions asynchronously and return a <code>202</code> <em>Accepted</em> response. If <code>false</code> the request will block until the job actions are completed, or a timeout occurs. | [optional] [default True] **query['scaleToZero']** (dict)
**query.scale_to_zero** (Query) | **bool** | query parameter `"scaleToZero"` | Indicates whether the function needs to be scaled down after successful verification. If not set, the function is scaled to zero only if it was not active before this command. | [optional] +**query['async']** (dict)
**query.var_async** (Query) | **bool** | query parameter `"async"` | Unless this is set to <code>false</code>, the server will start the required job actions asynchronously and return a <code>202</code> <em>Accepted</em> response. If <code>false</code> the request will block until the job actions are completed, or a timeout occurs. | [optional] [default True] **headers** | [HeaderTypes](Operation.md#req_headers) | request headers | | ### Return type diff --git a/docs/MultipartFileUpload.md b/docs/MultipartFileUpload.md deleted file mode 100644 index d111b105..00000000 --- a/docs/MultipartFileUpload.md +++ /dev/null @@ -1,30 +0,0 @@ -# MultipartFileUpload - -A multi-part upload containing one or more file assets. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**filename** | **List[bytearray]** | | [optional] - -## Example - -```python -from waylay.services.registry.models.multipart_file_upload import MultipartFileUpload - -# TODO update the JSON string below -json = "{}" -# create an instance of MultipartFileUpload from a JSON string -multipart_file_upload_instance = MultipartFileUpload.from_json(json) -# print the JSON string representation of the object -print MultipartFileUpload.to_json() - -# convert the object into a dict -multipart_file_upload_dict = multipart_file_upload_instance.to_dict() -# create an instance of MultipartFileUpload from a dict -multipart_file_upload_form_dict = multipart_file_upload.from_dict(multipart_file_upload_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/NamedFunctionVersionsQuery.md b/docs/NamedFunctionVersionsQuery.md deleted file mode 100644 index 5399147c..00000000 --- a/docs/NamedFunctionVersionsQuery.md +++ /dev/null @@ -1,44 +0,0 @@ -# NamedFunctionVersionsQuery - -Named function versions listing query. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**limit** | **float** | The maximum number of items to be return from this query. Has a deployment-defined default and maximum value. | [optional] -**page** | **float** | The number of pages to skip when returning result to this query. | [optional] -**deprecated** | **bool** | Filter on the deprecation status of the function. | [optional] -**draft** | **bool** | Filter on the draft status of the function. | [optional] -**version** | **str** | Filter on the version of the function (case-sensitive, supports wildcards). | [optional] -**status** | [**List[StatusFilter]**](StatusFilter.md) | Filter on the status of the plug. Filter values with a `-` postfix exclude the status. Use the `any` filter value to include all states. When not specified, a default `undeployed-` filter excludes _undeployed_ functions. | [optional] -**runtime_version** | [**SemanticVersionRange**](SemanticVersionRange.md) | | [optional] -**created_by** | **str** | Filter on the user that create the plug. You can use the `@me` token to indicate your own plugs. | [optional] -**updated_by** | **str** | Filter on the user that last updated the plug. You can use the `@me` token to indicate your own plugs. | [optional] -**created_before** | [**TimestampSpec**](TimestampSpec.md) | | [optional] -**created_after** | [**TimestampSpec**](TimestampSpec.md) | | [optional] -**updated_before** | [**TimestampSpec**](TimestampSpec.md) | | [optional] -**updated_after** | [**TimestampSpec**](TimestampSpec.md) | | [optional] -**archive_format** | [**List[ArchiveFormat]**](ArchiveFormat.md) | Filter on the archive format of the function. | [optional] -**runtime** | **List[str]** | Filter on the runtime of the function. | [optional] - -## Example - -```python -from waylay.services.registry.models.named_function_versions_query import NamedFunctionVersionsQuery - -# TODO update the JSON string below -json = "{}" -# create an instance of NamedFunctionVersionsQuery from a JSON string -named_function_versions_query_instance = NamedFunctionVersionsQuery.from_json(json) -# print the JSON string representation of the object -print NamedFunctionVersionsQuery.to_json() - -# convert the object into a dict -named_function_versions_query_dict = named_function_versions_query_instance.to_dict() -# create an instance of NamedFunctionVersionsQuery from a dict -named_function_versions_query_form_dict = named_function_versions_query.from_dict(named_function_versions_query_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/NamedVersionsFilter.md b/docs/NamedVersionsFilter.md deleted file mode 100644 index 562d0099..00000000 --- a/docs/NamedVersionsFilter.md +++ /dev/null @@ -1,29 +0,0 @@ -# NamedVersionsFilter - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name_version** | **List[str]** | Filter on exact `{name}@{version}` functions. Using this filter implies a `latest=false` default, returning multiple versions of the same named versions if they are filtered. | [optional] - -## Example - -```python -from waylay.services.registry.models.named_versions_filter import NamedVersionsFilter - -# TODO update the JSON string below -json = "{}" -# create an instance of NamedVersionsFilter from a JSON string -named_versions_filter_instance = NamedVersionsFilter.from_json(json) -# print the JSON string representation of the object -print NamedVersionsFilter.to_json() - -# convert the object into a dict -named_versions_filter_dict = named_versions_filter_instance.to_dict() -# create an instance of NamedVersionsFilter from a dict -named_versions_filter_form_dict = named_versions_filter.from_dict(named_versions_filter_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/NotifyResult.md b/docs/NotifyResult.md new file mode 100644 index 00000000..b1cb2a8b --- /dev/null +++ b/docs/NotifyResult.md @@ -0,0 +1,30 @@ +# NotifyResult + +The result data for a change notification. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**operation** | [**RequestOperation**](RequestOperation.md) | | + +## Example + +```python +from waylay.services.registry.models.notify_result import NotifyResult + +# TODO update the JSON string below +json = "{}" +# create an instance of NotifyResult from a JSON string +notify_result_instance = NotifyResult.from_json(json) +# print the JSON string representation of the object +print NotifyResult.to_json() + +# convert the object into a dict +notify_result_dict = notify_result_instance.to_dict() +# create an instance of NotifyResult from a dict +notify_result_form_dict = notify_result.from_dict(notify_result_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PagingQuery.md b/docs/PagingQuery.md deleted file mode 100644 index 7b497ff4..00000000 --- a/docs/PagingQuery.md +++ /dev/null @@ -1,30 +0,0 @@ -# PagingQuery - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**limit** | **float** | The maximum number of items to be return from this query. Has a deployment-defined default and maximum value. | [optional] -**page** | **float** | The number of pages to skip when returning result to this query. | [optional] - -## Example - -```python -from waylay.services.registry.models.paging_query import PagingQuery - -# TODO update the JSON string below -json = "{}" -# create an instance of PagingQuery from a JSON string -paging_query_instance = PagingQuery.from_json(json) -# print the JSON string representation of the object -print PagingQuery.to_json() - -# convert the object into a dict -paging_query_dict = paging_query_instance.to_dict() -# create an instance of PagingQuery from a dict -paging_query_form_dict = paging_query.from_dict(paging_query_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PlugDeleteQuery.md b/docs/PlugDeleteQuery.md deleted file mode 100644 index d7632aba..00000000 --- a/docs/PlugDeleteQuery.md +++ /dev/null @@ -1,30 +0,0 @@ -# PlugDeleteQuery - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**force** | **bool** | If <code>true</code>, the plug version(s) will be undeployed and removed. Otherwise, the plug version(s) will only be <code>deprecated</code>, i.e removed from regular listings. | [optional] -**undeploy** | **bool** | If `true`, the `DELETE` operation * undeploys the (openfaas) function for the plug: it becomes no longer available for invocation. * does NOT remove the plug from registry: it stays in an `undeployed` status. All assets and definitions are retained, so the plug can be restored later with a _rebuild_ action. If `false`, the `DELETE` operation * _only_ marks the plug version(s) as _deprecated_: the plug remains active but is removed from the default listings. This also applies to _draft_ versions. This parameter is incompatible with `force=true`. If not set the default behaviour applies: * _draft_ versions are _undeployed_ and _removed_ from registry. * non-_draft_ versions are marked _deprecated_ only. | [optional] - -## Example - -```python -from waylay.services.registry.models.plug_delete_query import PlugDeleteQuery - -# TODO update the JSON string below -json = "{}" -# create an instance of PlugDeleteQuery from a JSON string -plug_delete_query_instance = PlugDeleteQuery.from_json(json) -# print the JSON string representation of the object -print PlugDeleteQuery.to_json() - -# convert the object into a dict -plug_delete_query_dict = plug_delete_query_instance.to_dict() -# create an instance of PlugDeleteQuery from a dict -plug_delete_query_form_dict = plug_delete_query.from_dict(plug_delete_query_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PlugTypeQuery.md b/docs/PlugTypeQuery.md deleted file mode 100644 index f155cc53..00000000 --- a/docs/PlugTypeQuery.md +++ /dev/null @@ -1,29 +0,0 @@ -# PlugTypeQuery - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**type** | [**PlugType**](PlugType.md) | | [optional] - -## Example - -```python -from waylay.services.registry.models.plug_type_query import PlugTypeQuery - -# TODO update the JSON string below -json = "{}" -# create an instance of PlugTypeQuery from a JSON string -plug_type_query_instance = PlugTypeQuery.from_json(json) -# print the JSON string representation of the object -print PlugTypeQuery.to_json() - -# convert the object into a dict -plug_type_query_dict = plug_type_query_instance.to_dict() -# create an instance of PlugTypeQuery from a dict -plug_type_query_form_dict = plug_type_query.from_dict(plug_type_query_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PlugFunctionsApi.md b/docs/PlugsApi.md similarity index 77% rename from docs/PlugFunctionsApi.md rename to docs/PlugsApi.md index a6d9dc22..03095425 100644 --- a/docs/PlugFunctionsApi.md +++ b/docs/PlugsApi.md @@ -1,27 +1,27 @@ -# waylay.services.registry.PlugFunctionsApi +# waylay.services.registry.PlugsApi -All URIs are relative to *https://api.waylay.io* +All URIs are relative to *https://api-aws-dev.waylay.io* Method | HTTP request | Description ------------- | ------------- | ------------- -[**create**](PlugFunctionsApi.md#create) | **POST** /registry/v2/plugs/ | Create Plug -[**delete_asset**](PlugFunctionsApi.md#delete_asset) | **DELETE** /registry/v2/plugs/{name}/versions/{version}/content/{wildcard} | Delete Plug Asset -[**get_archive**](PlugFunctionsApi.md#get_archive) | **GET** /registry/v2/plugs/{name}/versions/{version}/content | Get Plug Archive -[**get_asset**](PlugFunctionsApi.md#get_asset) | **GET** /registry/v2/plugs/{name}/versions/{version}/content/{wildcard} | Get File From Plug Archive -[**get_latest**](PlugFunctionsApi.md#get_latest) | **GET** /registry/v2/plugs/{name} | Get Latest Plug Version -[**get**](PlugFunctionsApi.md#get) | **GET** /registry/v2/plugs/{name}/versions/{version} | Get Plug Version -[**jobs**](PlugFunctionsApi.md#jobs) | **GET** /registry/v2/plugs/{name}/versions/{version}/jobs | List Plug Jobs -[**list**](PlugFunctionsApi.md#list) | **GET** /registry/v2/plugs/ | List Plugs -[**list_versions**](PlugFunctionsApi.md#list_versions) | **GET** /registry/v2/plugs/{name}/versions | List Plug Versions -[**patch_interface**](PlugFunctionsApi.md#patch_interface) | **PATCH** /registry/v2/plugs/{name}/versions/{version}/interface | Patch Plug Interface -[**patch_metadata**](PlugFunctionsApi.md#patch_metadata) | **PATCH** /registry/v2/plugs/{name}/versions/{version}/metadata | Patch Plug Metadata -[**publish**](PlugFunctionsApi.md#publish) | **POST** /registry/v2/plugs/{name}/versions/{version}/publish | Publish Draft Plug -[**rebuild**](PlugFunctionsApi.md#rebuild) | **POST** /registry/v2/plugs/{name}/versions/{version}/rebuild | Rebuild Plug -[**remove_version**](PlugFunctionsApi.md#remove_version) | **DELETE** /registry/v2/plugs/{name}/versions/{version} | Remove Plug Version -[**remove_versions**](PlugFunctionsApi.md#remove_versions) | **DELETE** /registry/v2/plugs/{name} | Remove Plug -[**update_asset**](PlugFunctionsApi.md#update_asset) | **PUT** /registry/v2/plugs/{name}/versions/{version}/content/{wildcard} | Update Plug Asset -[**update_assets**](PlugFunctionsApi.md#update_assets) | **PUT** /registry/v2/plugs/{name}/versions/{version}/content | Update Plug Assets -[**verify**](PlugFunctionsApi.md#verify) | **POST** /registry/v2/plugs/{name}/versions/{version}/verify | Verify Health Of Plug +[**create**](PlugsApi.md#create) | **POST** /registry/v2/plugs/ | Create Plug +[**delete_asset**](PlugsApi.md#delete_asset) | **DELETE** /registry/v2/plugs/{name}/versions/{version}/content/{wildcard} | Delete Plug Asset +[**get_archive**](PlugsApi.md#get_archive) | **GET** /registry/v2/plugs/{name}/versions/{version}/content | Get Plug Archive +[**get_asset**](PlugsApi.md#get_asset) | **GET** /registry/v2/plugs/{name}/versions/{version}/content/{wildcard} | Get File From Plug Archive +[**get_latest**](PlugsApi.md#get_latest) | **GET** /registry/v2/plugs/{name} | Get Latest Plug Version +[**get**](PlugsApi.md#get) | **GET** /registry/v2/plugs/{name}/versions/{version} | Get Plug Version +[**jobs**](PlugsApi.md#jobs) | **GET** /registry/v2/plugs/{name}/versions/{version}/jobs | List Plug Jobs +[**list**](PlugsApi.md#list) | **GET** /registry/v2/plugs/ | List Plugs +[**list_versions**](PlugsApi.md#list_versions) | **GET** /registry/v2/plugs/{name}/versions | List Plug Versions +[**patch_interface**](PlugsApi.md#patch_interface) | **PATCH** /registry/v2/plugs/{name}/versions/{version}/interface | Patch Plug Interface +[**patch_metadata**](PlugsApi.md#patch_metadata) | **PATCH** /registry/v2/plugs/{name}/versions/{version}/metadata | Patch Plug Metadata +[**publish**](PlugsApi.md#publish) | **POST** /registry/v2/plugs/{name}/versions/{version}/publish | Publish Draft Plug +[**rebuild**](PlugsApi.md#rebuild) | **POST** /registry/v2/plugs/{name}/versions/{version}/rebuild | Rebuild Plug +[**remove_version**](PlugsApi.md#remove_version) | **DELETE** /registry/v2/plugs/{name}/versions/{version} | Remove Plug Version +[**remove_versions**](PlugsApi.md#remove_versions) | **DELETE** /registry/v2/plugs/{name} | Remove Plug +[**update_asset**](PlugsApi.md#update_asset) | **PUT** /registry/v2/plugs/{name}/versions/{version}/content/{wildcard} | Update Plug Asset +[**update_assets**](PlugsApi.md#update_assets) | **PUT** /registry/v2/plugs/{name}/versions/{version}/content | Update Plug Assets +[**verify**](PlugsApi.md#verify) | **POST** /registry/v2/plugs/{name}/versions/{version}/verify | Verify Health Of Plug # **create** > create( @@ -32,7 +32,7 @@ Method | HTTP request | Description Create Plug -Creates a new plug function by uploading its assets. The assets for a plug function can be provided as either
  • a single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
  • separate files in a multipart/form-data request
The required plug.json json file contains the function metadata, and must have a runtime attribute that is one of the supported runtimes (see GET /registry/v2/runtimes?functionType=plugs). For each runtime other files will be required or supported. +Creates a new plug function by uploading its assets. The assets for a plug function can be provided as
  • A single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
  • Separate files in a multipart/form-data request
  • A reference to the assets of another plug in the copy argument
The required plug.json json file contains the function metadata, and must have a runtime attribute that is one of the supported runtimes (see GET /registry/v2/runtimes?functionType=plugs). For each runtime other files will be required or supported. ### Example @@ -48,32 +48,34 @@ waylay_client = WaylayClient.from_profile() # Note that the typed model classes for responses/parameters/... are only available when `waylay-sdk-registry-types` is installed from waylay.services.registry.models.deprecate_previous_policy import DeprecatePreviousPolicy -from waylay.services.registry.models.multipart_file_upload import MultipartFileUpload from waylay.services.registry.models.post_plug_job_sync_response_v2 import PostPlugJobSyncResponseV2 try: # Create Plug # calls `POST /registry/v2/plugs/` - api_response = await waylay_client.registry.plug_functions.create( + api_response = await waylay_client.registry.plugs.create( # query parameters: query = { + 'deploy': True + 'scaleToZero': False 'deprecatePrevious': 'none' 'dryRun': True 'async': True - 'scaleToZero': False 'draft': False }, + # json data: use a generated model or a json-serializable python data structure (dict, list) + json = None # bytearray | The assets for a plug function can be provided as
  • A single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
  • Separate files in a multipart/form-data request
  • A reference to the assets of another plug in the copy argument
The required plug.json json file contains the function metadata, and must have a runtime attribute that is one of the supported runtimes (see GET /registry/v2/runtimes?functionType=plugs). For each runtime other files will be required or supported. (optional) # non-json binary data: use a byte array or a generator of bytearray chuncks content=b'my-binary-data', # this operation supports multiple request content types: use `headers` to specify the one used - # alternatives: 'application/tar+gzip', 'application/x-gzip', 'application/x-tar', 'application/gzip', 'multipart/form-data', + # alternatives: 'application/tar', 'application/tar+gzip', 'application/x-gzip', 'application/x-tar', 'application/gzip', 'multipart/form-data', 'application/json', '*/*+json', headers = { 'content-type': 'application/octet-stream' }, ) - print("The response of registry.plug_functions.create:\n") + print("The response of registry.plugs.create:\n") pprint(api_response) except ApiError as e: - print("Exception when calling registry.plug_functions.create: %s\n" % e) + print("Exception when calling registry.plugs.create: %s\n" % e) ``` ### Endpoint @@ -84,18 +86,24 @@ POST /registry/v2/plugs/ Name | Type | API binding | Description | Notes -------- | ----- | ------------- | ------------- | ------------- -**content** | **[ContentRequest](Operation.md#req_arg_content)** | binary request body | The assets for a <em>plug</em> function can be provided as either <ul> <li>a single <em>tar</em> archive (optionally compressed), with one of the content types <code>application/octet-stream</code>, <code>application/tar+gzip</code>, <code>application/x-gzip</code>, <code>application/x-tar</code>, <code>application/gzip</code></li> <li>separate files in a <code>multipart/form-data</code> request</li> </ul> The required <code>plug.json</code> json file contains the function metadata, and must have a <code>runtime</code> attribute that is one of the supported <em>runtime</em>s (see <code>GET /registry/v2/runtimes?functionType=plugs</code>). For each <em>runtime</em> other files will be required or supported. | [optional] +**json** | **bytearray** | json request body | The assets for a <em>plug</em> function can be provided as <ul> <li>A single <em>tar</em> archive (optionally compressed), with one of the content types <code>application/octet-stream</code>, <code>application/tar</code>, <code>application/tar+gzip</code>, <code>application/x-gzip</code>, <code>application/x-tar</code>, <code>application/gzip</code></li> <li>Separate files in a <code>multipart/form-data</code> request</li> <li>A reference to the assets of another <em>plug</em> in the <code>copy</code> argument</li> </ul> The required <code>plug.json</code> json file contains the function metadata, and must have a <code>runtime</code> attribute that is one of the supported <em>runtime</em>s (see <code>GET /registry/v2/runtimes?functionType=plugs</code>). For each <em>runtime</em> other files will be required or supported. | [optional] +**content** | **[ContentRequest](Operation.md#req_arg_content)** | binary request body | The assets for a <em>plug</em> function can be provided as <ul> <li>A single <em>tar</em> archive (optionally compressed), with one of the content types <code>application/octet-stream</code>, <code>application/tar</code>, <code>application/tar+gzip</code>, <code>application/x-gzip</code>, <code>application/x-tar</code>, <code>application/gzip</code></li> <li>Separate files in a <code>multipart/form-data</code> request</li> <li>A reference to the assets of another <em>plug</em> in the <code>copy</code> argument</li> </ul> The required <code>plug.json</code> json file contains the function metadata, and must have a <code>runtime</code> attribute that is one of the supported <em>runtime</em>s (see <code>GET /registry/v2/runtimes?functionType=plugs</code>). For each <em>runtime</em> other files will be required or supported. | [optional] **files** | **[FileTypes](Operation.md#req_arg_files)** | request body files | | **query** | [QueryParamTypes](Operation.md#req_arg_query) \| **None** | URL query parameter | | +**query['deploy']** (dict)
**query.deploy** (Query) | **bool** | query parameter `"deploy"` | Indicates that a function should be _deployed_ when its assets are valid. * If `true` (default), jobs to build and deploy the function will be initiated after it is checked that the assets are valid. Invalid assets lead to a validation error, and the function and its assets are not created or updated. * If `false`, the uploaded assets are stored and the function is created/updated in `registered` state. Asset validation errors are only returned as warning, and stored as `failureReason` on the function entity. Use an _asset update_ or _rebuild_ to initiate a build and deploy at a later stage. | [optional] [default True] +**query['author']** (dict)
**query.author** (Query) | **str** | query parameter `"author"` | Optionally changes the author metadata when updating a function. | [optional] +**query['comment']** (dict)
**query.comment** (Query) | **str** | query parameter `"comment"` | An optional user-specified comment corresponding to the operation. | [optional] +**query['scaleToZero']** (dict)
**query.scale_to_zero** (Query) | **bool** | query parameter `"scaleToZero"` | If set to <code>true</code>, after successful deployment, the deployed function will be scaled to zero. This saves computing resources when the function is not to be used immediately. | [optional] [default False] **query['deprecatePrevious']** (dict)
**query.deprecate_previous** (Query) | [**DeprecatePreviousPolicy**](.md) | query parameter `"deprecatePrevious"` | Set the cleanup policy used to automatically deprecate/delete previous versions. | [optional] **query['dryRun']** (dict)
**query.dry_run** (Query) | **bool** | query parameter `"dryRun"` | If set to <code>true</code>, validates the deployment conditions, but does not change anything. | [optional] **query['async']** (dict)
**query.var_async** (Query) | **bool** | query parameter `"async"` | Unless this is set to <code>false</code>, the server will start the required job actions asynchronously and return a <code>202</code> <em>Accepted</em> response. If <code>false</code> the request will block until the job actions are completed, or a timeout occurs. | [optional] [default True] -**query['scaleToZero']** (dict)
**query.scale_to_zero** (Query) | **bool** | query parameter `"scaleToZero"` | If set to <code>true</code>, after successful deployment, the deployed function will be scaled to zero. Saves computing resources when the function is not to be used immediately. | [optional] [default False] **query['version']** (dict)
**query.version** (Query) | [**SemanticVersionRange**](.md) | query parameter `"version"` | If set, the function version will be an increment of the latest existing version that satisfies the `version` range. Note that this increment always takes precedence over an explicit `version` in the function manifest. | [optional] **query['name']** (dict)
**query.name** (Query) | **str** | query parameter `"name"` | If set, the value will be used as the function name instead of the one specified in the manifest. | [optional] **query['draft']** (dict)
**query.draft** (Query) | **bool** | query parameter `"draft"` | If set, the created function will be a draft function and its assets are still mutable. A build and deploy is initiated only in the case when all necessary assets are present and valid. | [optional] [default False] +**query['runtime']** (dict)
**query.runtime** (Query) | **str** | query parameter `"runtime"` | If set, the created function will use the indicated runtime (latest version within specified range). This takes precedence over the runtime specified in a function manifest (copied or from request body). | [optional] +**query['copy']** (dict)
**query.copy_from** (Query) | [**CreateWebscriptsCopyParameter**](.md) | query parameter `"copy"` | Indicates the _source_ of initial assets for a _new function_. When using this query parameter, the request body does not need to contain assets, but any assets in the request body will overwrite the copied assets. #### Selection of _assets_ source * If set as `<sourceName>[@<sourceVersionRange>]`, the _new function_ will be created with copied assets of the selected _source function_. * If set as `!example`, a `runtime` query parameter is required, and the _new function_ will be initialized with assets of the _runtime example_. #### Selection of the _source function_ When `<sourceVersionRange>` is a range (or is not given), the latest _published_ version (in that range) is used. If no _published_ version exists, the latest _draft_ is selected. If no versions in the range exist, a `404` _Not Found_ error is returned. #### The `name` of the _new function_ If a `name` is NOT specified (either as query parameter, or in an optional manifest asset in the request body), the `name` of the _new function_ will be that of the _source function_. #### The `version` of the _new function_ When the _target_ and _source_ name are equal, the `version` query parameters is defaulted to `<sourceVersionRange>` (`~<sourceVersionRange>` when it's an exact version) The version of the _new function_ will be: * If a `version` is NOT specified (either as query parameter, in an optional manifest asset, or as `<sourceVersionRange>` _default_) * a **patch increment** (`<major>.<minor>.<patch>+1`) of the latest **existing version** with the target `name` * **`1.0.0`** otherwise * If a `version` is specified: * the **lowest version** in that range **if no existing version** is in that range. * an **increment** of the latest existing version, **at the highest level** (_major_,_minor_,_patch_) allowed by that range. * otherwise, if all allowed versions already exist, a **`409` _Duplicate_ error** is raised. #### Deployment overrides The new function will use the deployment overrides of the copied function, unless a _manifest_ was specified in the request body. | [optional] **headers** | [HeaderTypes](Operation.md#req_headers) | request headers | | -**headers['content-type']** | **str** | content type | request header `"content-type"` | should match mediaType `application/octet-stream`, `application/tar+gzip`, `application/x-gzip`, `application/x-tar`, `application/gzip`, `multipart/form-data` +**headers['content-type']** | **str** | content type | request header `"content-type"` | should match mediaType `application/octet-stream`, `application/tar`, `application/tar+gzip`, `application/x-gzip`, `application/x-tar`, `application/gzip`, `multipart/form-data`, `application/json`, `*/*+json` ### Return type @@ -107,7 +115,7 @@ str | False _(default)_ | **`Any`** | If any other string value for the selected ### HTTP request headers - - **Content-Type**: application/octet-stream, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip, multipart/form-data + - **Content-Type**: application/octet-stream, application/tar, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip, multipart/form-data, application/json, */*+json - **Accept**: application/json ### HTTP response details @@ -149,20 +157,22 @@ from waylay.services.registry.models.post_plug_job_sync_response_v2 import PostP try: # Delete Plug Asset # calls `DELETE /registry/v2/plugs/{name}/versions/{version}/content/{wildcard}` - api_response = await waylay_client.registry.plug_functions.delete_asset( + api_response = await waylay_client.registry.plugs.delete_asset( 'name_example', # name | path param "name" 'version_example', # version | path param "version" 'wildcard_example', # wildcard | path param "wildcard" # query parameters: query = { - 'async': True + 'scaleToZero': False + 'deploy': True 'chown': False + 'async': True }, ) - print("The response of registry.plug_functions.delete_asset:\n") + print("The response of registry.plugs.delete_asset:\n") pprint(api_response) except ApiError as e: - print("Exception when calling registry.plug_functions.delete_asset: %s\n" % e) + print("Exception when calling registry.plugs.delete_asset: %s\n" % e) ``` ### Endpoint @@ -177,9 +187,12 @@ Name | Type | API binding | Description | Notes **version** | **str** | path parameter `"version"` | The version of the function. | **wildcard** | **str** | path parameter `"wildcard"` | Full path or path prefix of the asset within the archive | **query** | [QueryParamTypes](Operation.md#req_arg_query) \| **None** | URL query parameter | | +**query['scaleToZero']** (dict)
**query.scale_to_zero** (Query) | **bool** | query parameter `"scaleToZero"` | If set to <code>true</code>, after successful deployment, the deployed function will be scaled to zero. This saves computing resources when the function is not to be used immediately. | [optional] [default False] +**query['deploy']** (dict)
**query.deploy** (Query) | **bool** | query parameter `"deploy"` | Indicates that a function should be _deployed_ when its assets are valid. * If `true` (default), jobs to build and deploy the function will be initiated after it is checked that the assets are valid. Invalid assets lead to a validation error, and the function and its assets are not created or updated. * If `false`, the uploaded assets are stored and the function is created/updated in `registered` state. Asset validation errors are only returned as warning, and stored as `failureReason` on the function entity. Use an _asset update_ or _rebuild_ to initiate a build and deploy at a later stage. | [optional] [default True] +**query['chown']** (dict)
**query.chown** (Query) | **bool** | query parameter `"chown"` | If set, ownership of the draft function is transferred to the current user. | [optional] [default False] **query['comment']** (dict)
**query.comment** (Query) | **str** | query parameter `"comment"` | An optional user-specified comment corresponding to the operation. | [optional] +**query['author']** (dict)
**query.author** (Query) | **str** | query parameter `"author"` | Optionally changes the author metadata when updating a function. | [optional] **query['async']** (dict)
**query.var_async** (Query) | **bool** | query parameter `"async"` | Unless this is set to <code>false</code>, the server will start the required job actions asynchronously and return a <code>202</code> <em>Accepted</em> response. If <code>false</code> the request will block until the job actions are completed, or a timeout occurs. | [optional] [default True] -**query['chown']** (dict)
**query.chown** (Query) | **bool** | query parameter `"chown"` | If set, ownership of the draft function is transferred to the current user. | [default False] **headers** | [HeaderTypes](Operation.md#req_headers) | request headers | | ### Return type @@ -201,6 +214,7 @@ str | False _(default)_ | **`Any`** | If any other string value for the selected |-------------|-------------|------------------| **201** | Default Response | - | **202** | Default Response | - | +**403** | Default Response | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -232,7 +246,7 @@ waylay_client = WaylayClient.from_profile() try: # Get Plug Archive # calls `GET /registry/v2/plugs/{name}/versions/{version}/content` - api_response = await waylay_client.registry.plug_functions.get_archive( + api_response = await waylay_client.registry.plugs.get_archive( 'name_example', # name | path param "name" 'version_example', # version | path param "version" # query parameters: @@ -240,10 +254,10 @@ try: 'ls': False }, ) - print("The response of registry.plug_functions.get_archive:\n") + print("The response of registry.plugs.get_archive:\n") pprint(api_response) except ApiError as e: - print("Exception when calling registry.plug_functions.get_archive: %s\n" % e) + print("Exception when calling registry.plugs.get_archive: %s\n" % e) ``` ### Endpoint @@ -271,7 +285,7 @@ str | False _(default)_ | **`Any`** | If any other string value for the selected ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/octet-stream, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip, application/json + - **Accept**: application/octet-stream, application/tar, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip, application/json ### HTTP response details @@ -310,7 +324,7 @@ waylay_client = WaylayClient.from_profile() try: # Get File From Plug Archive # calls `GET /registry/v2/plugs/{name}/versions/{version}/content/{wildcard}` - api_response = await waylay_client.registry.plug_functions.get_asset( + api_response = await waylay_client.registry.plugs.get_asset( 'name_example', # name | path param "name" 'version_example', # version | path param "version" 'wildcard_example', # wildcard | path param "wildcard" @@ -319,10 +333,10 @@ try: 'ls': False }, ) - print("The response of registry.plug_functions.get_asset:\n") + print("The response of registry.plugs.get_asset:\n") pprint(api_response) except ApiError as e: - print("Exception when calling registry.plug_functions.get_asset: %s\n" % e) + print("Exception when calling registry.plugs.get_asset: %s\n" % e) ``` ### Endpoint @@ -351,7 +365,7 @@ str | False _(default)_ | **`Any`** | If any other string value for the selected ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/octet-stream, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip, application/json + - **Accept**: application/octet-stream, application/tar, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip, application/json ### HTTP response details @@ -390,7 +404,7 @@ from waylay.services.registry.models.plug_type import PlugType try: # Get Latest Plug Version # calls `GET /registry/v2/plugs/{name}` - api_response = await waylay_client.registry.plug_functions.get_latest( + api_response = await waylay_client.registry.plugs.get_latest( 'name_example', # name | path param "name" # query parameters: query = { @@ -399,10 +413,10 @@ try: 'includeDeprecated': True }, ) - print("The response of registry.plug_functions.get_latest:\n") + print("The response of registry.plugs.get_latest:\n") pprint(api_response) except ApiError as e: - print("Exception when calling registry.plug_functions.get_latest: %s\n" % e) + print("Exception when calling registry.plugs.get_latest: %s\n" % e) ``` ### Endpoint @@ -469,14 +483,14 @@ from waylay.services.registry.models.get_plug_response_v2 import GetPlugResponse try: # Get Plug Version # calls `GET /registry/v2/plugs/{name}/versions/{version}` - api_response = await waylay_client.registry.plug_functions.get( + api_response = await waylay_client.registry.plugs.get( 'name_example', # name | path param "name" 'version_example', # version | path param "version" ) - print("The response of registry.plug_functions.get:\n") + print("The response of registry.plugs.get:\n") pprint(api_response) except ApiError as e: - print("Exception when calling registry.plug_functions.get: %s\n" % e) + print("Exception when calling registry.plugs.get: %s\n" % e) ``` ### Endpoint @@ -544,17 +558,17 @@ from waylay.services.registry.models.jobs_for_plug_response_v2 import JobsForPlu try: # List Plug Jobs # calls `GET /registry/v2/plugs/{name}/versions/{version}/jobs` - api_response = await waylay_client.registry.plug_functions.jobs( + api_response = await waylay_client.registry.plugs.jobs( 'name_example', # name | path param "name" 'version_example', # version | path param "version" # query parameters: query = { }, ) - print("The response of registry.plug_functions.jobs:\n") + print("The response of registry.plugs.jobs:\n") pprint(api_response) except ApiError as e: - print("Exception when calling registry.plug_functions.jobs: %s\n" % e) + print("Exception when calling registry.plugs.jobs: %s\n" % e) ``` ### Endpoint @@ -605,7 +619,7 @@ str | False _(default)_ | **`Any`** | If any other string value for the selected List Plugs -List the (latest) versions of available plugs. ### List Latest Plug Versions By default, the result includes the latest non-deprecated, non-draft version for each plug name. If there is no such version, the latest _deprecated_ or the latest _draft_ version is included, with the former taking precedence. Use the boolean query parameters includeDeprecated or includeDraft to change this behaviour:
  • includeDeprecated=true: do not prefer non-deprecated versions as a latest version: if the latest version is a deprecated one, it will be shown, even if there are older non-deprecated versions.
  • includeDraft=true: do not prefer non-draft versions as a latest version: if the latest version is a draft, it will be shown, even if there are older non-draft versions.
As long as no _version filters_ are used, each listed plug version item will contain a HAL **link to the latest** _draft_ (`entities[]._links.draft`) or latest _published_ (`entities[]._links.publisned`) version (if existing and different). ### List Latest Plug Versions (with filter) When any of the _version filter_ query parameters are used, the response contains the _latest_ version per named plug that satisfy the filters, but **without links**. ### List All Plug Versions When using `latest=false` (default when using the `namedVersion` filter), the listing contains _all_ plugs versions that satisfy the query, possibly multiple versions per named plugs. No HAL links are provided. #### Filter on _status_ By default plug versions with status `undeployed` are **excluded** in all cases. Use the _version filter_ `status` to include/exclude a status from the results. By example, > `?status=any&includeDeprecated=true&includeDraft=true&latest=false` will list _ALL_ versions known to the function registry. #### Version filter parameters The following query parameters are _version filters_ for the plug listing: > `version`, `status`, `runtimeVersion`, `createdBy`, `createdBefore`, `createdAfter`, `updatedBy`, `updatedBefore`, `updatedAfter`, `nameVersion`, `deprecated`, `draft`, `tags` +List the (latest) versions of available plugs. ### List Latest Plug Versions By default, the result includes the latest non-deprecated, non-draft version for each plug name. If there is no such version, the latest _deprecated_ or the latest _draft_ version is included, with the former taking precedence. Use the boolean query parameters includeDeprecated or includeDraft to change this behaviour:
  • includeDeprecated=true: do not prefer non-deprecated versions as a latest version: if the latest version is a deprecated one, it will be shown, even if there are older non-deprecated versions.
  • includeDraft=true: do not prefer non-draft versions as a latest version: if the latest version is a draft, it will be shown, even if there are older non-draft versions.
As long as no version filters are used, each listed plug version contains representations of the latest draft (`entities[]._links.draft`) or latest published (`entities[]._links.published`) version (if existing and different). Use the query parameter `showRelated` to include only a link (default `showRelated=link`) or a full representation (`showRelated=embed`). ### List Latest Plug Versions (with filter) When any of the _version filter_ query parameters are used, the response contains the _latest_ version per named plug that satisfy the filters, but **without links**. ### List All Plug Versions When using `latest=false` (default when using the `namedVersion` filter), the listing contains _all_ plugs versions that satisfy the query, possibly multiple versions per named plugs. No HAL links are provided. #### Filter on _status_ By default plug versions with status `undeployed` are **excluded** in all cases. Use the _version filter_ `status` to include/exclude a status from the results. By example, > `?status=any&includeDeprecated=true&includeDraft=true&latest=false` will list _ALL_ versions known to the function registry. #### Version filter parameters The following query parameters are _version filters_ for the plug listing: > `version`, `status`, `runtimeVersion`, `createdBy`, `createdBefore`, `createdAfter`, `updatedBy`, `updatedBefore`, `updatedAfter`, `nameVersion`, `deprecated`, `draft`, `tags` ### Example @@ -623,11 +637,12 @@ waylay_client = WaylayClient.from_profile() from waylay.services.registry.models.archive_format import ArchiveFormat from waylay.services.registry.models.latest_plugs_response_v2 import LatestPlugsResponseV2 from waylay.services.registry.models.plug_type import PlugType +from waylay.services.registry.models.show_related_type import ShowRelatedType from waylay.services.registry.models.status_filter import StatusFilter try: # List Plugs # calls `GET /registry/v2/plugs/` - api_response = await waylay_client.registry.plug_functions.list( + api_response = await waylay_client.registry.plugs.list( # query parameters: query = { 'type': 'sensor' @@ -638,12 +653,13 @@ try: 'createdBy': '@me' 'updatedBy': '@me' 'latest': True + 'showRelated': 'embed' }, ) - print("The response of registry.plug_functions.list:\n") + print("The response of registry.plugs.list:\n") pprint(api_response) except ApiError as e: - print("Exception when calling registry.plug_functions.list: %s\n" % e) + print("Exception when calling registry.plugs.list: %s\n" % e) ``` ### Endpoint @@ -677,6 +693,7 @@ Name | Type | API binding | Description | Notes **query['archiveFormat']** (dict)
**query.archive_format** (Query) | [**List[ArchiveFormat]**](ArchiveFormat.md) | query parameter `"archiveFormat"` | Filter on the archive format of the function. | [optional] **query['runtime']** (dict)
**query.runtime** (Query) | [**List[str]**](str.md) | query parameter `"runtime"` | Filter on the runtime of the function. | [optional] **query['latest']** (dict)
**query.latest** (Query) | **bool** | query parameter `"latest"` | When `true`, only the latest version per function name is returned. If set to `false`, multiple versions per named function can be returned. Defaults to `true`, except when specific versions are selected with the `nameVersion` filter. | [optional] +**query['showRelated']** (dict)
**query.show_related** (Query) | [**ShowRelatedType**](.md) | query parameter `"showRelated"` | Sets the representation of related function versions (like the _latest_ draft and/or published) in the response. - `embed`: as full summary representation (in `_embedded`). - `link`: as HAL link in (in `_links`). - `none`: omitted. | [optional] **headers** | [HeaderTypes](Operation.md#req_headers) | request headers | | ### Return type @@ -730,7 +747,7 @@ from waylay.services.registry.models.status_filter import StatusFilter try: # List Plug Versions # calls `GET /registry/v2/plugs/{name}/versions` - api_response = await waylay_client.registry.plug_functions.list_versions( + api_response = await waylay_client.registry.plugs.list_versions( 'name_example', # name | path param "name" # query parameters: query = { @@ -740,10 +757,10 @@ try: 'updatedBy': '@me' }, ) - print("The response of registry.plug_functions.list_versions:\n") + print("The response of registry.plugs.list_versions:\n") pprint(api_response) except ApiError as e: - print("Exception when calling registry.plug_functions.list_versions: %s\n" % e) + print("Exception when calling registry.plugs.list_versions: %s\n" % e) ``` ### Endpoint @@ -825,7 +842,7 @@ from waylay.services.registry.models.get_plug_response_v2 import GetPlugResponse try: # Patch Plug Interface # calls `PATCH /registry/v2/plugs/{name}/versions/{version}/interface` - api_response = await waylay_client.registry.plug_functions.patch_interface( + api_response = await waylay_client.registry.plugs.patch_interface( 'name_example', # name | path param "name" 'version_example', # version | path param "version" # query parameters: @@ -834,10 +851,10 @@ try: # json data: use a generated model or a json-serializable python data structure (dict, list) json = waylay.services.registry.Documentation() # Documentation | (optional) ) - print("The response of registry.plug_functions.patch_interface:\n") + print("The response of registry.plugs.patch_interface:\n") pprint(api_response) except ApiError as e: - print("Exception when calling registry.plug_functions.patch_interface: %s\n" % e) + print("Exception when calling registry.plugs.patch_interface: %s\n" % e) ``` ### Endpoint @@ -906,7 +923,7 @@ from waylay.services.registry.models.update_metadata_request_v2 import UpdateMet try: # Patch Plug Metadata # calls `PATCH /registry/v2/plugs/{name}/versions/{version}/metadata` - api_response = await waylay_client.registry.plug_functions.patch_metadata( + api_response = await waylay_client.registry.plugs.patch_metadata( 'name_example', # name | path param "name" 'version_example', # version | path param "version" # query parameters: @@ -915,10 +932,10 @@ try: # json data: use a generated model or a json-serializable python data structure (dict, list) json = waylay.services.registry.UpdateMetadataRequestV2() # UpdateMetadataRequestV2 | (optional) ) - print("The response of registry.plug_functions.patch_metadata:\n") + print("The response of registry.plugs.patch_metadata:\n") pprint(api_response) except ApiError as e: - print("Exception when calling registry.plug_functions.patch_metadata: %s\n" % e) + print("Exception when calling registry.plugs.patch_metadata: %s\n" % e) ``` ### Endpoint @@ -987,19 +1004,20 @@ from waylay.services.registry.models.post_plug_job_sync_response_v2 import PostP try: # Publish Draft Plug # calls `POST /registry/v2/plugs/{name}/versions/{version}/publish` - api_response = await waylay_client.registry.plug_functions.publish( + api_response = await waylay_client.registry.plugs.publish( 'name_example', # name | path param "name" 'version_example', # version | path param "version" # query parameters: query = { + 'chown': False 'deprecatePrevious': 'none' 'async': True }, ) - print("The response of registry.plug_functions.publish:\n") + print("The response of registry.plugs.publish:\n") pprint(api_response) except ApiError as e: - print("Exception when calling registry.plug_functions.publish: %s\n" % e) + print("Exception when calling registry.plugs.publish: %s\n" % e) ``` ### Endpoint @@ -1013,7 +1031,9 @@ Name | Type | API binding | Description | Notes **name** | **str** | path parameter `"name"` | The name of the function. | **version** | **str** | path parameter `"version"` | The version of the function. | **query** | [QueryParamTypes](Operation.md#req_arg_query) \| **None** | URL query parameter | | +**query['chown']** (dict)
**query.chown** (Query) | **bool** | query parameter `"chown"` | If set, ownership of the draft function is transferred to the current user. | [optional] [default False] **query['comment']** (dict)
**query.comment** (Query) | **str** | query parameter `"comment"` | An optional user-specified comment corresponding to the operation. | [optional] +**query['author']** (dict)
**query.author** (Query) | **str** | query parameter `"author"` | Optionally changes the author metadata when updating a function. | [optional] **query['deprecatePrevious']** (dict)
**query.deprecate_previous** (Query) | [**DeprecatePreviousPolicy**](.md) | query parameter `"deprecatePrevious"` | Set the cleanup policy used to automatically deprecate/delete previous versions. | [optional] **query['async']** (dict)
**query.var_async** (Query) | **bool** | query parameter `"async"` | Unless this is set to <code>false</code>, the server will start the required job actions asynchronously and return a <code>202</code> <em>Accepted</em> response. If <code>false</code> the request will block until the job actions are completed, or a timeout occurs. | [optional] [default True] **headers** | [HeaderTypes](Operation.md#req_headers) | request headers | | @@ -1070,23 +1090,23 @@ from waylay.services.registry.models.rebuild_policy import RebuildPolicy try: # Rebuild Plug # calls `POST /registry/v2/plugs/{name}/versions/{version}/rebuild` - api_response = await waylay_client.registry.plug_functions.rebuild( + api_response = await waylay_client.registry.plugs.rebuild( 'name_example', # name | path param "name" 'version_example', # version | path param "version" # query parameters: query = { + 'scaleToZero': True 'dryRun': True 'async': True 'upgrade': 'patch' 'ignoreChecks': True - 'scaleToZero': True 'skipRebuild': True }, ) - print("The response of registry.plug_functions.rebuild:\n") + print("The response of registry.plugs.rebuild:\n") pprint(api_response) except ApiError as e: - print("Exception when calling registry.plug_functions.rebuild: %s\n" % e) + print("Exception when calling registry.plugs.rebuild: %s\n" % e) ``` ### Endpoint @@ -1100,13 +1120,13 @@ Name | Type | API binding | Description | Notes **name** | **str** | path parameter `"name"` | The name of the function. | **version** | **str** | path parameter `"version"` | The version of the function. | **query** | [QueryParamTypes](Operation.md#req_arg_query) \| **None** | URL query parameter | | +**query['scaleToZero']** (dict)
**query.scale_to_zero** (Query) | **bool** | query parameter `"scaleToZero"` | Indicates whether the function needs to be scaled down after successful verification. If not set, the function is scaled to zero only if it was not active before this command. | [optional] **query['comment']** (dict)
**query.comment** (Query) | **str** | query parameter `"comment"` | An optional user-specified comment corresponding to the operation. | [optional] **query['dryRun']** (dict)
**query.dry_run** (Query) | **bool** | query parameter `"dryRun"` | If set to <code>true</code>, checks whether rebuild jobs are needed, but do not start any jobs. | [optional] **query['async']** (dict)
**query.var_async** (Query) | **bool** | query parameter `"async"` | Unless this is set to <code>false</code>, the server will start the required job actions asynchronously and return a <code>202</code> <em>Accepted</em> response. If <code>false</code> the request will block until the job actions are completed, or a timeout occurs. | [optional] [default True] **query['upgrade']** (dict)
**query.upgrade** (Query) | [**RebuildPolicy**](.md) | query parameter `"upgrade"` | If set, force a rebuild with the given <em>runtime</em> version selection policy. <ul> <li><code>same</code> <b>patch</b> version. This should only include backward compatible upgrades. </li> <li><code>minor</code> <b>major</b> version. This might include an upgrade of e.g. the language runtime and/or provided dependencies that could break compatiblity with the function. .</li> </ul> | [optional] **query['forceVersion']** (dict)
**query.force_version** (Query) | **str** | query parameter `"forceVersion"` | If set, force a rebuild with the given runtime version (including downgrades). This parameter is mutually exclusive to the `upgrade` parameter. | [optional] **query['ignoreChecks']** (dict)
**query.ignore_checks** (Query) | **bool** | query parameter `"ignoreChecks"` | If set to true, checks that normally prevent a rebuild are overriden. These checks include: * function state in `pending`, `running`, `failed` or `undeployed` * backoff period due to recent failures * usage of deprecated dependencies * running jobs on entity * the `dryRun` option | [optional] -**query['scaleToZero']** (dict)
**query.scale_to_zero** (Query) | **bool** | query parameter `"scaleToZero"` | Indicates whether the function needs to be scaled down after successful (re-)deployment. If not set, the function is scaled to zero only if it was not active before this command. | [optional] **query['skipRebuild']** (dict)
**query.skip_rebuild** (Query) | **bool** | query parameter `"skipRebuild"` | If set, the function will not be rebuild. Always uses the current runtime version when re-deploying/re-verifying the function. | [optional] **headers** | [HeaderTypes](Operation.md#req_headers) | request headers | | @@ -1161,7 +1181,7 @@ from waylay.services.registry.models.undeployed_response_v2 import UndeployedRes try: # Remove Plug Version # calls `DELETE /registry/v2/plugs/{name}/versions/{version}` - api_response = await waylay_client.registry.plug_functions.remove_version( + api_response = await waylay_client.registry.plugs.remove_version( 'name_example', # name | path param "name" 'version_example', # version | path param "version" # query parameters: @@ -1171,10 +1191,10 @@ try: 'undeploy': True }, ) - print("The response of registry.plug_functions.remove_version:\n") + print("The response of registry.plugs.remove_version:\n") pprint(api_response) except ApiError as e: - print("Exception when calling registry.plug_functions.remove_version: %s\n" % e) + print("Exception when calling registry.plugs.remove_version: %s\n" % e) ``` ### Endpoint @@ -1244,7 +1264,7 @@ from waylay.services.registry.models.undeployed_response_v2 import UndeployedRes try: # Remove Plug # calls `DELETE /registry/v2/plugs/{name}` - api_response = await waylay_client.registry.plug_functions.remove_versions( + api_response = await waylay_client.registry.plugs.remove_versions( 'name_example', # name | path param "name" # query parameters: query = { @@ -1253,10 +1273,10 @@ try: 'undeploy': True }, ) - print("The response of registry.plug_functions.remove_versions:\n") + print("The response of registry.plugs.remove_versions:\n") pprint(api_response) except ApiError as e: - print("Exception when calling registry.plug_functions.remove_versions: %s\n" % e) + print("Exception when calling registry.plugs.remove_versions: %s\n" % e) ``` ### Endpoint @@ -1328,14 +1348,16 @@ from waylay.services.registry.models.post_plug_job_sync_response_v2 import PostP try: # Update Plug Asset # calls `PUT /registry/v2/plugs/{name}/versions/{version}/content/{wildcard}` - api_response = await waylay_client.registry.plug_functions.update_asset( + api_response = await waylay_client.registry.plugs.update_asset( 'name_example', # name | path param "name" 'version_example', # version | path param "version" 'wildcard_example', # wildcard | path param "wildcard" # query parameters: query = { - 'async': True + 'scaleToZero': False + 'deploy': True 'chown': False + 'async': True }, # non-json binary data: use a byte array or a generator of bytearray chuncks content=b'my-binary-data', @@ -1345,10 +1367,10 @@ try: 'content-type': 'application/octet-stream' }, ) - print("The response of registry.plug_functions.update_asset:\n") + print("The response of registry.plugs.update_asset:\n") pprint(api_response) except ApiError as e: - print("Exception when calling registry.plug_functions.update_asset: %s\n" % e) + print("Exception when calling registry.plugs.update_asset: %s\n" % e) ``` ### Endpoint @@ -1364,11 +1386,14 @@ Name | Type | API binding | Description | Notes **wildcard** | **str** | path parameter `"wildcard"` | Full path or path prefix of the asset within the archive | **content** | **[ContentRequest](Operation.md#req_arg_content)** | binary request body | A single asset file. | [optional] **query** | [QueryParamTypes](Operation.md#req_arg_query) \| **None** | URL query parameter | | +**query['scaleToZero']** (dict)
**query.scale_to_zero** (Query) | **bool** | query parameter `"scaleToZero"` | If set to <code>true</code>, after successful deployment, the deployed function will be scaled to zero. This saves computing resources when the function is not to be used immediately. | [optional] [default False] +**query['deploy']** (dict)
**query.deploy** (Query) | **bool** | query parameter `"deploy"` | Indicates that a function should be _deployed_ when its assets are valid. * If `true` (default), jobs to build and deploy the function will be initiated after it is checked that the assets are valid. Invalid assets lead to a validation error, and the function and its assets are not created or updated. * If `false`, the uploaded assets are stored and the function is created/updated in `registered` state. Asset validation errors are only returned as warning, and stored as `failureReason` on the function entity. Use an _asset update_ or _rebuild_ to initiate a build and deploy at a later stage. | [optional] [default True] +**query['chown']** (dict)
**query.chown** (Query) | **bool** | query parameter `"chown"` | If set, ownership of the draft function is transferred to the current user. | [optional] [default False] **query['comment']** (dict)
**query.comment** (Query) | **str** | query parameter `"comment"` | An optional user-specified comment corresponding to the operation. | [optional] +**query['author']** (dict)
**query.author** (Query) | **str** | query parameter `"author"` | Optionally changes the author metadata when updating a function. | [optional] **query['async']** (dict)
**query.var_async** (Query) | **bool** | query parameter `"async"` | Unless this is set to <code>false</code>, the server will start the required job actions asynchronously and return a <code>202</code> <em>Accepted</em> response. If <code>false</code> the request will block until the job actions are completed, or a timeout occurs. | [optional] [default True] -**query['chown']** (dict)
**query.chown** (Query) | **bool** | query parameter `"chown"` | If set, ownership of the draft function is transferred to the current user. | [default False] **headers** | [HeaderTypes](Operation.md#req_headers) | request headers | | -**headers['content-type']** | **str** | content type | request header `"content-type"` | should match mediaType `application/octet-stream` +**headers['content-type']** | **str** | content type | request header `"content-type"` | should match mediaType ### Return type @@ -1380,7 +1405,7 @@ str | False _(default)_ | **`Any`** | If any other string value for the selected ### HTTP request headers - - **Content-Type**: application/octet-stream + - **Content-Type**: Not defined - **Accept**: application/json ### HTTP response details @@ -1389,6 +1414,7 @@ str | False _(default)_ | **`Any`** | If any other string value for the selected |-------------|-------------|------------------| **201** | Default Response | - | **202** | Default Response | - | +**403** | Default Response | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -1403,7 +1429,7 @@ str | False _(default)_ | **`Any`** | If any other string value for the selected Update Plug Assets -Update a draft plug function by updating its assets. The assets for a plug function can be provided as either
  • a single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
  • separate files in a multipart/form-data request
The provided assets will be added to the plug function's collection of existing assets, replacing any existing assets with the same name. Please note that it is not allowed to update the plug.json json file with a changed value for any of the name, version and/or runtime attributes. For each runtime other files are supported. +Update a draft plug function by updating its assets. The assets for a plug function can be provided as either
  • a single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
  • separate files in a multipart/form-data request
The provided assets will be added to the plug function's collection of existing assets, replacing any existing assets with the same name. Please note that it is not allowed to update the plug.json json file with a changed value for any of the name, version and/or runtime attributes. For each runtime other files are supported. ### Example @@ -1418,31 +1444,32 @@ from waylay.sdk.api.api_exceptions import ApiError waylay_client = WaylayClient.from_profile() # Note that the typed model classes for responses/parameters/... are only available when `waylay-sdk-registry-types` is installed -from waylay.services.registry.models.multipart_file_upload import MultipartFileUpload from waylay.services.registry.models.post_plug_job_sync_response_v2 import PostPlugJobSyncResponseV2 try: # Update Plug Assets # calls `PUT /registry/v2/plugs/{name}/versions/{version}/content` - api_response = await waylay_client.registry.plug_functions.update_assets( + api_response = await waylay_client.registry.plugs.update_assets( 'name_example', # name | path param "name" 'version_example', # version | path param "version" # query parameters: query = { - 'async': True + 'scaleToZero': False + 'deploy': True 'chown': False + 'async': True }, # non-json binary data: use a byte array or a generator of bytearray chuncks content=b'my-binary-data', # this operation supports multiple request content types: use `headers` to specify the one used - # alternatives: 'application/tar+gzip', 'application/x-gzip', 'application/x-tar', 'application/gzip', 'multipart/form-data', + # alternatives: 'application/tar', 'application/tar+gzip', 'application/x-gzip', 'application/x-tar', 'application/gzip', 'multipart/form-data', headers = { 'content-type': 'application/octet-stream' }, ) - print("The response of registry.plug_functions.update_assets:\n") + print("The response of registry.plugs.update_assets:\n") pprint(api_response) except ApiError as e: - print("Exception when calling registry.plug_functions.update_assets: %s\n" % e) + print("Exception when calling registry.plugs.update_assets: %s\n" % e) ``` ### Endpoint @@ -1455,14 +1482,17 @@ Name | Type | API binding | Description | Notes -------- | ----- | ------------- | ------------- | ------------- **name** | **str** | path parameter `"name"` | The name of the function. | **version** | **str** | path parameter `"version"` | The version of the function. | -**content** | **[ContentRequest](Operation.md#req_arg_content)** | binary request body | The assets for a <em>plug</em> function can be provided as either <ul> <li>a single <em>tar</em> archive (optionally compressed), with one of the content types <code>application/octet-stream</code>, <code>application/tar+gzip</code>, <code>application/x-gzip</code>, <code>application/x-tar</code>, <code>application/gzip</code></li> <li>separate files in a <code>multipart/form-data</code> request</li> </ul> The provided assets will be added to the <em>plug</em> function's collection of existing assets, replacing any existing assets with the same name. Please note that it is not allowed to update the plug.json</code> json file with a changed value for any of the <code>name</code>, <code>version</code> and/or <code>runtime</code> attributes. For each <em>runtime</em> other files are supported. | [optional] +**content** | **[ContentRequest](Operation.md#req_arg_content)** | binary request body | The assets for a <em>plug</em> function can be provided as either <ul> <li>a single <em>tar</em> archive (optionally compressed), with one of the content types <code>application/octet-stream</code>, <code>application/tar</code>, <code>application/tar+gzip</code>, <code>application/x-gzip</code>, <code>application/x-tar</code>, <code>application/gzip</code></li> <li>separate files in a <code>multipart/form-data</code> request</li> </ul> The provided assets will be added to the <em>plug</em> function's collection of existing assets, replacing any existing assets with the same name. Please note that it is not allowed to update the plug.json</code> json file with a changed value for any of the <code>name</code>, <code>version</code> and/or <code>runtime</code> attributes. For each <em>runtime</em> other files are supported. | [optional] **files** | **[FileTypes](Operation.md#req_arg_files)** | request body files | | **query** | [QueryParamTypes](Operation.md#req_arg_query) \| **None** | URL query parameter | | +**query['scaleToZero']** (dict)
**query.scale_to_zero** (Query) | **bool** | query parameter `"scaleToZero"` | If set to <code>true</code>, after successful deployment, the deployed function will be scaled to zero. This saves computing resources when the function is not to be used immediately. | [optional] [default False] +**query['deploy']** (dict)
**query.deploy** (Query) | **bool** | query parameter `"deploy"` | Indicates that a function should be _deployed_ when its assets are valid. * If `true` (default), jobs to build and deploy the function will be initiated after it is checked that the assets are valid. Invalid assets lead to a validation error, and the function and its assets are not created or updated. * If `false`, the uploaded assets are stored and the function is created/updated in `registered` state. Asset validation errors are only returned as warning, and stored as `failureReason` on the function entity. Use an _asset update_ or _rebuild_ to initiate a build and deploy at a later stage. | [optional] [default True] +**query['chown']** (dict)
**query.chown** (Query) | **bool** | query parameter `"chown"` | If set, ownership of the draft function is transferred to the current user. | [optional] [default False] **query['comment']** (dict)
**query.comment** (Query) | **str** | query parameter `"comment"` | An optional user-specified comment corresponding to the operation. | [optional] +**query['author']** (dict)
**query.author** (Query) | **str** | query parameter `"author"` | Optionally changes the author metadata when updating a function. | [optional] **query['async']** (dict)
**query.var_async** (Query) | **bool** | query parameter `"async"` | Unless this is set to <code>false</code>, the server will start the required job actions asynchronously and return a <code>202</code> <em>Accepted</em> response. If <code>false</code> the request will block until the job actions are completed, or a timeout occurs. | [optional] [default True] -**query['chown']** (dict)
**query.chown** (Query) | **bool** | query parameter `"chown"` | If set, ownership of the draft function is transferred to the current user. | [default False] **headers** | [HeaderTypes](Operation.md#req_headers) | request headers | | -**headers['content-type']** | **str** | content type | request header `"content-type"` | should match mediaType `application/octet-stream`, `application/tar+gzip`, `application/x-gzip`, `application/x-tar`, `application/gzip`, `multipart/form-data` +**headers['content-type']** | **str** | content type | request header `"content-type"` | should match mediaType `application/octet-stream`, `application/tar`, `application/tar+gzip`, `application/x-gzip`, `application/x-tar`, `application/gzip`, `multipart/form-data` ### Return type @@ -1474,7 +1504,7 @@ str | False _(default)_ | **`Any`** | If any other string value for the selected ### HTTP request headers - - **Content-Type**: application/octet-stream, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip, multipart/form-data + - **Content-Type**: application/octet-stream, application/tar, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip, multipart/form-data - **Accept**: application/json ### HTTP response details @@ -1483,6 +1513,7 @@ str | False _(default)_ | **`Any`** | If any other string value for the selected |-------------|-------------|------------------| **201** | Default Response | - | **202** | Default Response | - | +**403** | Default Response | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -1515,19 +1546,19 @@ from waylay.services.registry.models.verify_plug_sync_response_v2 import VerifyP try: # Verify Health Of Plug # calls `POST /registry/v2/plugs/{name}/versions/{version}/verify` - api_response = await waylay_client.registry.plug_functions.verify( + api_response = await waylay_client.registry.plugs.verify( 'name_example', # name | path param "name" 'version_example', # version | path param "version" # query parameters: query = { - 'async': True 'scaleToZero': True + 'async': True }, ) - print("The response of registry.plug_functions.verify:\n") + print("The response of registry.plugs.verify:\n") pprint(api_response) except ApiError as e: - print("Exception when calling registry.plug_functions.verify: %s\n" % e) + print("Exception when calling registry.plugs.verify: %s\n" % e) ``` ### Endpoint @@ -1541,9 +1572,8 @@ Name | Type | API binding | Description | Notes **name** | **str** | path parameter `"name"` | The name of the function. | **version** | **str** | path parameter `"version"` | The version of the function. | **query** | [QueryParamTypes](Operation.md#req_arg_query) \| **None** | URL query parameter | | -**query['comment']** (dict)
**query.comment** (Query) | **str** | query parameter `"comment"` | An optional user-specified comment corresponding to the operation. | [optional] -**query['async']** (dict)
**query.var_async** (Query) | **bool** | query parameter `"async"` | Unless this is set to <code>false</code>, the server will start the required job actions asynchronously and return a <code>202</code> <em>Accepted</em> response. If <code>false</code> the request will block until the job actions are completed, or a timeout occurs. | [optional] [default True] **query['scaleToZero']** (dict)
**query.scale_to_zero** (Query) | **bool** | query parameter `"scaleToZero"` | Indicates whether the function needs to be scaled down after successful verification. If not set, the function is scaled to zero only if it was not active before this command. | [optional] +**query['async']** (dict)
**query.var_async** (Query) | **bool** | query parameter `"async"` | Unless this is set to <code>false</code>, the server will start the required job actions asynchronously and return a <code>202</code> <em>Accepted</em> response. If <code>false</code> the request will block until the job actions are completed, or a timeout occurs. | [optional] [default True] **headers** | [HeaderTypes](Operation.md#req_headers) | request headers | | ### Return type diff --git a/docs/PublishFunctionQuery.md b/docs/PublishFunctionQuery.md index ee061366..138c38cb 100644 --- a/docs/PublishFunctionQuery.md +++ b/docs/PublishFunctionQuery.md @@ -5,7 +5,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**chown** | **bool** | If set, ownership of the draft function is transferred to the current user. | [optional] [default to False] **comment** | **str** | An optional user-specified comment corresponding to the operation. | [optional] +**author** | **str** | Optionally changes the author metadata when updating a function. | [optional] **deprecate_previous** | [**DeprecatePreviousPolicy**](DeprecatePreviousPolicy.md) | | [optional] **var_async** | **bool** | Unless this is set to <code>false</code>, the server will start the required job actions asynchronously and return a <code>202</code> <em>Accepted</em> response. If <code>false</code> the request will block until the job actions are completed, or a timeout occurs. | [optional] [default to True] diff --git a/docs/RebuildQueryParams.md b/docs/RebuildQueryParams.md deleted file mode 100644 index aec2fd1e..00000000 --- a/docs/RebuildQueryParams.md +++ /dev/null @@ -1,34 +0,0 @@ -# RebuildQueryParams - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**upgrade** | [**RebuildPolicy**](RebuildPolicy.md) | | [optional] -**dry_run** | **bool** | If set to <code>true</code>, checks whether rebuild jobs are needed, but do not start any jobs. | [optional] -**force_version** | **str** | A semantic version with _exactly_ a `major`, `minor` and `patch` specifier. No `pre-release` or `build` identifiers are allowed. See https://semver.org | [optional] -**ignore_checks** | **bool** | If set to true, checks that normally prevent a rebuild are overriden. These checks include: * function state in `pending`, `running`, `failed` or `undeployed` * backoff period due to recent failures * usage of deprecated dependencies * running jobs on entity * the `dryRun` option | [optional] -**scale_to_zero** | **bool** | Indicates whether the function needs to be scaled down after successful (re-)deployment. If not set, the function is scaled to zero only if it was not active before this command. | [optional] -**skip_rebuild** | **bool** | If set, the function will not be rebuild. Always uses the current runtime version when re-deploying/re-verifying the function. | [optional] - -## Example - -```python -from waylay.services.registry.models.rebuild_query_params import RebuildQueryParams - -# TODO update the JSON string below -json = "{}" -# create an instance of RebuildQueryParams from a JSON string -rebuild_query_params_instance = RebuildQueryParams.from_json(json) -# print the JSON string representation of the object -print RebuildQueryParams.to_json() - -# convert the object into a dict -rebuild_query_params_dict = rebuild_query_params_instance.to_dict() -# create an instance of RebuildQueryParams from a dict -rebuild_query_params_form_dict = rebuild_query_params.from_dict(rebuild_query_params_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/RebuildQueryV2.md b/docs/RebuildQueryV2.md index aca9b403..e257ae2f 100644 --- a/docs/RebuildQueryV2.md +++ b/docs/RebuildQueryV2.md @@ -5,13 +5,13 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**scale_to_zero** | **bool** | Indicates whether the function needs to be scaled down after successful verification. If not set, the function is scaled to zero only if it was not active before this command. | [optional] **comment** | **str** | An optional user-specified comment corresponding to the operation. | [optional] **dry_run** | **bool** | If set to <code>true</code>, checks whether rebuild jobs are needed, but do not start any jobs. | [optional] **var_async** | **bool** | Unless this is set to <code>false</code>, the server will start the required job actions asynchronously and return a <code>202</code> <em>Accepted</em> response. If <code>false</code> the request will block until the job actions are completed, or a timeout occurs. | [optional] [default to True] **upgrade** | [**RebuildPolicy**](RebuildPolicy.md) | | [optional] **force_version** | **str** | A semantic version with _exactly_ a `major`, `minor` and `patch` specifier. No `pre-release` or `build` identifiers are allowed. See https://semver.org | [optional] **ignore_checks** | **bool** | If set to true, checks that normally prevent a rebuild are overriden. These checks include: * function state in `pending`, `running`, `failed` or `undeployed` * backoff period due to recent failures * usage of deprecated dependencies * running jobs on entity * the `dryRun` option | [optional] -**scale_to_zero** | **bool** | Indicates whether the function needs to be scaled down after successful (re-)deployment. If not set, the function is scaled to zero only if it was not active before this command. | [optional] **skip_rebuild** | **bool** | If set, the function will not be rebuild. Always uses the current runtime version when re-deploying/re-verifying the function. | [optional] ## Example diff --git a/docs/RegistryErrorResponse.md b/docs/RegistryErrorResponse.md new file mode 100644 index 00000000..d397fb23 --- /dev/null +++ b/docs/RegistryErrorResponse.md @@ -0,0 +1,32 @@ +# RegistryErrorResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**error** | **str** | | +**code** | **str** | | +**status_code** | **float** | | +**data** | **Dict[str, str]** | | [optional] + +## Example + +```python +from waylay.services.registry.models.registry_error_response import RegistryErrorResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of RegistryErrorResponse from a JSON string +registry_error_response_instance = RegistryErrorResponse.from_json(json) +# print the JSON string representation of the object +print RegistryErrorResponse.to_json() + +# convert the object into a dict +registry_error_response_dict = registry_error_response_instance.to_dict() +# create an instance of RegistryErrorResponse from a dict +registry_error_response_form_dict = registry_error_response.from_dict(registry_error_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/RequestDeployQuery.md b/docs/RequestDeployQuery.md new file mode 100644 index 00000000..f678ca01 --- /dev/null +++ b/docs/RequestDeployQuery.md @@ -0,0 +1,29 @@ +# RequestDeployQuery + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**deploy** | **bool** | Indicates that a function should be _deployed_ when its assets are valid. * If `true` (default), jobs to build and deploy the function will be initiated after it is checked that the assets are valid. Invalid assets lead to a validation error, and the function and its assets are not created or updated. * If `false`, the uploaded assets are stored and the function is created/updated in `registered` state. Asset validation errors are only returned as warning, and stored as `failureReason` on the function entity. Use an _asset update_ or _rebuild_ to initiate a build and deploy at a later stage. | [optional] [default to True] + +## Example + +```python +from waylay.services.registry.models.request_deploy_query import RequestDeployQuery + +# TODO update the JSON string below +json = "{}" +# create an instance of RequestDeployQuery from a JSON string +request_deploy_query_instance = RequestDeployQuery.from_json(json) +# print the JSON string representation of the object +print RequestDeployQuery.to_json() + +# convert the object into a dict +request_deploy_query_dict = request_deploy_query_instance.to_dict() +# create an instance of RequestDeployQuery from a dict +request_deploy_query_form_dict = request_deploy_query.from_dict(request_deploy_query_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/RuntimesApi.md b/docs/RuntimesApi.md index b77e10e9..93e261eb 100644 --- a/docs/RuntimesApi.md +++ b/docs/RuntimesApi.md @@ -1,6 +1,6 @@ # waylay.services.registry.RuntimesApi -All URIs are relative to *https://api.waylay.io* +All URIs are relative to *https://api-aws-dev.waylay.io* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -80,7 +80,7 @@ str | False _(default)_ | **`Any`** | If any other string value for the selected ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/octet-stream, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip, application/json + - **Accept**: application/octet-stream, application/tar, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip, application/json ### HTTP response details @@ -162,7 +162,7 @@ str | False _(default)_ | **`Any`** | If any other string value for the selected ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/octet-stream, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip, application/json + - **Accept**: application/octet-stream, application/tar, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip, application/json ### HTTP response details diff --git a/docs/ScaleArgs.md b/docs/ScaleArgs.md index 81e6634f..70fab2e9 100644 --- a/docs/ScaleArgs.md +++ b/docs/ScaleArgs.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes **endpoint** | **str** | The (openfaas) endpoint service name | **runtime_name** | **str** | | **runtime_version** | **str** | A semantic version with _exactly_ a `major`, `minor` and `patch` specifier. No `pre-release` or `build` identifiers are allowed. See https://semver.org | -**revision** | **str** | The revision hash of the current (draft) function revision | [optional] +**revision** | **str** | The revision hash of the current (draft) function revision | **replicas** | **float** | Number of target replicas | ## Example diff --git a/docs/SchemasApi.md b/docs/SchemasApi.md index e9337d8c..5c2ce616 100644 --- a/docs/SchemasApi.md +++ b/docs/SchemasApi.md @@ -1,6 +1,6 @@ # waylay.services.registry.SchemasApi -All URIs are relative to *https://api.waylay.io* +All URIs are relative to *https://api-aws-dev.waylay.io* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/docs/ShowRelatedType.md b/docs/ShowRelatedType.md new file mode 100644 index 00000000..f59107e5 --- /dev/null +++ b/docs/ShowRelatedType.md @@ -0,0 +1,11 @@ +# ShowRelatedType + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/StatusExclude.md b/docs/StatusExclude.md new file mode 100644 index 00000000..12e52914 --- /dev/null +++ b/docs/StatusExclude.md @@ -0,0 +1,12 @@ +# StatusExclude + +Any status value with a `-` postfix appended, excludes that status as a filter. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TagsQuery.md b/docs/TagsQuery.md deleted file mode 100644 index cae3d324..00000000 --- a/docs/TagsQuery.md +++ /dev/null @@ -1,29 +0,0 @@ -# TagsQuery - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**tags** | [**TagsFilter**](TagsFilter.md) | | [optional] - -## Example - -```python -from waylay.services.registry.models.tags_query import TagsQuery - -# TODO update the JSON string below -json = "{}" -# create an instance of TagsQuery from a JSON string -tags_query_instance = TagsQuery.from_json(json) -# print the JSON string representation of the object -print TagsQuery.to_json() - -# convert the object into a dict -tags_query_dict = tags_query_instance.to_dict() -# create an instance of TagsQuery from a dict -tags_query_form_dict = tags_query.from_dict(tags_query_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/UndeployArgs.md b/docs/UndeployArgs.md index 103f8062..6f9d05a7 100644 --- a/docs/UndeployArgs.md +++ b/docs/UndeployArgs.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes **endpoint** | **str** | The (openfaas) endpoint service name | **runtime_name** | **str** | | **runtime_version** | **str** | A semantic version with _exactly_ a `major`, `minor` and `patch` specifier. No `pre-release` or `build` identifiers are allowed. See https://semver.org | -**revision** | **str** | The revision hash of the current (draft) function revision | [optional] +**revision** | **str** | The revision hash of the current (draft) function revision | **is_native_plug** | **bool** | If true, the function is not expected to be deployed on openfaas. | **delete_entity** | **bool** | | diff --git a/docs/UpdateComment.md b/docs/UpdateComment.md deleted file mode 100644 index 2b128c1a..00000000 --- a/docs/UpdateComment.md +++ /dev/null @@ -1,29 +0,0 @@ -# UpdateComment - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**comment** | **str** | An optional user-specified comment corresponding to the operation. | [optional] - -## Example - -```python -from waylay.services.registry.models.update_comment import UpdateComment - -# TODO update the JSON string below -json = "{}" -# create an instance of UpdateComment from a JSON string -update_comment_instance = UpdateComment.from_json(json) -# print the JSON string representation of the object -print UpdateComment.to_json() - -# convert the object into a dict -update_comment_dict = update_comment_instance.to_dict() -# create an instance of UpdateComment from a dict -update_comment_form_dict = update_comment.from_dict(update_comment_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/UpdateDraftQuery.md b/docs/UpdateDraftQuery.md index 3ddbd56c..363dceab 100644 --- a/docs/UpdateDraftQuery.md +++ b/docs/UpdateDraftQuery.md @@ -5,9 +5,12 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**scale_to_zero** | **bool** | If set to <code>true</code>, after successful deployment, the deployed function will be scaled to zero. This saves computing resources when the function is not to be used immediately. | [optional] [default to False] +**deploy** | **bool** | Indicates that a function should be _deployed_ when its assets are valid. * If `true` (default), jobs to build and deploy the function will be initiated after it is checked that the assets are valid. Invalid assets lead to a validation error, and the function and its assets are not created or updated. * If `false`, the uploaded assets are stored and the function is created/updated in `registered` state. Asset validation errors are only returned as warning, and stored as `failureReason` on the function entity. Use an _asset update_ or _rebuild_ to initiate a build and deploy at a later stage. | [optional] [default to True] +**chown** | **bool** | If set, ownership of the draft function is transferred to the current user. | [optional] [default to False] **comment** | **str** | An optional user-specified comment corresponding to the operation. | [optional] +**author** | **str** | Optionally changes the author metadata when updating a function. | [optional] **var_async** | **bool** | Unless this is set to <code>false</code>, the server will start the required job actions asynchronously and return a <code>202</code> <em>Accepted</em> response. If <code>false</code> the request will block until the job actions are completed, or a timeout occurs. | [optional] [default to True] -**chown** | **bool** | If set, ownership of the draft function is transferred to the current user. | [default to False] ## Example diff --git a/docs/VerifyArgs.md b/docs/VerifyArgs.md index b145e3a6..b28c1966 100644 --- a/docs/VerifyArgs.md +++ b/docs/VerifyArgs.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes **endpoint** | **str** | The (openfaas) endpoint service name | **runtime_name** | **str** | | **runtime_version** | **str** | A semantic version with _exactly_ a `major`, `minor` and `patch` specifier. No `pre-release` or `build` identifiers are allowed. See https://semver.org | -**revision** | **str** | The revision hash of the current (draft) function revision | [optional] +**revision** | **str** | The revision hash of the current (draft) function revision | ## Example diff --git a/docs/VersionsQuery.md b/docs/VersionsQuery.md deleted file mode 100644 index 1f24101a..00000000 --- a/docs/VersionsQuery.md +++ /dev/null @@ -1,49 +0,0 @@ -# VersionsQuery - -Function versions paged query - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**limit** | **float** | The maximum number of items to be return from this query. Has a deployment-defined default and maximum value. | [optional] -**page** | **float** | The number of pages to skip when returning result to this query. | [optional] -**endpoint** | **str** | Filter on the openfaas endpoint. This is case-insensitive and supports wild-cards `?` (any one character) and `*` (any sequence of characters). | [optional] -**image_name** | **str** | Filter on the container image name. This is case-insensitive and supports wild-cards `?` (any one character) and `*` (any sequence of characters). | [optional] -**storage_location** | **str** | Filter on the storageLocation. This is case-insensitive and supports wild-cards `?` (any one character) and `*` (any sequence of characters). | [optional] -**deprecated** | **bool** | Filter on the deprecation status of the function. | [optional] -**draft** | **bool** | Filter on the draft status of the function. | [optional] -**name_version** | **List[str]** | Filter on exact `{name}@{version}` functions. Using this filter implies a `latest=false` default, returning multiple versions of the same named versions if they are filtered. | [optional] -**version** | **str** | Filter on the version of the function (case-sensitive, supports wildcards). | [optional] -**status** | [**List[StatusFilter]**](StatusFilter.md) | Filter on the status of the plug. Filter values with a `-` postfix exclude the status. Use the `any` filter value to include all states. When not specified, a default `undeployed-` filter excludes _undeployed_ functions. | [optional] -**runtime_version** | [**SemanticVersionRange**](SemanticVersionRange.md) | | [optional] -**created_by** | **str** | Filter on the user that create the plug. You can use the `@me` token to indicate your own plugs. | [optional] -**updated_by** | **str** | Filter on the user that last updated the plug. You can use the `@me` token to indicate your own plugs. | [optional] -**created_before** | [**TimestampSpec**](TimestampSpec.md) | | [optional] -**created_after** | [**TimestampSpec**](TimestampSpec.md) | | [optional] -**updated_before** | [**TimestampSpec**](TimestampSpec.md) | | [optional] -**updated_after** | [**TimestampSpec**](TimestampSpec.md) | | [optional] -**name** | **str** | Filter on the name of the function. This is case-insensitive and supports wild-cards `?` (any one character) and `*` (any sequence of characters). | [optional] -**archive_format** | [**List[ArchiveFormat]**](ArchiveFormat.md) | Filter on the archive format of the function. | [optional] -**runtime** | **List[str]** | Filter on the runtime of the function. | [optional] - -## Example - -```python -from waylay.services.registry.models.versions_query import VersionsQuery - -# TODO update the JSON string below -json = "{}" -# create an instance of VersionsQuery from a JSON string -versions_query_instance = VersionsQuery.from_json(json) -# print the JSON string representation of the object -print VersionsQuery.to_json() - -# convert the object into a dict -versions_query_dict = versions_query_instance.to_dict() -# create an instance of VersionsQuery from a dict -versions_query_form_dict = versions_query.from_dict(versions_query_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/WebscriptLatestVersionsQueryV2.md b/docs/WebscriptLatestVersionsQueryV2.md index e2ec0638..62a166ae 100644 --- a/docs/WebscriptLatestVersionsQueryV2.md +++ b/docs/WebscriptLatestVersionsQueryV2.md @@ -26,6 +26,7 @@ Name | Type | Description | Notes **archive_format** | [**List[ArchiveFormat]**](ArchiveFormat.md) | Filter on the archive format of the function. | [optional] **runtime** | **List[str]** | Filter on the runtime of the function. | [optional] **latest** | **bool** | When `true`, only the latest version per function name is returned. If set to `false`, multiple versions per named function can be returned. Defaults to `true`, except when specific versions are selected with the `nameVersion` filter. | [optional] +**show_related** | [**ShowRelatedType**](ShowRelatedType.md) | | [optional] ## Example diff --git a/docs/WebscriptFunctionsApi.md b/docs/WebscriptsApi.md similarity index 76% rename from docs/WebscriptFunctionsApi.md rename to docs/WebscriptsApi.md index 4d2ff2c5..bc1dc79f 100644 --- a/docs/WebscriptFunctionsApi.md +++ b/docs/WebscriptsApi.md @@ -1,26 +1,26 @@ -# waylay.services.registry.WebscriptFunctionsApi +# waylay.services.registry.WebscriptsApi -All URIs are relative to *https://api.waylay.io* +All URIs are relative to *https://api-aws-dev.waylay.io* Method | HTTP request | Description ------------- | ------------- | ------------- -[**create**](WebscriptFunctionsApi.md#create) | **POST** /registry/v2/webscripts/ | Create Webscript Version -[**delete_asset**](WebscriptFunctionsApi.md#delete_asset) | **DELETE** /registry/v2/webscripts/{name}/versions/{version}/content/{wildcard} | Delete Webscript Asset -[**get_archive**](WebscriptFunctionsApi.md#get_archive) | **GET** /registry/v2/webscripts/{name}/versions/{version}/content | Get Webscript Archive -[**get_asset**](WebscriptFunctionsApi.md#get_asset) | **GET** /registry/v2/webscripts/{name}/versions/{version}/content/{wildcard} | Get File From Webscript Archive -[**get_latest**](WebscriptFunctionsApi.md#get_latest) | **GET** /registry/v2/webscripts/{name} | Get Latest Webscript Version -[**get**](WebscriptFunctionsApi.md#get) | **GET** /registry/v2/webscripts/{name}/versions/{version} | Get Webscript Version -[**jobs**](WebscriptFunctionsApi.md#jobs) | **GET** /registry/v2/webscripts/{name}/versions/{version}/jobs | List Webscript Jobs -[**list_versions**](WebscriptFunctionsApi.md#list_versions) | **GET** /registry/v2/webscripts/{name}/versions | List Webscript Versions -[**list**](WebscriptFunctionsApi.md#list) | **GET** /registry/v2/webscripts/ | List Webscripts -[**patch_metadata**](WebscriptFunctionsApi.md#patch_metadata) | **PATCH** /registry/v2/webscripts/{name}/versions/{version}/metadata | Patch Webscript Metadata -[**publish**](WebscriptFunctionsApi.md#publish) | **POST** /registry/v2/webscripts/{name}/versions/{version}/publish | Publish Draft Webscript -[**rebuild**](WebscriptFunctionsApi.md#rebuild) | **POST** /registry/v2/webscripts/{name}/versions/{version}/rebuild | Rebuild Webscript -[**remove_version**](WebscriptFunctionsApi.md#remove_version) | **DELETE** /registry/v2/webscripts/{name}/versions/{version} | Remove Webscript Version -[**remove_versions**](WebscriptFunctionsApi.md#remove_versions) | **DELETE** /registry/v2/webscripts/{name} | Remove Webscript -[**update_asset**](WebscriptFunctionsApi.md#update_asset) | **PUT** /registry/v2/webscripts/{name}/versions/{version}/content/{wildcard} | Update Webscript Asset -[**update_assets**](WebscriptFunctionsApi.md#update_assets) | **PUT** /registry/v2/webscripts/{name}/versions/{version}/content | Update Webscript Assets -[**verify**](WebscriptFunctionsApi.md#verify) | **POST** /registry/v2/webscripts/{name}/versions/{version}/verify | Verify Health Of Webscript +[**create**](WebscriptsApi.md#create) | **POST** /registry/v2/webscripts/ | Create Webscript Version +[**delete_asset**](WebscriptsApi.md#delete_asset) | **DELETE** /registry/v2/webscripts/{name}/versions/{version}/content/{wildcard} | Delete Webscript Asset +[**get_archive**](WebscriptsApi.md#get_archive) | **GET** /registry/v2/webscripts/{name}/versions/{version}/content | Get Webscript Archive +[**get_asset**](WebscriptsApi.md#get_asset) | **GET** /registry/v2/webscripts/{name}/versions/{version}/content/{wildcard} | Get File From Webscript Archive +[**get_latest**](WebscriptsApi.md#get_latest) | **GET** /registry/v2/webscripts/{name} | Get Latest Webscript Version +[**get**](WebscriptsApi.md#get) | **GET** /registry/v2/webscripts/{name}/versions/{version} | Get Webscript Version +[**jobs**](WebscriptsApi.md#jobs) | **GET** /registry/v2/webscripts/{name}/versions/{version}/jobs | List Webscript Jobs +[**list_versions**](WebscriptsApi.md#list_versions) | **GET** /registry/v2/webscripts/{name}/versions | List Webscript Versions +[**list**](WebscriptsApi.md#list) | **GET** /registry/v2/webscripts/ | List Webscripts +[**patch_metadata**](WebscriptsApi.md#patch_metadata) | **PATCH** /registry/v2/webscripts/{name}/versions/{version}/metadata | Patch Webscript Metadata +[**publish**](WebscriptsApi.md#publish) | **POST** /registry/v2/webscripts/{name}/versions/{version}/publish | Publish Draft Webscript +[**rebuild**](WebscriptsApi.md#rebuild) | **POST** /registry/v2/webscripts/{name}/versions/{version}/rebuild | Rebuild Webscript +[**remove_version**](WebscriptsApi.md#remove_version) | **DELETE** /registry/v2/webscripts/{name}/versions/{version} | Remove Webscript Version +[**remove_versions**](WebscriptsApi.md#remove_versions) | **DELETE** /registry/v2/webscripts/{name} | Remove Webscript +[**update_asset**](WebscriptsApi.md#update_asset) | **PUT** /registry/v2/webscripts/{name}/versions/{version}/content/{wildcard} | Update Webscript Asset +[**update_assets**](WebscriptsApi.md#update_assets) | **PUT** /registry/v2/webscripts/{name}/versions/{version}/content | Update Webscript Assets +[**verify**](WebscriptsApi.md#verify) | **POST** /registry/v2/webscripts/{name}/versions/{version}/verify | Verify Health Of Webscript # **create** > create( @@ -31,7 +31,7 @@ Method | HTTP request | Description Create Webscript Version -Creates a new webscript function by uploading its assets. The assets for a webscript function can be provided as either
  • a single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
  • separate files in a multipart/form-data request
The required webscript.json json file contains the function metadata, and must have a runtime attribute that is one of the supported runtimes (see GET /registry/v2/runtimes?functionType=webscripts). For each runtime other files will be required or supported. +Creates a new webscript function by uploading its assets. The assets for a webscript function can be provided as
  • A single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
  • Separate files in a multipart/form-data request
  • A reference to the assets of another webscript in the copy argument
The required webscript.json json file contains the function metadata, and must have a runtime attribute that is one of the supported runtimes (see GET /registry/v2/runtimes?functionType=webscripts). For each runtime other files will be required or supported. ### Example @@ -47,32 +47,34 @@ waylay_client = WaylayClient.from_profile() # Note that the typed model classes for responses/parameters/... are only available when `waylay-sdk-registry-types` is installed from waylay.services.registry.models.deprecate_previous_policy import DeprecatePreviousPolicy -from waylay.services.registry.models.multipart_file_upload import MultipartFileUpload from waylay.services.registry.models.post_webscript_job_sync_response_v2 import PostWebscriptJobSyncResponseV2 try: # Create Webscript Version # calls `POST /registry/v2/webscripts/` - api_response = await waylay_client.registry.webscript_functions.create( + api_response = await waylay_client.registry.webscripts.create( # query parameters: query = { + 'deploy': True + 'scaleToZero': False 'deprecatePrevious': 'none' 'dryRun': True 'async': True - 'scaleToZero': False 'draft': False }, + # json data: use a generated model or a json-serializable python data structure (dict, list) + json = None # bytearray | The assets for a webscript function can be provided as
  • A single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
  • Separate files in a multipart/form-data request
  • A reference to the assets of another webscript in the copy argument
The required webscript.json json file contains the function metadata, and must have a runtime attribute that is one of the supported runtimes (see GET /registry/v2/runtimes?functionType=webscripts). For each runtime other files will be required or supported. (optional) # non-json binary data: use a byte array or a generator of bytearray chuncks content=b'my-binary-data', # this operation supports multiple request content types: use `headers` to specify the one used - # alternatives: 'application/tar+gzip', 'application/x-gzip', 'application/x-tar', 'application/gzip', 'multipart/form-data', + # alternatives: 'application/tar', 'application/tar+gzip', 'application/x-gzip', 'application/x-tar', 'application/gzip', 'multipart/form-data', 'application/json', '*/*+json', headers = { 'content-type': 'application/octet-stream' }, ) - print("The response of registry.webscript_functions.create:\n") + print("The response of registry.webscripts.create:\n") pprint(api_response) except ApiError as e: - print("Exception when calling registry.webscript_functions.create: %s\n" % e) + print("Exception when calling registry.webscripts.create: %s\n" % e) ``` ### Endpoint @@ -83,18 +85,24 @@ POST /registry/v2/webscripts/ Name | Type | API binding | Description | Notes -------- | ----- | ------------- | ------------- | ------------- -**content** | **[ContentRequest](Operation.md#req_arg_content)** | binary request body | The assets for a <em>webscript</em> function can be provided as either <ul> <li>a single <em>tar</em> archive (optionally compressed), with one of the content types <code>application/octet-stream</code>, <code>application/tar+gzip</code>, <code>application/x-gzip</code>, <code>application/x-tar</code>, <code>application/gzip</code></li> <li>separate files in a <code>multipart/form-data</code> request</li> </ul> The required <code>webscript.json</code> json file contains the function metadata, and must have a <code>runtime</code> attribute that is one of the supported <em>runtime</em>s (see <code>GET /registry/v2/runtimes?functionType=webscripts</code>). For each <em>runtime</em> other files will be required or supported. | [optional] +**json** | **bytearray** | json request body | The assets for a <em>webscript</em> function can be provided as <ul> <li>A single <em>tar</em> archive (optionally compressed), with one of the content types <code>application/octet-stream</code>, <code>application/tar</code>, <code>application/tar+gzip</code>, <code>application/x-gzip</code>, <code>application/x-tar</code>, <code>application/gzip</code></li> <li>Separate files in a <code>multipart/form-data</code> request</li> <li>A reference to the assets of another <em>webscript</em> in the <code>copy</code> argument</li> </ul> The required <code>webscript.json</code> json file contains the function metadata, and must have a <code>runtime</code> attribute that is one of the supported <em>runtime</em>s (see <code>GET /registry/v2/runtimes?functionType=webscripts</code>). For each <em>runtime</em> other files will be required or supported. | [optional] +**content** | **[ContentRequest](Operation.md#req_arg_content)** | binary request body | The assets for a <em>webscript</em> function can be provided as <ul> <li>A single <em>tar</em> archive (optionally compressed), with one of the content types <code>application/octet-stream</code>, <code>application/tar</code>, <code>application/tar+gzip</code>, <code>application/x-gzip</code>, <code>application/x-tar</code>, <code>application/gzip</code></li> <li>Separate files in a <code>multipart/form-data</code> request</li> <li>A reference to the assets of another <em>webscript</em> in the <code>copy</code> argument</li> </ul> The required <code>webscript.json</code> json file contains the function metadata, and must have a <code>runtime</code> attribute that is one of the supported <em>runtime</em>s (see <code>GET /registry/v2/runtimes?functionType=webscripts</code>). For each <em>runtime</em> other files will be required or supported. | [optional] **files** | **[FileTypes](Operation.md#req_arg_files)** | request body files | | **query** | [QueryParamTypes](Operation.md#req_arg_query) \| **None** | URL query parameter | | +**query['deploy']** (dict)
**query.deploy** (Query) | **bool** | query parameter `"deploy"` | Indicates that a function should be _deployed_ when its assets are valid. * If `true` (default), jobs to build and deploy the function will be initiated after it is checked that the assets are valid. Invalid assets lead to a validation error, and the function and its assets are not created or updated. * If `false`, the uploaded assets are stored and the function is created/updated in `registered` state. Asset validation errors are only returned as warning, and stored as `failureReason` on the function entity. Use an _asset update_ or _rebuild_ to initiate a build and deploy at a later stage. | [optional] [default True] +**query['author']** (dict)
**query.author** (Query) | **str** | query parameter `"author"` | Optionally changes the author metadata when updating a function. | [optional] +**query['comment']** (dict)
**query.comment** (Query) | **str** | query parameter `"comment"` | An optional user-specified comment corresponding to the operation. | [optional] +**query['scaleToZero']** (dict)
**query.scale_to_zero** (Query) | **bool** | query parameter `"scaleToZero"` | If set to <code>true</code>, after successful deployment, the deployed function will be scaled to zero. This saves computing resources when the function is not to be used immediately. | [optional] [default False] **query['deprecatePrevious']** (dict)
**query.deprecate_previous** (Query) | [**DeprecatePreviousPolicy**](.md) | query parameter `"deprecatePrevious"` | Set the cleanup policy used to automatically deprecate/delete previous versions. | [optional] **query['dryRun']** (dict)
**query.dry_run** (Query) | **bool** | query parameter `"dryRun"` | If set to <code>true</code>, validates the deployment conditions, but does not change anything. | [optional] **query['async']** (dict)
**query.var_async** (Query) | **bool** | query parameter `"async"` | Unless this is set to <code>false</code>, the server will start the required job actions asynchronously and return a <code>202</code> <em>Accepted</em> response. If <code>false</code> the request will block until the job actions are completed, or a timeout occurs. | [optional] [default True] -**query['scaleToZero']** (dict)
**query.scale_to_zero** (Query) | **bool** | query parameter `"scaleToZero"` | If set to <code>true</code>, after successful deployment, the deployed function will be scaled to zero. Saves computing resources when the function is not to be used immediately. | [optional] [default False] **query['version']** (dict)
**query.version** (Query) | [**SemanticVersionRange**](.md) | query parameter `"version"` | If set, the function version will be an increment of the latest existing version that satisfies the `version` range. Note that this increment always takes precedence over an explicit `version` in the function manifest. | [optional] **query['name']** (dict)
**query.name** (Query) | **str** | query parameter `"name"` | If set, the value will be used as the function name instead of the one specified in the manifest. | [optional] **query['draft']** (dict)
**query.draft** (Query) | **bool** | query parameter `"draft"` | If set, the created function will be a draft function and its assets are still mutable. A build and deploy is initiated only in the case when all necessary assets are present and valid. | [optional] [default False] +**query['runtime']** (dict)
**query.runtime** (Query) | **str** | query parameter `"runtime"` | If set, the created function will use the indicated runtime (latest version within specified range). This takes precedence over the runtime specified in a function manifest (copied or from request body). | [optional] +**query['copy']** (dict)
**query.copy_from** (Query) | [**CreateWebscriptsCopyParameter**](.md) | query parameter `"copy"` | Indicates the _source_ of initial assets for a _new function_. When using this query parameter, the request body does not need to contain assets, but any assets in the request body will overwrite the copied assets. #### Selection of _assets_ source * If set as `<sourceName>[@<sourceVersionRange>]`, the _new function_ will be created with copied assets of the selected _source function_. * If set as `!example`, a `runtime` query parameter is required, and the _new function_ will be initialized with assets of the _runtime example_. #### Selection of the _source function_ When `<sourceVersionRange>` is a range (or is not given), the latest _published_ version (in that range) is used. If no _published_ version exists, the latest _draft_ is selected. If no versions in the range exist, a `404` _Not Found_ error is returned. #### The `name` of the _new function_ If a `name` is NOT specified (either as query parameter, or in an optional manifest asset in the request body), the `name` of the _new function_ will be that of the _source function_. #### The `version` of the _new function_ When the _target_ and _source_ name are equal, the `version` query parameters is defaulted to `<sourceVersionRange>` (`~<sourceVersionRange>` when it's an exact version) The version of the _new function_ will be: * If a `version` is NOT specified (either as query parameter, in an optional manifest asset, or as `<sourceVersionRange>` _default_) * a **patch increment** (`<major>.<minor>.<patch>+1`) of the latest **existing version** with the target `name` * **`1.0.0`** otherwise * If a `version` is specified: * the **lowest version** in that range **if no existing version** is in that range. * an **increment** of the latest existing version, **at the highest level** (_major_,_minor_,_patch_) allowed by that range. * otherwise, if all allowed versions already exist, a **`409` _Duplicate_ error** is raised. #### Deployment overrides The new function will use the deployment overrides of the copied function, unless a _manifest_ was specified in the request body. | [optional] **headers** | [HeaderTypes](Operation.md#req_headers) | request headers | | -**headers['content-type']** | **str** | content type | request header `"content-type"` | should match mediaType `application/octet-stream`, `application/tar+gzip`, `application/x-gzip`, `application/x-tar`, `application/gzip`, `multipart/form-data` +**headers['content-type']** | **str** | content type | request header `"content-type"` | should match mediaType `application/octet-stream`, `application/tar`, `application/tar+gzip`, `application/x-gzip`, `application/x-tar`, `application/gzip`, `multipart/form-data`, `application/json`, `*/*+json` ### Return type @@ -106,7 +114,7 @@ str | False _(default)_ | **`Any`** | If any other string value for the selected ### HTTP request headers - - **Content-Type**: application/octet-stream, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip, multipart/form-data + - **Content-Type**: application/octet-stream, application/tar, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip, multipart/form-data, application/json, */*+json - **Accept**: application/json ### HTTP response details @@ -148,20 +156,22 @@ from waylay.services.registry.models.post_webscript_job_sync_response_v2 import try: # Delete Webscript Asset # calls `DELETE /registry/v2/webscripts/{name}/versions/{version}/content/{wildcard}` - api_response = await waylay_client.registry.webscript_functions.delete_asset( + api_response = await waylay_client.registry.webscripts.delete_asset( 'name_example', # name | path param "name" 'version_example', # version | path param "version" 'wildcard_example', # wildcard | path param "wildcard" # query parameters: query = { - 'async': True + 'scaleToZero': False + 'deploy': True 'chown': False + 'async': True }, ) - print("The response of registry.webscript_functions.delete_asset:\n") + print("The response of registry.webscripts.delete_asset:\n") pprint(api_response) except ApiError as e: - print("Exception when calling registry.webscript_functions.delete_asset: %s\n" % e) + print("Exception when calling registry.webscripts.delete_asset: %s\n" % e) ``` ### Endpoint @@ -176,9 +186,12 @@ Name | Type | API binding | Description | Notes **version** | **str** | path parameter `"version"` | The version of the function. | **wildcard** | **str** | path parameter `"wildcard"` | Full path or path prefix of the asset within the archive | **query** | [QueryParamTypes](Operation.md#req_arg_query) \| **None** | URL query parameter | | +**query['scaleToZero']** (dict)
**query.scale_to_zero** (Query) | **bool** | query parameter `"scaleToZero"` | If set to <code>true</code>, after successful deployment, the deployed function will be scaled to zero. This saves computing resources when the function is not to be used immediately. | [optional] [default False] +**query['deploy']** (dict)
**query.deploy** (Query) | **bool** | query parameter `"deploy"` | Indicates that a function should be _deployed_ when its assets are valid. * If `true` (default), jobs to build and deploy the function will be initiated after it is checked that the assets are valid. Invalid assets lead to a validation error, and the function and its assets are not created or updated. * If `false`, the uploaded assets are stored and the function is created/updated in `registered` state. Asset validation errors are only returned as warning, and stored as `failureReason` on the function entity. Use an _asset update_ or _rebuild_ to initiate a build and deploy at a later stage. | [optional] [default True] +**query['chown']** (dict)
**query.chown** (Query) | **bool** | query parameter `"chown"` | If set, ownership of the draft function is transferred to the current user. | [optional] [default False] **query['comment']** (dict)
**query.comment** (Query) | **str** | query parameter `"comment"` | An optional user-specified comment corresponding to the operation. | [optional] +**query['author']** (dict)
**query.author** (Query) | **str** | query parameter `"author"` | Optionally changes the author metadata when updating a function. | [optional] **query['async']** (dict)
**query.var_async** (Query) | **bool** | query parameter `"async"` | Unless this is set to <code>false</code>, the server will start the required job actions asynchronously and return a <code>202</code> <em>Accepted</em> response. If <code>false</code> the request will block until the job actions are completed, or a timeout occurs. | [optional] [default True] -**query['chown']** (dict)
**query.chown** (Query) | **bool** | query parameter `"chown"` | If set, ownership of the draft function is transferred to the current user. | [default False] **headers** | [HeaderTypes](Operation.md#req_headers) | request headers | | ### Return type @@ -200,6 +213,7 @@ str | False _(default)_ | **`Any`** | If any other string value for the selected |-------------|-------------|------------------| **201** | Default Response | - | **202** | Default Response | - | +**403** | Default Response | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -231,7 +245,7 @@ waylay_client = WaylayClient.from_profile() try: # Get Webscript Archive # calls `GET /registry/v2/webscripts/{name}/versions/{version}/content` - api_response = await waylay_client.registry.webscript_functions.get_archive( + api_response = await waylay_client.registry.webscripts.get_archive( 'name_example', # name | path param "name" 'version_example', # version | path param "version" # query parameters: @@ -239,10 +253,10 @@ try: 'ls': False }, ) - print("The response of registry.webscript_functions.get_archive:\n") + print("The response of registry.webscripts.get_archive:\n") pprint(api_response) except ApiError as e: - print("Exception when calling registry.webscript_functions.get_archive: %s\n" % e) + print("Exception when calling registry.webscripts.get_archive: %s\n" % e) ``` ### Endpoint @@ -270,7 +284,7 @@ str | False _(default)_ | **`Any`** | If any other string value for the selected ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/octet-stream, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip, application/json + - **Accept**: application/octet-stream, application/tar, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip, application/json ### HTTP response details @@ -309,7 +323,7 @@ waylay_client = WaylayClient.from_profile() try: # Get File From Webscript Archive # calls `GET /registry/v2/webscripts/{name}/versions/{version}/content/{wildcard}` - api_response = await waylay_client.registry.webscript_functions.get_asset( + api_response = await waylay_client.registry.webscripts.get_asset( 'name_example', # name | path param "name" 'version_example', # version | path param "version" 'wildcard_example', # wildcard | path param "wildcard" @@ -318,10 +332,10 @@ try: 'ls': False }, ) - print("The response of registry.webscript_functions.get_asset:\n") + print("The response of registry.webscripts.get_asset:\n") pprint(api_response) except ApiError as e: - print("Exception when calling registry.webscript_functions.get_asset: %s\n" % e) + print("Exception when calling registry.webscripts.get_asset: %s\n" % e) ``` ### Endpoint @@ -350,7 +364,7 @@ str | False _(default)_ | **`Any`** | If any other string value for the selected ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/octet-stream, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip, application/json + - **Accept**: application/octet-stream, application/tar, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip, application/json ### HTTP response details @@ -388,7 +402,7 @@ from waylay.services.registry.models.get_webscript_response_v2 import GetWebscri try: # Get Latest Webscript Version # calls `GET /registry/v2/webscripts/{name}` - api_response = await waylay_client.registry.webscript_functions.get_latest( + api_response = await waylay_client.registry.webscripts.get_latest( 'name_example', # name | path param "name" # query parameters: query = { @@ -396,10 +410,10 @@ try: 'includeDeprecated': True }, ) - print("The response of registry.webscript_functions.get_latest:\n") + print("The response of registry.webscripts.get_latest:\n") pprint(api_response) except ApiError as e: - print("Exception when calling registry.webscript_functions.get_latest: %s\n" % e) + print("Exception when calling registry.webscripts.get_latest: %s\n" % e) ``` ### Endpoint @@ -465,14 +479,14 @@ from waylay.services.registry.models.get_webscript_response_v2 import GetWebscri try: # Get Webscript Version # calls `GET /registry/v2/webscripts/{name}/versions/{version}` - api_response = await waylay_client.registry.webscript_functions.get( + api_response = await waylay_client.registry.webscripts.get( 'name_example', # name | path param "name" 'version_example', # version | path param "version" ) - print("The response of registry.webscript_functions.get:\n") + print("The response of registry.webscripts.get:\n") pprint(api_response) except ApiError as e: - print("Exception when calling registry.webscript_functions.get: %s\n" % e) + print("Exception when calling registry.webscripts.get: %s\n" % e) ``` ### Endpoint @@ -540,17 +554,17 @@ from waylay.services.registry.models.jobs_for_webscript_response_v2 import JobsF try: # List Webscript Jobs # calls `GET /registry/v2/webscripts/{name}/versions/{version}/jobs` - api_response = await waylay_client.registry.webscript_functions.jobs( + api_response = await waylay_client.registry.webscripts.jobs( 'name_example', # name | path param "name" 'version_example', # version | path param "version" # query parameters: query = { }, ) - print("The response of registry.webscript_functions.jobs:\n") + print("The response of registry.webscripts.jobs:\n") pprint(api_response) except ApiError as e: - print("Exception when calling registry.webscript_functions.jobs: %s\n" % e) + print("Exception when calling registry.webscripts.jobs: %s\n" % e) ``` ### Endpoint @@ -623,7 +637,7 @@ from waylay.services.registry.models.webscript_versions_response_v2 import Websc try: # List Webscript Versions # calls `GET /registry/v2/webscripts/{name}/versions` - api_response = await waylay_client.registry.webscript_functions.list_versions( + api_response = await waylay_client.registry.webscripts.list_versions( 'name_example', # name | path param "name" # query parameters: query = { @@ -633,10 +647,10 @@ try: 'updatedBy': '@me' }, ) - print("The response of registry.webscript_functions.list_versions:\n") + print("The response of registry.webscripts.list_versions:\n") pprint(api_response) except ApiError as e: - print("Exception when calling registry.webscript_functions.list_versions: %s\n" % e) + print("Exception when calling registry.webscripts.list_versions: %s\n" % e) ``` ### Endpoint @@ -695,7 +709,7 @@ str | False _(default)_ | **`Any`** | If any other string value for the selected List Webscripts -List the (latest) versions of available webscripts. ### List Latest Webscript Versions By default, the result includes the latest non-deprecated, non-draft version for each webscript name. If there is no such version, the latest _deprecated_ or the latest _draft_ version is included, with the former taking precedence. Use the boolean query parameters includeDeprecated or includeDraft to change this behaviour:
  • includeDeprecated=true: do not prefer non-deprecated versions as a latest version: if the latest version is a deprecated one, it will be shown, even if there are older non-deprecated versions.
  • includeDraft=true: do not prefer non-draft versions as a latest version: if the latest version is a draft, it will be shown, even if there are older non-draft versions.
As long as no _version filters_ are used, each listed webscript version item will contain a HAL **link to the latest** _draft_ (`entities[]._links.draft`) or latest _published_ (`entities[]._links.publisned`) version (if existing and different). ### List Latest Webscript Versions (with filter) When any of the _version filter_ query parameters are used, the response contains the _latest_ version per named webscript that satisfy the filters, but **without links**. ### List All Webscript Versions When using `latest=false` (default when using the `namedVersion` filter), the listing contains _all_ webscripts versions that satisfy the query, possibly multiple versions per named webscripts. No HAL links are provided. #### Filter on _status_ By default webscript versions with status `undeployed` are **excluded** in all cases. Use the _version filter_ `status` to include/exclude a status from the results. By example, > `?status=any&includeDeprecated=true&includeDraft=true&latest=false` will list _ALL_ versions known to the function registry. #### Version filter parameters The following query parameters are _version filters_ for the webscript listing: > `version`, `status`, `runtimeVersion`, `createdBy`, `createdBefore`, `createdAfter`, `updatedBy`, `updatedBefore`, `updatedAfter`, `nameVersion`, `deprecated`, `draft` +List the (latest) versions of available webscripts. ### List Latest Webscript Versions By default, the result includes the latest non-deprecated, non-draft version for each webscript name. If there is no such version, the latest _deprecated_ or the latest _draft_ version is included, with the former taking precedence. Use the boolean query parameters includeDeprecated or includeDraft to change this behaviour:
  • includeDeprecated=true: do not prefer non-deprecated versions as a latest version: if the latest version is a deprecated one, it will be shown, even if there are older non-deprecated versions.
  • includeDraft=true: do not prefer non-draft versions as a latest version: if the latest version is a draft, it will be shown, even if there are older non-draft versions.
As long as no version filters are used, each listed webscript version contains representations of the latest draft (`entities[]._links.draft`) or latest published (`entities[]._links.published`) version (if existing and different). Use the query parameter `showRelated` to include only a link (default `showRelated=link`) or a full representation (`showRelated=embed`). ### List Latest Webscript Versions (with filter) When any of the _version filter_ query parameters are used, the response contains the _latest_ version per named webscript that satisfy the filters, but **without links**. ### List All Webscript Versions When using `latest=false` (default when using the `namedVersion` filter), the listing contains _all_ webscripts versions that satisfy the query, possibly multiple versions per named webscripts. No HAL links are provided. #### Filter on _status_ By default webscript versions with status `undeployed` are **excluded** in all cases. Use the _version filter_ `status` to include/exclude a status from the results. By example, > `?status=any&includeDeprecated=true&includeDraft=true&latest=false` will list _ALL_ versions known to the function registry. #### Version filter parameters The following query parameters are _version filters_ for the webscript listing: > `version`, `status`, `runtimeVersion`, `createdBy`, `createdBefore`, `createdAfter`, `updatedBy`, `updatedBefore`, `updatedAfter`, `nameVersion`, `deprecated`, `draft` ### Example @@ -712,11 +726,12 @@ waylay_client = WaylayClient.from_profile() # Note that the typed model classes for responses/parameters/... are only available when `waylay-sdk-registry-types` is installed from waylay.services.registry.models.archive_format import ArchiveFormat from waylay.services.registry.models.latest_webscripts_response_v2 import LatestWebscriptsResponseV2 +from waylay.services.registry.models.show_related_type import ShowRelatedType from waylay.services.registry.models.status_filter import StatusFilter try: # List Webscripts # calls `GET /registry/v2/webscripts/` - api_response = await waylay_client.registry.webscript_functions.list( + api_response = await waylay_client.registry.webscripts.list( # query parameters: query = { 'includeDraft': True @@ -726,12 +741,13 @@ try: 'createdBy': '@me' 'updatedBy': '@me' 'latest': True + 'showRelated': 'embed' }, ) - print("The response of registry.webscript_functions.list:\n") + print("The response of registry.webscripts.list:\n") pprint(api_response) except ApiError as e: - print("Exception when calling registry.webscript_functions.list: %s\n" % e) + print("Exception when calling registry.webscripts.list: %s\n" % e) ``` ### Endpoint @@ -763,6 +779,7 @@ Name | Type | API binding | Description | Notes **query['archiveFormat']** (dict)
**query.archive_format** (Query) | [**List[ArchiveFormat]**](ArchiveFormat.md) | query parameter `"archiveFormat"` | Filter on the archive format of the function. | [optional] **query['runtime']** (dict)
**query.runtime** (Query) | [**List[str]**](str.md) | query parameter `"runtime"` | Filter on the runtime of the function. | [optional] **query['latest']** (dict)
**query.latest** (Query) | **bool** | query parameter `"latest"` | When `true`, only the latest version per function name is returned. If set to `false`, multiple versions per named function can be returned. Defaults to `true`, except when specific versions are selected with the `nameVersion` filter. | [optional] +**query['showRelated']** (dict)
**query.show_related** (Query) | [**ShowRelatedType**](.md) | query parameter `"showRelated"` | Sets the representation of related function versions (like the _latest_ draft and/or published) in the response. - `embed`: as full summary representation (in `_embedded`). - `link`: as HAL link in (in `_links`). - `none`: omitted. | [optional] **headers** | [HeaderTypes](Operation.md#req_headers) | request headers | | ### Return type @@ -816,7 +833,7 @@ from waylay.services.registry.models.get_webscript_response_v2 import GetWebscri try: # Patch Webscript Metadata # calls `PATCH /registry/v2/webscripts/{name}/versions/{version}/metadata` - api_response = await waylay_client.registry.webscript_functions.patch_metadata( + api_response = await waylay_client.registry.webscripts.patch_metadata( 'name_example', # name | path param "name" 'version_example', # version | path param "version" # query parameters: @@ -825,10 +842,10 @@ try: # json data: use a generated model or a json-serializable python data structure (dict, list) json = waylay.services.registry.FunctionMeta() # FunctionMeta | (optional) ) - print("The response of registry.webscript_functions.patch_metadata:\n") + print("The response of registry.webscripts.patch_metadata:\n") pprint(api_response) except ApiError as e: - print("Exception when calling registry.webscript_functions.patch_metadata: %s\n" % e) + print("Exception when calling registry.webscripts.patch_metadata: %s\n" % e) ``` ### Endpoint @@ -897,19 +914,20 @@ from waylay.services.registry.models.post_webscript_job_sync_response_v2 import try: # Publish Draft Webscript # calls `POST /registry/v2/webscripts/{name}/versions/{version}/publish` - api_response = await waylay_client.registry.webscript_functions.publish( + api_response = await waylay_client.registry.webscripts.publish( 'name_example', # name | path param "name" 'version_example', # version | path param "version" # query parameters: query = { + 'chown': False 'deprecatePrevious': 'none' 'async': True }, ) - print("The response of registry.webscript_functions.publish:\n") + print("The response of registry.webscripts.publish:\n") pprint(api_response) except ApiError as e: - print("Exception when calling registry.webscript_functions.publish: %s\n" % e) + print("Exception when calling registry.webscripts.publish: %s\n" % e) ``` ### Endpoint @@ -923,7 +941,9 @@ Name | Type | API binding | Description | Notes **name** | **str** | path parameter `"name"` | The name of the function. | **version** | **str** | path parameter `"version"` | The version of the function. | **query** | [QueryParamTypes](Operation.md#req_arg_query) \| **None** | URL query parameter | | +**query['chown']** (dict)
**query.chown** (Query) | **bool** | query parameter `"chown"` | If set, ownership of the draft function is transferred to the current user. | [optional] [default False] **query['comment']** (dict)
**query.comment** (Query) | **str** | query parameter `"comment"` | An optional user-specified comment corresponding to the operation. | [optional] +**query['author']** (dict)
**query.author** (Query) | **str** | query parameter `"author"` | Optionally changes the author metadata when updating a function. | [optional] **query['deprecatePrevious']** (dict)
**query.deprecate_previous** (Query) | [**DeprecatePreviousPolicy**](.md) | query parameter `"deprecatePrevious"` | Set the cleanup policy used to automatically deprecate/delete previous versions. | [optional] **query['async']** (dict)
**query.var_async** (Query) | **bool** | query parameter `"async"` | Unless this is set to <code>false</code>, the server will start the required job actions asynchronously and return a <code>202</code> <em>Accepted</em> response. If <code>false</code> the request will block until the job actions are completed, or a timeout occurs. | [optional] [default True] **headers** | [HeaderTypes](Operation.md#req_headers) | request headers | | @@ -980,23 +1000,23 @@ from waylay.services.registry.models.rebuild_webscript_sync_response_v2 import R try: # Rebuild Webscript # calls `POST /registry/v2/webscripts/{name}/versions/{version}/rebuild` - api_response = await waylay_client.registry.webscript_functions.rebuild( + api_response = await waylay_client.registry.webscripts.rebuild( 'name_example', # name | path param "name" 'version_example', # version | path param "version" # query parameters: query = { + 'scaleToZero': True 'dryRun': True 'async': True 'upgrade': 'patch' 'ignoreChecks': True - 'scaleToZero': True 'skipRebuild': True }, ) - print("The response of registry.webscript_functions.rebuild:\n") + print("The response of registry.webscripts.rebuild:\n") pprint(api_response) except ApiError as e: - print("Exception when calling registry.webscript_functions.rebuild: %s\n" % e) + print("Exception when calling registry.webscripts.rebuild: %s\n" % e) ``` ### Endpoint @@ -1010,13 +1030,13 @@ Name | Type | API binding | Description | Notes **name** | **str** | path parameter `"name"` | The name of the function. | **version** | **str** | path parameter `"version"` | The version of the function. | **query** | [QueryParamTypes](Operation.md#req_arg_query) \| **None** | URL query parameter | | +**query['scaleToZero']** (dict)
**query.scale_to_zero** (Query) | **bool** | query parameter `"scaleToZero"` | Indicates whether the function needs to be scaled down after successful verification. If not set, the function is scaled to zero only if it was not active before this command. | [optional] **query['comment']** (dict)
**query.comment** (Query) | **str** | query parameter `"comment"` | An optional user-specified comment corresponding to the operation. | [optional] **query['dryRun']** (dict)
**query.dry_run** (Query) | **bool** | query parameter `"dryRun"` | If set to <code>true</code>, checks whether rebuild jobs are needed, but do not start any jobs. | [optional] **query['async']** (dict)
**query.var_async** (Query) | **bool** | query parameter `"async"` | Unless this is set to <code>false</code>, the server will start the required job actions asynchronously and return a <code>202</code> <em>Accepted</em> response. If <code>false</code> the request will block until the job actions are completed, or a timeout occurs. | [optional] [default True] **query['upgrade']** (dict)
**query.upgrade** (Query) | [**RebuildPolicy**](.md) | query parameter `"upgrade"` | If set, force a rebuild with the given <em>runtime</em> version selection policy. <ul> <li><code>same</code> <b>patch</b> version. This should only include backward compatible upgrades. </li> <li><code>minor</code> <b>major</b> version. This might include an upgrade of e.g. the language runtime and/or provided dependencies that could break compatiblity with the function. .</li> </ul> | [optional] **query['forceVersion']** (dict)
**query.force_version** (Query) | **str** | query parameter `"forceVersion"` | If set, force a rebuild with the given runtime version (including downgrades). This parameter is mutually exclusive to the `upgrade` parameter. | [optional] **query['ignoreChecks']** (dict)
**query.ignore_checks** (Query) | **bool** | query parameter `"ignoreChecks"` | If set to true, checks that normally prevent a rebuild are overriden. These checks include: * function state in `pending`, `running`, `failed` or `undeployed` * backoff period due to recent failures * usage of deprecated dependencies * running jobs on entity * the `dryRun` option | [optional] -**query['scaleToZero']** (dict)
**query.scale_to_zero** (Query) | **bool** | query parameter `"scaleToZero"` | Indicates whether the function needs to be scaled down after successful (re-)deployment. If not set, the function is scaled to zero only if it was not active before this command. | [optional] **query['skipRebuild']** (dict)
**query.skip_rebuild** (Query) | **bool** | query parameter `"skipRebuild"` | If set, the function will not be rebuild. Always uses the current runtime version when re-deploying/re-verifying the function. | [optional] **headers** | [HeaderTypes](Operation.md#req_headers) | request headers | | @@ -1071,7 +1091,7 @@ from waylay.services.registry.models.undeployed_response_v2 import UndeployedRes try: # Remove Webscript Version # calls `DELETE /registry/v2/webscripts/{name}/versions/{version}` - api_response = await waylay_client.registry.webscript_functions.remove_version( + api_response = await waylay_client.registry.webscripts.remove_version( 'name_example', # name | path param "name" 'version_example', # version | path param "version" # query parameters: @@ -1081,10 +1101,10 @@ try: 'undeploy': True }, ) - print("The response of registry.webscript_functions.remove_version:\n") + print("The response of registry.webscripts.remove_version:\n") pprint(api_response) except ApiError as e: - print("Exception when calling registry.webscript_functions.remove_version: %s\n" % e) + print("Exception when calling registry.webscripts.remove_version: %s\n" % e) ``` ### Endpoint @@ -1154,7 +1174,7 @@ from waylay.services.registry.models.undeployed_response_v2 import UndeployedRes try: # Remove Webscript # calls `DELETE /registry/v2/webscripts/{name}` - api_response = await waylay_client.registry.webscript_functions.remove_versions( + api_response = await waylay_client.registry.webscripts.remove_versions( 'name_example', # name | path param "name" # query parameters: query = { @@ -1163,10 +1183,10 @@ try: 'undeploy': True }, ) - print("The response of registry.webscript_functions.remove_versions:\n") + print("The response of registry.webscripts.remove_versions:\n") pprint(api_response) except ApiError as e: - print("Exception when calling registry.webscript_functions.remove_versions: %s\n" % e) + print("Exception when calling registry.webscripts.remove_versions: %s\n" % e) ``` ### Endpoint @@ -1238,14 +1258,16 @@ from waylay.services.registry.models.post_webscript_job_sync_response_v2 import try: # Update Webscript Asset # calls `PUT /registry/v2/webscripts/{name}/versions/{version}/content/{wildcard}` - api_response = await waylay_client.registry.webscript_functions.update_asset( + api_response = await waylay_client.registry.webscripts.update_asset( 'name_example', # name | path param "name" 'version_example', # version | path param "version" 'wildcard_example', # wildcard | path param "wildcard" # query parameters: query = { - 'async': True + 'scaleToZero': False + 'deploy': True 'chown': False + 'async': True }, # non-json binary data: use a byte array or a generator of bytearray chuncks content=b'my-binary-data', @@ -1255,10 +1277,10 @@ try: 'content-type': 'application/octet-stream' }, ) - print("The response of registry.webscript_functions.update_asset:\n") + print("The response of registry.webscripts.update_asset:\n") pprint(api_response) except ApiError as e: - print("Exception when calling registry.webscript_functions.update_asset: %s\n" % e) + print("Exception when calling registry.webscripts.update_asset: %s\n" % e) ``` ### Endpoint @@ -1274,11 +1296,14 @@ Name | Type | API binding | Description | Notes **wildcard** | **str** | path parameter `"wildcard"` | Full path or path prefix of the asset within the archive | **content** | **[ContentRequest](Operation.md#req_arg_content)** | binary request body | A single asset file. | [optional] **query** | [QueryParamTypes](Operation.md#req_arg_query) \| **None** | URL query parameter | | +**query['scaleToZero']** (dict)
**query.scale_to_zero** (Query) | **bool** | query parameter `"scaleToZero"` | If set to <code>true</code>, after successful deployment, the deployed function will be scaled to zero. This saves computing resources when the function is not to be used immediately. | [optional] [default False] +**query['deploy']** (dict)
**query.deploy** (Query) | **bool** | query parameter `"deploy"` | Indicates that a function should be _deployed_ when its assets are valid. * If `true` (default), jobs to build and deploy the function will be initiated after it is checked that the assets are valid. Invalid assets lead to a validation error, and the function and its assets are not created or updated. * If `false`, the uploaded assets are stored and the function is created/updated in `registered` state. Asset validation errors are only returned as warning, and stored as `failureReason` on the function entity. Use an _asset update_ or _rebuild_ to initiate a build and deploy at a later stage. | [optional] [default True] +**query['chown']** (dict)
**query.chown** (Query) | **bool** | query parameter `"chown"` | If set, ownership of the draft function is transferred to the current user. | [optional] [default False] **query['comment']** (dict)
**query.comment** (Query) | **str** | query parameter `"comment"` | An optional user-specified comment corresponding to the operation. | [optional] +**query['author']** (dict)
**query.author** (Query) | **str** | query parameter `"author"` | Optionally changes the author metadata when updating a function. | [optional] **query['async']** (dict)
**query.var_async** (Query) | **bool** | query parameter `"async"` | Unless this is set to <code>false</code>, the server will start the required job actions asynchronously and return a <code>202</code> <em>Accepted</em> response. If <code>false</code> the request will block until the job actions are completed, or a timeout occurs. | [optional] [default True] -**query['chown']** (dict)
**query.chown** (Query) | **bool** | query parameter `"chown"` | If set, ownership of the draft function is transferred to the current user. | [default False] **headers** | [HeaderTypes](Operation.md#req_headers) | request headers | | -**headers['content-type']** | **str** | content type | request header `"content-type"` | should match mediaType `application/octet-stream` +**headers['content-type']** | **str** | content type | request header `"content-type"` | should match mediaType ### Return type @@ -1290,7 +1315,7 @@ str | False _(default)_ | **`Any`** | If any other string value for the selected ### HTTP request headers - - **Content-Type**: application/octet-stream + - **Content-Type**: Not defined - **Accept**: application/json ### HTTP response details @@ -1299,6 +1324,7 @@ str | False _(default)_ | **`Any`** | If any other string value for the selected |-------------|-------------|------------------| **201** | Default Response | - | **202** | Default Response | - | +**403** | Default Response | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -1313,7 +1339,7 @@ str | False _(default)_ | **`Any`** | If any other string value for the selected Update Webscript Assets -Update a draft webscript function by updating its assets. The assets for a webscript function can be provided as either
  • a single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
  • separate files in a multipart/form-data request
The provided assets will be added to the webscript function's collection of existing assets, replacing any existing assets with the same name. Please note that it is not allowed to update the webscript.json json file with a changed value for any of the name, version and/or runtime attributes. For each runtime other files are supported. +Update a draft webscript function by updating its assets. The assets for a webscript function can be provided as either
  • a single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
  • separate files in a multipart/form-data request
The provided assets will be added to the webscript function's collection of existing assets, replacing any existing assets with the same name. Please note that it is not allowed to update the webscript.json json file with a changed value for any of the name, version and/or runtime attributes. For each runtime other files are supported. ### Example @@ -1328,31 +1354,32 @@ from waylay.sdk.api.api_exceptions import ApiError waylay_client = WaylayClient.from_profile() # Note that the typed model classes for responses/parameters/... are only available when `waylay-sdk-registry-types` is installed -from waylay.services.registry.models.multipart_file_upload import MultipartFileUpload from waylay.services.registry.models.post_webscript_job_sync_response_v2 import PostWebscriptJobSyncResponseV2 try: # Update Webscript Assets # calls `PUT /registry/v2/webscripts/{name}/versions/{version}/content` - api_response = await waylay_client.registry.webscript_functions.update_assets( + api_response = await waylay_client.registry.webscripts.update_assets( 'name_example', # name | path param "name" 'version_example', # version | path param "version" # query parameters: query = { - 'async': True + 'scaleToZero': False + 'deploy': True 'chown': False + 'async': True }, # non-json binary data: use a byte array or a generator of bytearray chuncks content=b'my-binary-data', # this operation supports multiple request content types: use `headers` to specify the one used - # alternatives: 'application/tar+gzip', 'application/x-gzip', 'application/x-tar', 'application/gzip', 'multipart/form-data', + # alternatives: 'application/tar', 'application/tar+gzip', 'application/x-gzip', 'application/x-tar', 'application/gzip', 'multipart/form-data', headers = { 'content-type': 'application/octet-stream' }, ) - print("The response of registry.webscript_functions.update_assets:\n") + print("The response of registry.webscripts.update_assets:\n") pprint(api_response) except ApiError as e: - print("Exception when calling registry.webscript_functions.update_assets: %s\n" % e) + print("Exception when calling registry.webscripts.update_assets: %s\n" % e) ``` ### Endpoint @@ -1365,14 +1392,17 @@ Name | Type | API binding | Description | Notes -------- | ----- | ------------- | ------------- | ------------- **name** | **str** | path parameter `"name"` | The name of the function. | **version** | **str** | path parameter `"version"` | The version of the function. | -**content** | **[ContentRequest](Operation.md#req_arg_content)** | binary request body | The assets for a <em>webscript</em> function can be provided as either <ul> <li>a single <em>tar</em> archive (optionally compressed), with one of the content types <code>application/octet-stream</code>, <code>application/tar+gzip</code>, <code>application/x-gzip</code>, <code>application/x-tar</code>, <code>application/gzip</code></li> <li>separate files in a <code>multipart/form-data</code> request</li> </ul> The provided assets will be added to the <em>webscript</em> function's collection of existing assets, replacing any existing assets with the same name. Please note that it is not allowed to update the webscript.json</code> json file with a changed value for any of the <code>name</code>, <code>version</code> and/or <code>runtime</code> attributes. For each <em>runtime</em> other files are supported. | [optional] +**content** | **[ContentRequest](Operation.md#req_arg_content)** | binary request body | The assets for a <em>webscript</em> function can be provided as either <ul> <li>a single <em>tar</em> archive (optionally compressed), with one of the content types <code>application/octet-stream</code>, <code>application/tar</code>, <code>application/tar+gzip</code>, <code>application/x-gzip</code>, <code>application/x-tar</code>, <code>application/gzip</code></li> <li>separate files in a <code>multipart/form-data</code> request</li> </ul> The provided assets will be added to the <em>webscript</em> function's collection of existing assets, replacing any existing assets with the same name. Please note that it is not allowed to update the webscript.json</code> json file with a changed value for any of the <code>name</code>, <code>version</code> and/or <code>runtime</code> attributes. For each <em>runtime</em> other files are supported. | [optional] **files** | **[FileTypes](Operation.md#req_arg_files)** | request body files | | **query** | [QueryParamTypes](Operation.md#req_arg_query) \| **None** | URL query parameter | | +**query['scaleToZero']** (dict)
**query.scale_to_zero** (Query) | **bool** | query parameter `"scaleToZero"` | If set to <code>true</code>, after successful deployment, the deployed function will be scaled to zero. This saves computing resources when the function is not to be used immediately. | [optional] [default False] +**query['deploy']** (dict)
**query.deploy** (Query) | **bool** | query parameter `"deploy"` | Indicates that a function should be _deployed_ when its assets are valid. * If `true` (default), jobs to build and deploy the function will be initiated after it is checked that the assets are valid. Invalid assets lead to a validation error, and the function and its assets are not created or updated. * If `false`, the uploaded assets are stored and the function is created/updated in `registered` state. Asset validation errors are only returned as warning, and stored as `failureReason` on the function entity. Use an _asset update_ or _rebuild_ to initiate a build and deploy at a later stage. | [optional] [default True] +**query['chown']** (dict)
**query.chown** (Query) | **bool** | query parameter `"chown"` | If set, ownership of the draft function is transferred to the current user. | [optional] [default False] **query['comment']** (dict)
**query.comment** (Query) | **str** | query parameter `"comment"` | An optional user-specified comment corresponding to the operation. | [optional] +**query['author']** (dict)
**query.author** (Query) | **str** | query parameter `"author"` | Optionally changes the author metadata when updating a function. | [optional] **query['async']** (dict)
**query.var_async** (Query) | **bool** | query parameter `"async"` | Unless this is set to <code>false</code>, the server will start the required job actions asynchronously and return a <code>202</code> <em>Accepted</em> response. If <code>false</code> the request will block until the job actions are completed, or a timeout occurs. | [optional] [default True] -**query['chown']** (dict)
**query.chown** (Query) | **bool** | query parameter `"chown"` | If set, ownership of the draft function is transferred to the current user. | [default False] **headers** | [HeaderTypes](Operation.md#req_headers) | request headers | | -**headers['content-type']** | **str** | content type | request header `"content-type"` | should match mediaType `application/octet-stream`, `application/tar+gzip`, `application/x-gzip`, `application/x-tar`, `application/gzip`, `multipart/form-data` +**headers['content-type']** | **str** | content type | request header `"content-type"` | should match mediaType `application/octet-stream`, `application/tar`, `application/tar+gzip`, `application/x-gzip`, `application/x-tar`, `application/gzip`, `multipart/form-data` ### Return type @@ -1384,7 +1414,7 @@ str | False _(default)_ | **`Any`** | If any other string value for the selected ### HTTP request headers - - **Content-Type**: application/octet-stream, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip, multipart/form-data + - **Content-Type**: application/octet-stream, application/tar, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip, multipart/form-data - **Accept**: application/json ### HTTP response details @@ -1393,6 +1423,7 @@ str | False _(default)_ | **`Any`** | If any other string value for the selected |-------------|-------------|------------------| **201** | Default Response | - | **202** | Default Response | - | +**403** | Default Response | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -1425,19 +1456,19 @@ from waylay.services.registry.models.verify_webscript_sync_response_v2 import Ve try: # Verify Health Of Webscript # calls `POST /registry/v2/webscripts/{name}/versions/{version}/verify` - api_response = await waylay_client.registry.webscript_functions.verify( + api_response = await waylay_client.registry.webscripts.verify( 'name_example', # name | path param "name" 'version_example', # version | path param "version" # query parameters: query = { - 'async': True 'scaleToZero': True + 'async': True }, ) - print("The response of registry.webscript_functions.verify:\n") + print("The response of registry.webscripts.verify:\n") pprint(api_response) except ApiError as e: - print("Exception when calling registry.webscript_functions.verify: %s\n" % e) + print("Exception when calling registry.webscripts.verify: %s\n" % e) ``` ### Endpoint @@ -1451,9 +1482,8 @@ Name | Type | API binding | Description | Notes **name** | **str** | path parameter `"name"` | The name of the function. | **version** | **str** | path parameter `"version"` | The version of the function. | **query** | [QueryParamTypes](Operation.md#req_arg_query) \| **None** | URL query parameter | | -**query['comment']** (dict)
**query.comment** (Query) | **str** | query parameter `"comment"` | An optional user-specified comment corresponding to the operation. | [optional] -**query['async']** (dict)
**query.var_async** (Query) | **bool** | query parameter `"async"` | Unless this is set to <code>false</code>, the server will start the required job actions asynchronously and return a <code>202</code> <em>Accepted</em> response. If <code>false</code> the request will block until the job actions are completed, or a timeout occurs. | [optional] [default True] **query['scaleToZero']** (dict)
**query.scale_to_zero** (Query) | **bool** | query parameter `"scaleToZero"` | Indicates whether the function needs to be scaled down after successful verification. If not set, the function is scaled to zero only if it was not active before this command. | [optional] +**query['async']** (dict)
**query.var_async** (Query) | **bool** | query parameter `"async"` | Unless this is set to <code>false</code>, the server will start the required job actions asynchronously and return a <code>202</code> <em>Accepted</em> response. If <code>false</code> the request will block until the job actions are completed, or a timeout occurs. | [optional] [default True] **headers** | [HeaderTypes](Operation.md#req_headers) | request headers | | ### Return type diff --git a/docs/WithEmbeddedAltVersionsIKfservingResponseV2.md b/docs/WithEmbeddedAltVersionsIKfservingResponseV2.md new file mode 100644 index 00000000..6ee26ce5 --- /dev/null +++ b/docs/WithEmbeddedAltVersionsIKfservingResponseV2.md @@ -0,0 +1,29 @@ +# WithEmbeddedAltVersionsIKfservingResponseV2 + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**embedded** | [**AltEmbeddedVersionIKfservingResponseV2**](AltEmbeddedVersionIKfservingResponseV2.md) | | [optional] + +## Example + +```python +from waylay.services.registry.models.with_embedded_alt_versions_i_kfserving_response_v2 import WithEmbeddedAltVersionsIKfservingResponseV2 + +# TODO update the JSON string below +json = "{}" +# create an instance of WithEmbeddedAltVersionsIKfservingResponseV2 from a JSON string +with_embedded_alt_versions_i_kfserving_response_v2_instance = WithEmbeddedAltVersionsIKfservingResponseV2.from_json(json) +# print the JSON string representation of the object +print WithEmbeddedAltVersionsIKfservingResponseV2.to_json() + +# convert the object into a dict +with_embedded_alt_versions_i_kfserving_response_v2_dict = with_embedded_alt_versions_i_kfserving_response_v2_instance.to_dict() +# create an instance of WithEmbeddedAltVersionsIKfservingResponseV2 from a dict +with_embedded_alt_versions_i_kfserving_response_v2_form_dict = with_embedded_alt_versions_i_kfserving_response_v2.from_dict(with_embedded_alt_versions_i_kfserving_response_v2_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/WithEmbeddedAltVersionsIPlugResponseV2.md b/docs/WithEmbeddedAltVersionsIPlugResponseV2.md new file mode 100644 index 00000000..841c6a43 --- /dev/null +++ b/docs/WithEmbeddedAltVersionsIPlugResponseV2.md @@ -0,0 +1,29 @@ +# WithEmbeddedAltVersionsIPlugResponseV2 + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**embedded** | [**AltEmbeddedVersionIPlugResponseV2**](AltEmbeddedVersionIPlugResponseV2.md) | | [optional] + +## Example + +```python +from waylay.services.registry.models.with_embedded_alt_versions_i_plug_response_v2 import WithEmbeddedAltVersionsIPlugResponseV2 + +# TODO update the JSON string below +json = "{}" +# create an instance of WithEmbeddedAltVersionsIPlugResponseV2 from a JSON string +with_embedded_alt_versions_i_plug_response_v2_instance = WithEmbeddedAltVersionsIPlugResponseV2.from_json(json) +# print the JSON string representation of the object +print WithEmbeddedAltVersionsIPlugResponseV2.to_json() + +# convert the object into a dict +with_embedded_alt_versions_i_plug_response_v2_dict = with_embedded_alt_versions_i_plug_response_v2_instance.to_dict() +# create an instance of WithEmbeddedAltVersionsIPlugResponseV2 from a dict +with_embedded_alt_versions_i_plug_response_v2_form_dict = with_embedded_alt_versions_i_plug_response_v2.from_dict(with_embedded_alt_versions_i_plug_response_v2_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/WithEmbeddedAltVersionsIWebscriptResponseWithInvokeLinkV2.md b/docs/WithEmbeddedAltVersionsIWebscriptResponseWithInvokeLinkV2.md new file mode 100644 index 00000000..c8aba46d --- /dev/null +++ b/docs/WithEmbeddedAltVersionsIWebscriptResponseWithInvokeLinkV2.md @@ -0,0 +1,29 @@ +# WithEmbeddedAltVersionsIWebscriptResponseWithInvokeLinkV2 + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**embedded** | [**AltEmbeddedVersionIWebscriptResponseWithInvokeLinkV2**](AltEmbeddedVersionIWebscriptResponseWithInvokeLinkV2.md) | | [optional] + +## Example + +```python +from waylay.services.registry.models.with_embedded_alt_versions_i_webscript_response_with_invoke_link_v2 import WithEmbeddedAltVersionsIWebscriptResponseWithInvokeLinkV2 + +# TODO update the JSON string below +json = "{}" +# create an instance of WithEmbeddedAltVersionsIWebscriptResponseWithInvokeLinkV2 from a JSON string +with_embedded_alt_versions_i_webscript_response_with_invoke_link_v2_instance = WithEmbeddedAltVersionsIWebscriptResponseWithInvokeLinkV2.from_json(json) +# print the JSON string representation of the object +print WithEmbeddedAltVersionsIWebscriptResponseWithInvokeLinkV2.to_json() + +# convert the object into a dict +with_embedded_alt_versions_i_webscript_response_with_invoke_link_v2_dict = with_embedded_alt_versions_i_webscript_response_with_invoke_link_v2_instance.to_dict() +# create an instance of WithEmbeddedAltVersionsIWebscriptResponseWithInvokeLinkV2 from a dict +with_embedded_alt_versions_i_webscript_response_with_invoke_link_v2_form_dict = with_embedded_alt_versions_i_webscript_response_with_invoke_link_v2.from_dict(with_embedded_alt_versions_i_webscript_response_with_invoke_link_v2_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/openapi/registry.openapi.yaml b/openapi/registry.openapi.yaml index 0988df6b..9f900c42 100644 --- a/openapi/registry.openapi.yaml +++ b/openapi/registry.openapi.yaml @@ -1,7 +1,7 @@ openapi: 3.1.0 info: title: Waylay Function Registry - version: 2.12.4 + version: 2.13.0 x-visibility: stable description: V2 API to build and deploy Waylay functions (plugs, webscripts, BYOML models). @@ -46,7 +46,7 @@ components: - batch - scale - cleanup - - other + - notify IJobEventsFilterQuery: type: object properties: @@ -113,71 +113,6 @@ components: - same description: The policy to select a new runtime version when a rebuild is issued. - IRebuildQueryParams: - type: object - properties: - upgrade: - $ref: '#/components/schemas/ERebuildPolicy' - description: If set, force a rebuild with the given runtime version - selection policy.
  • same patch version. This - should only include backward compatible upgrades.
  • minor - major version. This might include an upgrade of e.g. the language - runtime and/or provided dependencies that could break compatiblity with - the function. .
- dryRun: - type: boolean - description: If set to true, checks whether rebuild jobs are - needed, but do not start any jobs. - forceVersion: - $ref: '#/components/schemas/SemanticVersion' - description: If set, force a rebuild with the given runtime version (including - downgrades). This parameter is mutually exclusive to the `upgrade` parameter. - ignoreChecks: - type: boolean - description: 'If set to true, checks that normally prevent a rebuild are - overriden. These checks include: - - * function state in `pending`, `running`, `failed` or `undeployed` - - * backoff period due to recent failures - - * usage of deprecated dependencies - - * running jobs on entity - - * the `dryRun` option' - scaleToZero: - type: boolean - description: Indicates whether the function needs to be scaled down after - successful (re-)deployment. If not set, the function is scaled to zero - only if it was not active before this command. - skipRebuild: - type: boolean - description: If set, the function will not be rebuild. Always uses the current - runtime version when re-deploying/re-verifying the function. - additionalProperties: false - ILimitQuery: - type: object - properties: - limit: - type: number - description: The maximum number of items to be return from this query. Has - a deployment-defined default and maximum value. - minimum: 0 - additionalProperties: false - IPagingQuery: - type: object - properties: - limit: - type: number - description: The maximum number of items to be return from this query. Has - a deployment-defined default and maximum value. - minimum: 0 - page: - type: number - description: The number of pages to skip when returning result to this query. - minimum: 0 - additionalProperties: false EStatusInclude: type: string enum: @@ -195,6 +130,15 @@ components: title: Status Inclusion Filter EStatusExclude: type: string + enum: + - registered- + - running- + - pending- + - deployed- + - unhealthy- + - failed- + - undeploying- + - undeployed- description: Any status value with a `-` postfix appended, excludes that status as a filter. examples: @@ -214,161 +158,6 @@ components: - $ref: '#/components/schemas/EStatusAny' description: Inclusion or exclusion filter on the `status` property. title: Status Filter - IFunctionEntityQuery: - type: object - properties: - name: - type: string - description: Filter on the name of the function. This is case-insensitive - and supports wild-cards `?` (any one character) and `*` (any sequence - of characters). - archiveFormat: - type: array - items: - $ref: '#/components/schemas/EArchiveFormat' - description: Filter on the archive format of the function. - runtime: - type: array - items: - $ref: '#/components/schemas/ERuntime' - description: Filter on the runtime of the function. - additionalProperties: false - description: Filter on function attributes that do not change across function - versions. - EArchiveFormat: - type: string - enum: - - node - - python - - golang - - byoml - - native - ERuntime: - type: string - IFunctionVersionQuery: - type: object - properties: - version: - type: string - description: Filter on the version of the function (case-sensitive, supports - wildcards). - status: - type: array - items: - $ref: '#/components/schemas/EStatusFilter' - description: Filter on the status of the plug. Filter values with a `-` - postfix exclude the status. Use the `any` filter value to include all - states. When not specified, a default `undeployed-` filter excludes _undeployed_ - functions. - runtimeVersion: - $ref: '#/components/schemas/SemanticVersionRange' - description: Filter on the runtime version. - createdBy: - type: string - description: Filter on the user that create the plug. You can use the `@me` - token to indicate your own plugs. - examples: - - '@me' - updatedBy: - type: string - description: Filter on the user that last updated the plug. You can use - the `@me` token to indicate your own plugs. - examples: - - '@me' - createdBefore: - $ref: '#/components/schemas/TimestampSpec' - description: Filter on funtions that were created before the given timestamp - or age. - createdAfter: - $ref: '#/components/schemas/TimestampSpec' - description: Filter on funtions that were created after the given timestamp - or age. - updatedBefore: - $ref: '#/components/schemas/TimestampSpec' - description: Filter on funtions that were updated before the given timestamp - or age. - updatedAfter: - $ref: '#/components/schemas/TimestampSpec' - description: Filter on funtions that were updated after the given timestamp - or age. - additionalProperties: false - description: Filter on function attributes that can change across function versions. - When these query parameters are used, the query is considered a _function - version_ listing and no HAL links to latest (_draft_, _published_) versions - are included. - SemanticVersionRange: - anyOf: - - type: string - - $ref: '#/components/schemas/SemanticVersion' - description: A range of semantic versions. See https://devhints.io/semver - TimestampSpec: - anyOf: - - $ref: '#/components/schemas/TimestampAge' - - $ref: '#/components/schemas/TimestampAbsolute' - description: A timestamp specification. - TimestampAge: - anyOf: - - $ref: '#/components/schemas/ISO8601Period' - - $ref: '#/components/schemas/DurationSpec' - description: A timestamp expressed as a age relative to now - title: Age - ISO8601Period: - type: string - description: An ISO8601 period expression - pattern: P(\d+Y)?(\d+M)?(\d+D)?(T(\d+H)?(\d+M)?(\d+(\.\d+)S))? - format: duration - title: ISO8601 Period - DurationSpec: - type: string - description: An duration expression. A numeric value without unit is interpreted - as milliseconds. - pattern: \d+([ybwdhms])? - title: Duration - TimestampAbsolute: - anyOf: - - $ref: '#/components/schemas/ISO8601DateTime' - - $ref: '#/components/schemas/ISO8601Date' - description: An absolute timestamp as an ISO8601 string - title: Absolute - ISO8601DateTime: - type: string - description: An ISO8601 date-time expression. - pattern: \d{4}-\d{2}-\d{2}[T ]\d{2}:\d{2}(:\d{2})?(Z|([+-]\d\d:\d\d))? - format: date-time - title: ISO8601 Timestamp - ISO8601Date: - type: string - description: An ISO8601 date expression. - pattern: \d{4}-\d{2}-\d{2}(Z|([+-]\d\d:\d\d))? - format: date - title: ISO8601 Date - IDeprecatedDraftFilter: - type: object - properties: - deprecated: - type: boolean - description: Filter on the deprecation status of the function. - draft: - type: boolean - description: Filter on the draft status of the function. - additionalProperties: false - IDeployAttributesFilter: - type: object - properties: - endpoint: - type: string - description: Filter on the openfaas endpoint. This is case-insensitive and - supports wild-cards `?` (any one character) and `*` (any sequence of characters). - imageName: - type: string - description: Filter on the container image name. This is case-insensitive - and supports wild-cards `?` (any one character) and `*` (any sequence - of characters). - storageLocation: - type: string - description: Filter on the storageLocation. This is case-insensitive and - supports wild-cards `?` (any one character) and `*` (any sequence of characters). - additionalProperties: false IVersionIncludes: type: object properties: @@ -385,25 +174,26 @@ components: when no other versions are available. If set to `true`, deprecated versions are **included**. If set to `false`, deprecated versions are **excluded**. additionalProperties: false - INamedVersionsFilter: - type: object - properties: - nameVersion: - type: array - items: - $ref: '#/components/schemas/NamedVersion' - description: Filter on exact `{name}@{version}` functions. Using this filter - implies a `latest=false` default, returning multiple versions of the same - named versions if they are filtered. - additionalProperties: false - NamedVersion: + ShowRelatedType: type: string - description: A function reference represented by `name@version`. - pattern: ^.*@(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)$ + enum: + - embed + - link + - none ILatestFunctionsQuery: type: object additionalProperties: false properties: + showRelated: + $ref: '#/components/schemas/ShowRelatedType' + description: 'Sets the representation of related function versions (like + the _latest_ draft and/or published) in the response. + + - `embed`: as full summary representation (in `_embedded`). + + - `link`: as HAL link in (in `_links`). + + - `none`: omitted.' limit: type: number description: The maximum number of items to be return from this query. Has @@ -443,6 +233,16 @@ components: description: Request to list latest function versions per named function. A request that only uses these query parameters will include links to the _latest_ draft/published versions. + EArchiveFormat: + type: string + enum: + - node + - python + - golang + - byoml + - native + ERuntime: + type: string ILatestFunctionVersionsQuery: type: object properties: @@ -458,193 +258,15 @@ components: includeDraft: type: boolean description: Configures the inclusion of _draft_ versions when selecting - latest versions per name. By default, draft versions are only considered - when no other versions are available. If set to `true`, draft versions - are **included**. If set to `false`, draft versions are **excluded**. - includeDeprecated: - type: boolean - description: Configures the inclusion of _deprecated_ versions when selecting - latest versions per name. By default, deprecated versions are only considered - when no other versions are available. If set to `true`, deprecated versions - are **included**. If set to `false`, deprecated versions are **excluded**. - deprecated: - type: boolean - description: Filter on the deprecation status of the function. - draft: - type: boolean - description: Filter on the draft status of the function. - nameVersion: - type: array - items: - $ref: '#/components/schemas/NamedVersion' - description: Filter on exact `{name}@{version}` functions. Using this filter - implies a `latest=false` default, returning multiple versions of the same - named versions if they are filtered. - version: - type: string - description: Filter on the version of the function (case-sensitive, supports - wildcards). - status: - type: array - items: - $ref: '#/components/schemas/EStatusFilter' - description: Filter on the status of the plug. Filter values with a `-` - postfix exclude the status. Use the `any` filter value to include all - states. When not specified, a default `undeployed-` filter excludes _undeployed_ - functions. - runtimeVersion: - $ref: '#/components/schemas/SemanticVersionRange' - description: Filter on the runtime version. - createdBy: - type: string - description: Filter on the user that create the plug. You can use the `@me` - token to indicate your own plugs. - examples: - - '@me' - updatedBy: - type: string - description: Filter on the user that last updated the plug. You can use - the `@me` token to indicate your own plugs. - examples: - - '@me' - createdBefore: - $ref: '#/components/schemas/TimestampSpec' - description: Filter on funtions that were created before the given timestamp - or age. - createdAfter: - $ref: '#/components/schemas/TimestampSpec' - description: Filter on funtions that were created after the given timestamp - or age. - updatedBefore: - $ref: '#/components/schemas/TimestampSpec' - description: Filter on funtions that were updated before the given timestamp - or age. - updatedAfter: - $ref: '#/components/schemas/TimestampSpec' - description: Filter on funtions that were updated after the given timestamp - or age. - name: - type: string - description: Filter on the name of the function. This is case-insensitive - and supports wild-cards `?` (any one character) and `*` (any sequence - of characters). - archiveFormat: - type: array - items: - $ref: '#/components/schemas/EArchiveFormat' - description: Filter on the archive format of the function. - runtime: - type: array - items: - $ref: '#/components/schemas/ERuntime' - description: Filter on the runtime of the function. - latest: - type: boolean - description: When `true`, only the latest version per function name is returned. - If set to `false`, multiple versions per named function can be returned. - Defaults to `true`, except when specific versions are selected with the - `nameVersion` filter. - additionalProperties: false - description: Latest function versions listing query. - INamedFunctionVersionsQuery: - type: object - additionalProperties: false - properties: - limit: - type: number - description: The maximum number of items to be return from this query. Has - a deployment-defined default and maximum value. - minimum: 0 - page: - type: number - description: The number of pages to skip when returning result to this query. - minimum: 0 - deprecated: - type: boolean - description: Filter on the deprecation status of the function. - draft: - type: boolean - description: Filter on the draft status of the function. - version: - type: string - description: Filter on the version of the function (case-sensitive, supports - wildcards). - status: - type: array - items: - $ref: '#/components/schemas/EStatusFilter' - description: Filter on the status of the plug. Filter values with a `-` - postfix exclude the status. Use the `any` filter value to include all - states. When not specified, a default `undeployed-` filter excludes _undeployed_ - functions. - runtimeVersion: - $ref: '#/components/schemas/SemanticVersionRange' - description: Filter on the runtime version. - createdBy: - type: string - description: Filter on the user that create the plug. You can use the `@me` - token to indicate your own plugs. - examples: - - '@me' - updatedBy: - type: string - description: Filter on the user that last updated the plug. You can use - the `@me` token to indicate your own plugs. - examples: - - '@me' - createdBefore: - $ref: '#/components/schemas/TimestampSpec' - description: Filter on funtions that were created before the given timestamp - or age. - createdAfter: - $ref: '#/components/schemas/TimestampSpec' - description: Filter on funtions that were created after the given timestamp - or age. - updatedBefore: - $ref: '#/components/schemas/TimestampSpec' - description: Filter on funtions that were updated before the given timestamp - or age. - updatedAfter: - $ref: '#/components/schemas/TimestampSpec' - description: Filter on funtions that were updated after the given timestamp - or age. - archiveFormat: - type: array - items: - $ref: '#/components/schemas/EArchiveFormat' - description: Filter on the archive format of the function. - runtime: - type: array - items: - $ref: '#/components/schemas/ERuntime' - description: Filter on the runtime of the function. - description: Named function versions listing query. - IVersionsQuery: - type: object - additionalProperties: false - properties: - limit: - type: number - description: The maximum number of items to be return from this query. Has - a deployment-defined default and maximum value. - minimum: 0 - page: - type: number - description: The number of pages to skip when returning result to this query. - minimum: 0 - endpoint: - type: string - description: Filter on the openfaas endpoint. This is case-insensitive and - supports wild-cards `?` (any one character) and `*` (any sequence of characters). - imageName: - type: string - description: Filter on the container image name. This is case-insensitive - and supports wild-cards `?` (any one character) and `*` (any sequence - of characters). - storageLocation: - type: string - description: Filter on the storageLocation. This is case-insensitive and - supports wild-cards `?` (any one character) and `*` (any sequence of characters). + latest versions per name. By default, draft versions are only considered + when no other versions are available. If set to `true`, draft versions + are **included**. If set to `false`, draft versions are **excluded**. + includeDeprecated: + type: boolean + description: Configures the inclusion of _deprecated_ versions when selecting + latest versions per name. By default, deprecated versions are only considered + when no other versions are available. If set to `true`, deprecated versions + are **included**. If set to `false`, deprecated versions are **excluded**. deprecated: type: boolean description: Filter on the deprecation status of the function. @@ -716,20 +338,68 @@ components: items: $ref: '#/components/schemas/ERuntime' description: Filter on the runtime of the function. - description: Function versions paged query - IPlugTypeQuery: - type: object - properties: - type: - $ref: '#/components/schemas/EPlugType' - description: If set, filters on the type of plug. + latest: + type: boolean + description: When `true`, only the latest version per function name is returned. + If set to `false`, multiple versions per named function can be returned. + Defaults to `true`, except when specific versions are selected with the + `nameVersion` filter. + showRelated: + type: string + enum: + - none additionalProperties: false - EPlugType: + description: Latest function versions listing query. + SemanticVersionRange: + anyOf: + - type: string + - $ref: '#/components/schemas/SemanticVersion' + description: A range of semantic versions. See https://devhints.io/semver + TimestampSpec: + anyOf: + - $ref: '#/components/schemas/TimestampAge' + - $ref: '#/components/schemas/TimestampAbsolute' + description: A timestamp specification. + TimestampAge: + anyOf: + - $ref: '#/components/schemas/ISO8601Period' + - $ref: '#/components/schemas/DurationSpec' + description: A timestamp expressed as a age relative to now + title: Age + ISO8601Period: type: string - enum: - - sensor - - actuator - - transformer + description: An ISO8601 period expression + pattern: P(\d+Y)?(\d+M)?(\d+D)?(T(\d+H)?(\d+M)?(\d+(\.\d+)S))? + format: duration + title: ISO8601 Period + DurationSpec: + type: string + description: An duration expression. A numeric value without unit is interpreted + as milliseconds. + pattern: \d+([ybwdhms])? + title: Duration + TimestampAbsolute: + anyOf: + - $ref: '#/components/schemas/ISO8601DateTime' + - $ref: '#/components/schemas/ISO8601Date' + description: An absolute timestamp as an ISO8601 string + title: Absolute + ISO8601DateTime: + type: string + description: An ISO8601 date-time expression. + pattern: \d{4}-\d{2}-\d{2}[T ]\d{2}:\d{2}(:\d{2})?(Z|([+-]\d\d:\d\d))? + format: date-time + title: ISO8601 Timestamp + ISO8601Date: + type: string + description: An ISO8601 date expression. + pattern: \d{4}-\d{2}-\d{2}(Z|([+-]\d\d:\d\d))? + format: date + title: ISO8601 Date + NamedVersion: + type: string + description: A function version reference represented as `@`. + pattern: ^[^@]*@(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)$ ILatestPlugsQuery: type: object additionalProperties: false @@ -737,6 +407,16 @@ components: type: $ref: '#/components/schemas/EPlugType' description: If set, filters on the type of plug. + showRelated: + $ref: '#/components/schemas/ShowRelatedType' + description: 'Sets the representation of related function versions (like + the _latest_ draft and/or published) in the response. + + - `embed`: as full summary representation (in `_embedded`). + + - `link`: as HAL link in (in `_links`). + + - `none`: omitted.' limit: type: number description: The maximum number of items to be return from this query. Has @@ -776,6 +456,12 @@ components: description: Latest plug versions listing query with latest links. A request that only uses these query parameters will include links to the _latest_ draft/published versions of the plug. + EPlugType: + type: string + enum: + - sensor + - actuator + - transformer ILatestPlugVersionsQuery: type: object additionalProperties: false @@ -886,16 +572,11 @@ components: If set to `false`, multiple versions per named function can be returned. Defaults to `true`, except when specific versions are selected with the `nameVersion` filter. + showRelated: + type: string + enum: + - none description: Plug versions listing query. - ITagsQuery: - type: object - properties: - tags: - $ref: '#/components/schemas/TagsFilter' - description: Filter on the tags of the item. Can be a single tag, or a list - of tags. When multiple tags are specified, an item must have all of the - tags to be selected. - additionalProperties: false TagsFilter: anyOf: - type: array @@ -918,45 +599,6 @@ components: examples: - '#4153ea' additionalProperties: false - IFunctionDeleteQuery: - type: object - properties: - force: - type: boolean - description: 'If true, the function version will be immediately - undeployed and removed. - - - Otherwise, the removal will be delayed to allow current invocations to - end. During that period, the function is marked _deprecated_.' - undeploy: - type: boolean - description: 'If `true`, the `DELETE` operation - - * undeploys the (openfaas) function: it becomes no longer available for - invocation. - - * does NOT remove the function from registry: it stays in an `undeployed` - status. All assets and definitions are retained, so the version can be - restored later with a _rebuild_ action. - - - If `false`, the `DELETE` operation - - * _only_ marks the plug function as _deprecated_, the function remains - active but is removed from the default listings. This also applies to - _draft_ versions. - - - This parameter is incompatible with `force=true`. - - - If not set the default behaviour applies: - - * _draft_ versions are _undeployed_ and _removed_ from registry. - - * non-_draft_ versions are marked _deprecated_ only.' - additionalProperties: false IPlugDeleteForceQuery: type: object properties: @@ -966,42 +608,6 @@ components: and removed. Otherwise, the plug version(s) will only be deprecated, i.e removed from regular listings. additionalProperties: false - IPlugDeleteQuery: - type: object - properties: - force: - type: boolean - description: If true, the plug version(s) will be undeployed - and removed. Otherwise, the plug version(s) will only be deprecated, - i.e removed from regular listings. - undeploy: - type: boolean - description: 'If `true`, the `DELETE` operation - - * undeploys the (openfaas) function for the plug: it becomes no longer - available for invocation. - - * does NOT remove the plug from registry: it stays in an `undeployed` - status. All assets and definitions are retained, so the plug can be restored - later with a _rebuild_ action. - - - If `false`, the `DELETE` operation - - * _only_ marks the plug version(s) as _deprecated_: the plug remains active - but is removed from the default listings. This also applies to _draft_ - versions. - - - This parameter is incompatible with `force=true`. - - - If not set the default behaviour applies: - - * _draft_ versions are _undeployed_ and _removed_ from registry. - - * non-_draft_ versions are marked _deprecated_ only.' - additionalProperties: false IAsyncQueryDefaultFalse: type: object properties: @@ -1013,53 +619,15 @@ components: job actions are completed, or a timeout occurs. default: false additionalProperties: false - IAsyncQueryDefaultTrue: - type: object - properties: - async: - type: boolean - description: Unless this is set to false, the server will start - the required job actions asynchronously and return a 202 - Accepted response. If false the request will block - until the job actions are completed, or a timeout occurs. - default: true - additionalProperties: false IAsyncVerifyQuery: type: object + additionalProperties: false properties: - comment: - type: string - description: An optional user-specified comment corresponding to the operation. - async: - type: boolean - description: Unless this is set to false, the server will start - the required job actions asynchronously and return a 202 - Accepted response. If false the request will block - until the job actions are completed, or a timeout occurs. - default: true scaleToZero: type: boolean description: Indicates whether the function needs to be scaled down after successful verification. If not set, the function is scaled to zero only if it was not active before this command. - additionalProperties: false - IUpdateComment: - type: object - properties: - comment: - type: string - description: An optional user-specified comment corresponding to the operation. - IAsyncDeployQuery: - type: object - properties: - deprecatePrevious: - $ref: '#/components/schemas/DeprecatePreviousPolicy' - description: Set the cleanup policy used to automatically deprecate/delete - previous versions. - dryRun: - type: boolean - description: If set to true, validates the deployment conditions, - but does not change anything. async: type: boolean description: Unless this is set to false, the server will start @@ -1067,36 +635,6 @@ components: Accepted response. If false the request will block until the job actions are completed, or a timeout occurs. default: true - scaleToZero: - type: boolean - description: If set to true, after successful deployment, the - deployed function will be scaled to zero. Saves computing resources when - the function is not to be used immediately. - default: false - additionalProperties: false - IDryRunQuery: - type: object - properties: - dryRun: - type: boolean - description: If set to true, validates the deployment conditions, - but does not change anything. - additionalProperties: false - IDeprecatePreviousQuery: - type: object - properties: - deprecatePrevious: - $ref: '#/components/schemas/DeprecatePreviousPolicy' - description: Set the cleanup policy used to automatically deprecate/delete - previous versions. - additionalProperties: false - DeprecatePreviousPolicy: - type: string - enum: - - none - - all - - patch - - minor IJobQuery: type: object properties: @@ -1135,6 +673,7 @@ components: - $ref: '#/components/schemas/JobTypeUndeploy' - $ref: '#/components/schemas/JobTypeScale' - $ref: '#/components/schemas/JobTypeBatch' + - $ref: '#/components/schemas/JobTypeNotify' title: Job Type JobTypeBuild: type: string @@ -1173,6 +712,12 @@ components: title: Batch enum: - batch + JobTypeNotify: + type: string + description: A job to notify that an function version has changed. + title: Notify + enum: + - notify JobStateResult: anyOf: - $ref: '#/components/schemas/JobState' @@ -1966,7 +1511,13 @@ components: description: Webscript named versions listing query. IRebuildQueryV2: type: object + additionalProperties: false properties: + scaleToZero: + type: boolean + description: Indicates whether the function needs to be scaled down after + successful verification. If not set, the function is scaled to zero only + if it was not active before this command. comment: type: string description: An optional user-specified comment corresponding to the operation. @@ -2007,16 +1558,10 @@ components: * running jobs on entity * the `dryRun` option' - scaleToZero: - type: boolean - description: Indicates whether the function needs to be scaled down after - successful (re-)deployment. If not set, the function is scaled to zero - only if it was not active before this command. skipRebuild: type: boolean description: If set, the function will not be rebuild. Always uses the current runtime version when re-deploying/re-verifying the function. - additionalProperties: false IRemovePlugQueryV2: type: object additionalProperties: false @@ -2257,9 +1802,57 @@ components: - deployed - unhealthy additionalProperties: false + IRequestDeployQuery: + type: object + properties: + deploy: + type: boolean + description: 'Indicates that a function should be _deployed_ when its assets + are valid. + + + * If `true` (default), jobs to build and deploy the function will be initiated + after it is checked that the assets are valid. Invalid assets lead to + a validation error, and the function and its assets are not created or + updated. + + * If `false`, the uploaded assets are stored and the function is created/updated + in `registered` state. Asset validation errors are only returned as warning, + and stored as `failureReason` on the function entity. Use an _asset update_ + or _rebuild_ to initiate a build and deploy at a later stage.' + default: true + additionalProperties: false ICreateFunctionQueryV2: type: object properties: + deploy: + type: boolean + description: 'Indicates that a function should be _deployed_ when its assets + are valid. + + + * If `true` (default), jobs to build and deploy the function will be initiated + after it is checked that the assets are valid. Invalid assets lead to + a validation error, and the function and its assets are not created or + updated. + + * If `false`, the uploaded assets are stored and the function is created/updated + in `registered` state. Asset validation errors are only returned as warning, + and stored as `failureReason` on the function entity. Use an _asset update_ + or _rebuild_ to initiate a build and deploy at a later stage.' + default: true + author: + type: string + description: Optionally changes the author metadata when updating a function. + comment: + type: string + description: An optional user-specified comment corresponding to the operation. + scaleToZero: + type: boolean + description: If set to true, after successful deployment, the + deployed function will be scaled to zero. This saves computing resources + when the function is not to be used immediately. + default: false deprecatePrevious: $ref: '#/components/schemas/DeprecatePreviousPolicy' description: Set the cleanup policy used to automatically deprecate/delete @@ -2275,12 +1868,6 @@ components: Accepted response. If false the request will block until the job actions are completed, or a timeout occurs. default: true - scaleToZero: - type: boolean - description: If set to true, after successful deployment, the - deployed function will be scaled to zero. Saves computing resources when - the function is not to be used immediately. - default: false version: $ref: '#/components/schemas/SemanticVersionRange' description: If set, the function version will be an increment of the latest @@ -2296,14 +1883,87 @@ components: assets are still mutable. A build and deploy is initiated only in the case when all necessary assets are present and valid. default: false + runtime: + $ref: '#/components/schemas/NamedVersionRange' + description: 'If set, the created function will use the indicated runtime + (latest version within specified range). + + + This takes precedence over the runtime specified in a function manifest + (copied or from request body).' + copy: + anyOf: + - $ref: '#/components/schemas/NamedVersionRange' + - $ref: '#/components/schemas/ExampleReference' + description: "Indicates the _source_ of initial assets for a _new function_.\n\ + \nWhen using this query parameter, the request body does not need to contain\ + \ assets, but any assets in the request body will overwrite the copied\ + \ assets.\n\n#### Selection of _assets_ source\n\n* If set as `[@]`,\ + \ the _new function_ will be created with copied assets of the selected\ + \ _source function_.\n* If set as `!example`, a `runtime` query parameter\ + \ is required, and the _new function_ will be initialized with assets\ + \ of the _runtime example_.\n\n#### Selection of the _source function_\n\ + \nWhen `` is a range (or is not given), the latest\ + \ _published_ version (in that range) is used.\n\nIf no _published_ version\ + \ exists, the latest _draft_ is selected.\n\nIf no versions in the range\ + \ exist, a `404` _Not Found_ error is returned.\n\n#### The `name` of\ + \ the _new function_\n\nIf a `name` is NOT specified (either as query\ + \ parameter, or in an optional manifest asset in the request body), the\ + \ `name` of the _new function_ will be that of the _source function_.\n\ + \n#### The `version` of the _new function_\n\nWhen the _target_ and _source_\ + \ name are equal, the `version` query parameters is defaulted to ``\ + \ (`~` when it's an exact version)\n\nThe version\ + \ of the _new function_ will be:\n* If a `version` is NOT specified (either\ + \ as query parameter, in an optional manifest asset, or as ``\ + \ _default_)\n\n * a **patch increment** (`..+1`)\ + \ of the latest **existing version** with the target `name`\n\n * **`1.0.0`**\ + \ otherwise\n\n* If a `version` is specified:\n\n * the **lowest version**\ + \ in that range **if no existing version** is in that range.\n\n * an\ + \ **increment** of the latest existing version, **at the highest level**\ + \ (_major_,_minor_,_patch_) allowed by that range.\n\n * otherwise, if\ + \ all allowed versions already exist, a **`409` _Duplicate_ error** is\ + \ raised.\n\n#### Deployment overrides\n\nThe new function will use the\ + \ deployment overrides of the copied function, unless a _manifest_ was\ + \ specified in the request body." additionalProperties: false + DeprecatePreviousPolicy: + type: string + enum: + - none + - all + - patch + - minor + NamedVersionRange: + type: string + description: 'A name reference with optional version range: `[@]`. + + + References (a version range of) a named and versioned entity like _function_ + or _runtime_.' + pattern: ^[^@]*(@.*)?$ + ExampleReference: + type: string + description: 'Example reference. + + + References the example assets from the selected runtime.' + enum: + - '!example' IPublishFunctionQuery: type: object additionalProperties: false properties: + chown: + type: boolean + description: If set, ownership of the draft function is transferred to the + current user. + default: false comment: type: string description: An optional user-specified comment corresponding to the operation. + author: + type: string + description: Optionally changes the author metadata when updating a function. deprecatePrevious: $ref: '#/components/schemas/DeprecatePreviousPolicy' description: Set the cleanup policy used to automatically deprecate/delete @@ -2363,10 +2023,41 @@ components: additionalProperties: false IUpdateDraftQuery: type: object + additionalProperties: false properties: + scaleToZero: + type: boolean + description: If set to true, after successful deployment, the + deployed function will be scaled to zero. This saves computing resources + when the function is not to be used immediately. + default: false + deploy: + type: boolean + description: 'Indicates that a function should be _deployed_ when its assets + are valid. + + + * If `true` (default), jobs to build and deploy the function will be initiated + after it is checked that the assets are valid. Invalid assets lead to + a validation error, and the function and its assets are not created or + updated. + + * If `false`, the uploaded assets are stored and the function is created/updated + in `registered` state. Asset validation errors are only returned as warning, + and stored as `failureReason` on the function entity. Use an _asset update_ + or _rebuild_ to initiate a build and deploy at a later stage.' + default: true + chown: + type: boolean + description: If set, ownership of the draft function is transferred to the + current user. + default: false comment: type: string description: An optional user-specified comment corresponding to the operation. + author: + type: string + description: Optionally changes the author metadata when updating a function. async: type: boolean description: Unless this is set to false, the server will start @@ -2374,14 +2065,6 @@ components: Accepted response. If false the request will block until the job actions are completed, or a timeout occurs. default: true - chown: - type: boolean - description: If set, ownership of the draft function is transferred to the - current user. - default: false - required: - - chown - additionalProperties: false ILatestPlugQuery: type: object properties: @@ -3616,12 +3299,6 @@ components: type: object additionalProperties: false properties: - scaleToZero: - type: boolean - description: If set to true, after successful deployment, the - deployed function will be scaled to zero. Saves computing resources when - the function is not to be used immediately. - default: false async: type: boolean description: Unless this is set to false, the server will start @@ -3633,6 +3310,12 @@ components: type: boolean description: If set to true, validates the deployment conditions, but does not change anything. + scaleToZero: + type: boolean + description: If set to true, after successful deployment, the + deployed function will be scaled to zero. This saves computing resources + when the function is not to be used immediately. + default: false IMessageResponse: type: object properties: @@ -3647,6 +3330,23 @@ components: type: string required: - error + IRegistryErrorResponse: + type: object + properties: + error: + type: string + code: + type: string + statusCode: + type: number + data: + type: object + additionalProperties: + type: string + required: + - code + - error + - statusCode IOperation: type: object properties: @@ -5075,65 +4775,7 @@ components: entities: type: array items: - type: object - properties: - _links: - $ref: '#/components/schemas/IAltVersionHALLink' - createdBy: - type: string - description: The user that created this entity. - createdAt: - type: string - format: date-time - description: The timestamp at which this entity was created. - updatedBy: - type: string - description: The user that last updated this entity. - updatedAt: - type: string - format: date-time - description: The timestamp at which this entity was last updated. - updates: - type: array - items: - $ref: '#/components/schemas/IUpdateRecord' - description: The audit logs corresponding to the latest modifying - operations on this entity. - status: - $ref: '#/components/schemas/EStatus' - description: The current status of this function entity. - failureReason: - $ref: '#/components/schemas/FailureReason' - description: A description of the last failure related to this function - entity. - runtime: - $ref: '#/components/schemas/IRuntimeAttributes' - description: Information about the current runtime used by this function - deployment. - deprecated: - type: boolean - description: If true this plug is removed from regular - listings, as a result of a DELETE with force=false. - draft: - type: boolean - description: If true this function is a draft function - and it's assets are still mutable. - plug: - $ref: '#/components/schemas/IPlugManifest' - description: The plug specification as provided by the plug.json - asset. - required: - - _links - - createdAt - - createdBy - - deprecated - - draft - - plug - - runtime - - status - - updatedAt - - updatedBy - - updates + $ref: '#/components/schemas/EntityWithLinks_IPlugResponseV2_' description: The specification and deployment status of the queried functions required: - count @@ -5160,6 +4802,84 @@ components: limit: type: number description: The page size used for this query result. + EntityWithLinks_IPlugResponseV2_: + type: object + properties: + _embedded: + $ref: '#/components/schemas/IAltEmbeddedVersion_IPlugResponseV2_' + description: Embedded representations of the _latest_ draft/published versions. + _links: + $ref: '#/components/schemas/IAltVersionHALLink' + createdBy: + type: string + description: The user that created this entity. + createdAt: + type: string + format: date-time + description: The timestamp at which this entity was created. + updatedBy: + type: string + description: The user that last updated this entity. + updatedAt: + type: string + format: date-time + description: The timestamp at which this entity was last updated. + updates: + type: array + items: + $ref: '#/components/schemas/IUpdateRecord' + description: The audit logs corresponding to the latest modifying operations + on this entity. + status: + $ref: '#/components/schemas/EStatus' + description: The current status of this function entity. + failureReason: + $ref: '#/components/schemas/FailureReason' + description: A description of the last failure related to this function + entity. + runtime: + $ref: '#/components/schemas/IRuntimeAttributes' + description: Information about the current runtime used by this function + deployment. + deprecated: + type: boolean + description: If true this plug is removed from regular listings, + as a result of a DELETE with force=false. + draft: + type: boolean + description: If true this function is a draft function and + it's assets are still mutable. + plug: + $ref: '#/components/schemas/IPlugManifest' + description: The plug specification as provided by the plug.json + asset. + required: + - createdAt + - createdBy + - deprecated + - draft + - plug + - runtime + - status + - updatedAt + - updatedBy + - updates + IWithEmbeddedAltVersions_IPlugResponseV2_: + type: object + properties: + _embedded: + $ref: '#/components/schemas/IAltEmbeddedVersion_IPlugResponseV2_' + description: Embedded representations of the _latest_ draft/published versions. + IAltEmbeddedVersion_IPlugResponseV2_: + type: object + properties: + draft: + $ref: '#/components/schemas/IPlugResponseV2' + description: Embedded representation of the lastest draft version. + published: + $ref: '#/components/schemas/IPlugResponseV2' + description: Embedded representation of the lastest published version. + description: Embedded representations of the _latest_ draft/published versions. IPlugVersionsResponseV2: type: object properties: @@ -5565,6 +5285,7 @@ components: required: - args - imageName + - revision - runtimeName - runtimeVersion - storageLocation @@ -5585,6 +5306,7 @@ components: required: - runtimeName - runtimeVersion + - revision description: Job arguments shared by all function jobs IBuildResult: type: object @@ -5729,6 +5451,7 @@ components: - endpoint - imageName - namespace + - revision - runtimeName - runtimeVersion description: Input argument to an (openfaas) deployment job for a function. @@ -5817,6 +5540,7 @@ components: required: - endpoint - namespace + - revision - runtimeName - runtimeVersion description: Input arguments for an (openfaas) deployment verification job. @@ -5849,6 +5573,7 @@ components: - endpoint - isNativePlug - namespace + - revision - runtimeName - runtimeVersion description: Input argument to an (openfaas) undeployment job for a function. @@ -5893,6 +5618,7 @@ components: - endpoint - namespace - replicas + - revision - runtimeName - runtimeVersion description: Input argument to an (openfaas) scale job for a function. @@ -5982,70 +5708,90 @@ components: entities: type: array items: - type: object - properties: - _links: - $ref: '#/components/schemas/IAltVersionHALLink' - createdBy: - type: string - description: The user that created this entity. - createdAt: - type: string - format: date-time - description: The timestamp at which this entity was created. - updatedBy: - type: string - description: The user that last updated this entity. - updatedAt: - type: string - format: date-time - description: The timestamp at which this entity was last updated. - updates: - type: array - items: - $ref: '#/components/schemas/IUpdateRecord' - description: The audit logs corresponding to the latest modifying - operations on this entity. - status: - $ref: '#/components/schemas/EStatus' - description: The current status of this function entity. - failureReason: - $ref: '#/components/schemas/FailureReason' - description: A description of the last failure related to this function - entity. - runtime: - $ref: '#/components/schemas/IRuntimeAttributes' - description: Information about the current runtime used by this function - deployment. - deprecated: - type: boolean - description: If true this function is deprecated and - removed from regular listings. - draft: - type: boolean - description: If true this function is a draft function - and it's assets are still mutable. - model: - $ref: '#/components/schemas/IKFServingManifest' - description: The model specification as provided by the model.json - asset. - required: - - _links - - createdAt - - createdBy - - deprecated - - draft - - model - - runtime - - status - - updatedAt - - updatedBy - - updates + $ref: '#/components/schemas/EntityWithLinks_IKfservingResponseV2_' description: The specification and deployment status of the queried functions required: - count - entities description: Models Found + EntityWithLinks_IKfservingResponseV2_: + type: object + properties: + _embedded: + $ref: '#/components/schemas/IAltEmbeddedVersion_IKfservingResponseV2_' + description: Embedded representations of the _latest_ draft/published versions. + _links: + $ref: '#/components/schemas/IAltVersionHALLink' + createdBy: + type: string + description: The user that created this entity. + createdAt: + type: string + format: date-time + description: The timestamp at which this entity was created. + updatedBy: + type: string + description: The user that last updated this entity. + updatedAt: + type: string + format: date-time + description: The timestamp at which this entity was last updated. + updates: + type: array + items: + $ref: '#/components/schemas/IUpdateRecord' + description: The audit logs corresponding to the latest modifying operations + on this entity. + status: + $ref: '#/components/schemas/EStatus' + description: The current status of this function entity. + failureReason: + $ref: '#/components/schemas/FailureReason' + description: A description of the last failure related to this function + entity. + runtime: + $ref: '#/components/schemas/IRuntimeAttributes' + description: Information about the current runtime used by this function + deployment. + deprecated: + type: boolean + description: If true this function is deprecated and removed + from regular listings. + draft: + type: boolean + description: If true this function is a draft function and + it's assets are still mutable. + model: + $ref: '#/components/schemas/IKFServingManifest' + description: The model specification as provided by the model.json + asset. + required: + - createdAt + - createdBy + - deprecated + - draft + - model + - runtime + - status + - updatedAt + - updatedBy + - updates + IWithEmbeddedAltVersions_IKfservingResponseV2_: + type: object + properties: + _embedded: + $ref: '#/components/schemas/IAltEmbeddedVersion_IKfservingResponseV2_' + description: Embedded representations of the _latest_ draft/published versions. + IAltEmbeddedVersion_IKfservingResponseV2_: + type: object + properties: + draft: + $ref: '#/components/schemas/IKfservingResponseV2' + description: Embedded representation of the lastest draft version. + published: + $ref: '#/components/schemas/IKfservingResponseV2' + description: Embedded representation of the lastest published version. + description: Embedded representations of the _latest_ draft/published versions. IModelVersionsResponseV2: type: object properties: @@ -6209,78 +5955,98 @@ components: page: type: number description: The page number of a paged query result. - entities: - type: array - items: - type: object - properties: - _links: - $ref: '#/components/schemas/IInvokeHALLink' - description: HAL links to related actions. - createdBy: - type: string - description: The user that created this entity. - createdAt: - type: string - format: date-time - description: The timestamp at which this entity was created. - updatedBy: - type: string - description: The user that last updated this entity. - updatedAt: - type: string - format: date-time - description: The timestamp at which this entity was last updated. - updates: - type: array - items: - $ref: '#/components/schemas/IUpdateRecord' - description: The audit logs corresponding to the latest modifying - operations on this entity. - status: - $ref: '#/components/schemas/EStatus' - description: The current status of this function entity. - failureReason: - $ref: '#/components/schemas/FailureReason' - description: A description of the last failure related to this function - entity. - runtime: - $ref: '#/components/schemas/IRuntimeAttributes' - description: Information about the current runtime used by this function - deployment. - deprecated: - type: boolean - description: If true this function is deprecated and - removed from regular listings. - draft: - type: boolean - description: If true this function is a draft function - and it's assets are still mutable. - webscript: - $ref: '#/components/schemas/IWebscriptManifest' - description: The webscript specification as provided by the webscript.json - asset. - secret: - type: string - description: The secret for this webscript deployment. This is null - when allowHmac=false in the webscript specificaton. - required: - - _links - - createdAt - - createdBy - - deprecated - - draft - - runtime - - status - - updatedAt - - updatedBy - - updates - - webscript + entities: + type: array + items: + $ref: '#/components/schemas/EntityWithLinks_IWebscriptResponseWithInvokeLinkV2_' description: The specification and deployment status of the queried functions required: - count - entities description: Webscripts Found + EntityWithLinks_IWebscriptResponseWithInvokeLinkV2_: + type: object + properties: + _embedded: + $ref: '#/components/schemas/IAltEmbeddedVersion_IWebscriptResponseWithInvokeLinkV2_' + description: Embedded representations of the _latest_ draft/published versions. + _links: + $ref: '#/components/schemas/IInvokeHALLink' + description: HAL links to related actions. + createdBy: + type: string + description: The user that created this entity. + createdAt: + type: string + format: date-time + description: The timestamp at which this entity was created. + updatedBy: + type: string + description: The user that last updated this entity. + updatedAt: + type: string + format: date-time + description: The timestamp at which this entity was last updated. + updates: + type: array + items: + $ref: '#/components/schemas/IUpdateRecord' + description: The audit logs corresponding to the latest modifying operations + on this entity. + status: + $ref: '#/components/schemas/EStatus' + description: The current status of this function entity. + failureReason: + $ref: '#/components/schemas/FailureReason' + description: A description of the last failure related to this function + entity. + runtime: + $ref: '#/components/schemas/IRuntimeAttributes' + description: Information about the current runtime used by this function + deployment. + deprecated: + type: boolean + description: If true this function is deprecated and removed + from regular listings. + draft: + type: boolean + description: If true this function is a draft function and + it's assets are still mutable. + webscript: + $ref: '#/components/schemas/IWebscriptManifest' + description: The webscript specification as provided by the webscript.json + asset. + secret: + type: string + description: The secret for this webscript deployment. This is null + when allowHmac=false in the webscript specificaton. + required: + - createdAt + - createdBy + - deprecated + - draft + - runtime + - status + - updatedAt + - updatedBy + - updates + - webscript + IWithEmbeddedAltVersions_IWebscriptResponseWithInvokeLinkV2_: + type: object + properties: + _embedded: + $ref: '#/components/schemas/IAltEmbeddedVersion_IWebscriptResponseWithInvokeLinkV2_' + description: Embedded representations of the _latest_ draft/published versions. + IAltEmbeddedVersion_IWebscriptResponseWithInvokeLinkV2_: + type: object + properties: + draft: + $ref: '#/components/schemas/IWebscriptResponseWithInvokeLinkV2' + description: Embedded representation of the lastest draft version. + published: + $ref: '#/components/schemas/IWebscriptResponseWithInvokeLinkV2' + description: Embedded representation of the lastest published version. + description: Embedded representations of the _latest_ draft/published versions. IWebscriptVersionsResponseV2: type: object properties: @@ -7484,11 +7250,11 @@ components: prev: $ref: '#/components/schemas/EQueueEvents' description: The previous state of the job - returnValue: + returnvalue: $ref: '#/components/schemas/AnyJobResult' description: The return value of the job required: - - returnValue + - returnvalue AnyJobResult: anyOf: - $ref: '#/components/schemas/IBuildResult' @@ -7498,6 +7264,7 @@ components: - $ref: '#/components/schemas/IScaleResult' - $ref: '#/components/schemas/IBatchResult' - $ref: '#/components/schemas/ICleanupResult' + - $ref: '#/components/schemas/INotifyResult' ICleanupResult: type: object properties: @@ -7505,6 +7272,15 @@ components: $ref: '#/components/schemas/JobReference' description: The result data for a completed cleanup job. title: Cleanup + INotifyResult: + type: object + properties: + operation: + $ref: '#/components/schemas/ERequestOperation' + required: + - operation + description: The result data for a change notification. + title: Notify FailedEventSSE: type: object properties: @@ -8929,6 +8705,12 @@ paths: description: Runtime example archive type: string format: binary + application/tar: + schema: + title: Archive + description: Runtime example archive + type: string + format: binary application/tar+gzip: schema: title: Archive @@ -9011,6 +8793,12 @@ paths: description: Runtime example archive type: string format: binary + application/tar: + schema: + title: Archive + description: Runtime example archive + type: string + format: binary application/tar+gzip: schema: title: Archive @@ -9041,190 +8829,139 @@ paths: security: *id001 /registry/v2/webscripts/: post: - operationId: create_webscript_functions + operationId: create_webscripts summary: Create Webscript Version tags: - - Webscript Functions + - Webscripts description: "Creates a new webscript function by uploading its assets.\n\ - \ \n The assets for a webscript function can be provided as either\n\ - \
    \n
  • a single tar archive (optionally compressed), with\ - \ one of the content types \n application/octet-stream, application/tar+gzip,\ - \ application/x-gzip, application/x-tar, application/gzip
  • \n\ - \
  • separate files in a multipart/form-data request
  • \n\ - \
\n \n The required webscript.json json file contains\ - \ the function metadata,\n and must have a runtime attribute\ - \ that is one of the supported runtimes \n (see GET /registry/v2/runtimes?functionType=webscripts).\n\ - \n For each runtime other files will be required or supported.\n\ - \n " + \ \n The assets for a webscript function can be provided as\n \ + \
    \n
  • A single tar archive (optionally compressed), with\ + \ one of the content types \n application/octet-stream, application/tar,\ + \ application/tar+gzip, application/x-gzip, application/x-tar,\ + \ application/gzip
  • \n
  • Separate files in a multipart/form-data\ + \ request
  • \n
  • A reference to the assets of another webscript\ + \ in the copy argument
  • \n
\n\n The required webscript.json\ + \ json file contains the function metadata,\n and must have a runtime\ + \ attribute that is one of the supported runtimes \n (see GET\ + \ /registry/v2/runtimes?functionType=webscripts).\n\n For each runtime\ + \ other files will be required or supported.\n\n " requestBody: content: application/octet-stream: schema: - title: Webscript Function Assets - description: "The assets for a webscript function can be provided\ - \ as either\n
    \n
  • a single tar archive (optionally\ - \ compressed), with one of the content types \n application/octet-stream,\ - \ application/tar+gzip, application/x-gzip,\ - \ application/x-tar, application/gzip
  • \n\ - \
  • separate files in a multipart/form-data request
  • \n\ - \
\n \n The required webscript.json json file\ - \ contains the function metadata,\n and must have a runtime\ - \ attribute that is one of the supported runtimes \n (see\ - \ GET /registry/v2/runtimes?functionType=webscripts).\n\ - \n For each runtime other files will be required or supported.\n" - anyOf: - - title: Multipart file upload. - description: A multi-part upload containing one or more file assets. - type: object - properties: - filename: - type: array - items: - type: string - format: binary - - title: TAR Achive Upload - description: A single file archive containing multiple assets. + title: TAR Archive Upload + description: A single file archive containing multiple assets. + type: string + format: binary + application/tar: + schema: + title: TAR Archive Upload + description: A single file archive containing multiple assets. + type: string + format: binary application/tar+gzip: schema: - title: Webscript Function Assets - description: "The assets for a webscript function can be provided\ - \ as either\n
    \n
  • a single tar archive (optionally\ - \ compressed), with one of the content types \n application/octet-stream,\ - \ application/tar+gzip, application/x-gzip,\ - \ application/x-tar, application/gzip
  • \n\ - \
  • separate files in a multipart/form-data request
  • \n\ - \
\n \n The required webscript.json json file\ - \ contains the function metadata,\n and must have a runtime\ - \ attribute that is one of the supported runtimes \n (see\ - \ GET /registry/v2/runtimes?functionType=webscripts).\n\ - \n For each runtime other files will be required or supported.\n" - anyOf: - - title: Multipart file upload. - description: A multi-part upload containing one or more file assets. - type: object - properties: - filename: - type: array - items: - type: string - format: binary - - title: TAR Achive Upload - description: A single file archive containing multiple assets. + title: TAR Archive Upload + description: A single file archive containing multiple assets. + type: string + format: binary application/x-gzip: schema: - title: Webscript Function Assets - description: "The assets for a webscript function can be provided\ - \ as either\n
    \n
  • a single tar archive (optionally\ - \ compressed), with one of the content types \n application/octet-stream,\ - \ application/tar+gzip, application/x-gzip,\ - \ application/x-tar, application/gzip
  • \n\ - \
  • separate files in a multipart/form-data request
  • \n\ - \
\n \n The required webscript.json json file\ - \ contains the function metadata,\n and must have a runtime\ - \ attribute that is one of the supported runtimes \n (see\ - \ GET /registry/v2/runtimes?functionType=webscripts).\n\ - \n For each runtime other files will be required or supported.\n" - anyOf: - - title: Multipart file upload. - description: A multi-part upload containing one or more file assets. - type: object - properties: - filename: - type: array - items: - type: string - format: binary - - title: TAR Achive Upload - description: A single file archive containing multiple assets. + title: TAR Archive Upload + description: A single file archive containing multiple assets. + type: string + format: binary application/x-tar: schema: - title: Webscript Function Assets - description: "The assets for a webscript function can be provided\ - \ as either\n
    \n
  • a single tar archive (optionally\ - \ compressed), with one of the content types \n application/octet-stream,\ - \ application/tar+gzip, application/x-gzip,\ - \ application/x-tar, application/gzip
  • \n\ - \
  • separate files in a multipart/form-data request
  • \n\ - \
\n \n The required webscript.json json file\ - \ contains the function metadata,\n and must have a runtime\ - \ attribute that is one of the supported runtimes \n (see\ - \ GET /registry/v2/runtimes?functionType=webscripts).\n\ - \n For each runtime other files will be required or supported.\n" - anyOf: - - title: Multipart file upload. - description: A multi-part upload containing one or more file assets. - type: object - properties: - filename: - type: array - items: - type: string - format: binary - - title: TAR Achive Upload - description: A single file archive containing multiple assets. + title: TAR Archive Upload + description: A single file archive containing multiple assets. + type: string + format: binary application/gzip: schema: - title: Webscript Function Assets - description: "The assets for a webscript function can be provided\ - \ as either\n
    \n
  • a single tar archive (optionally\ - \ compressed), with one of the content types \n application/octet-stream,\ - \ application/tar+gzip, application/x-gzip,\ - \ application/x-tar, application/gzip
  • \n\ - \
  • separate files in a multipart/form-data request
  • \n\ - \
\n \n The required webscript.json json file\ - \ contains the function metadata,\n and must have a runtime\ - \ attribute that is one of the supported runtimes \n (see\ - \ GET /registry/v2/runtimes?functionType=webscripts).\n\ - \n For each runtime other files will be required or supported.\n" - anyOf: - - title: Multipart file upload. - description: A multi-part upload containing one or more file assets. - type: object - properties: - filename: - type: array - items: - type: string - format: binary - - title: TAR Achive Upload - description: A single file archive containing multiple assets. + title: TAR Archive Upload + description: A single file archive containing multiple assets. + type: string + format: binary multipart/form-data: schema: - title: Webscript Function Assets - description: "The assets for a webscript function can be provided\ - \ as either\n
    \n
  • a single tar archive (optionally\ - \ compressed), with one of the content types \n application/octet-stream,\ - \ application/tar+gzip, application/x-gzip,\ - \ application/x-tar, application/gzip
  • \n\ - \
  • separate files in a multipart/form-data request
  • \n\ - \
\n \n The required webscript.json json file\ - \ contains the function metadata,\n and must have a runtime\ - \ attribute that is one of the supported runtimes \n (see\ - \ GET /registry/v2/runtimes?functionType=webscripts).\n\ - \n For each runtime other files will be required or supported.\n" - anyOf: - - title: Multipart file upload. - description: A multi-part upload containing one or more file assets. - type: object - properties: - filename: - type: array - items: - type: string - format: binary - - title: TAR Achive Upload - description: A single file archive containing multiple assets. + title: Multipart file upload. + description: 'A multi-part upload containing one or more file assets. + + Each part should specify a filename corresponding to the asset path.' + type: object + properties: + assets: + type: array + items: + type: string + format: binary + application/json: + schema: + title: Empty Upload + description: Empty object request body, only allowed when using the + `copy` query parameter. + type: object + maxProperties: 0 + '*/*+json': + schema: + title: Empty Upload + description: Empty object request body, only allowed when using the + `copy` query parameter. + type: object + maxProperties: 0 description: "The assets for a webscript function can be provided\ - \ as either\n
    \n
  • a single tar archive (optionally compressed),\ + \ as\n
      \n
    • A single tar archive (optionally compressed),\ \ with one of the content types \n application/octet-stream,\ - \ application/tar+gzip, application/x-gzip, application/x-tar,\ - \ application/gzip
    • \n
    • separate files in a multipart/form-data\ - \ request
    • \n
    \n \n The required webscript.json\ + \ application/tar, application/tar+gzip, application/x-gzip,\ + \ application/x-tar, application/gzip
  • \n \ + \
  • Separate files in a multipart/form-data request
  • \n\ + \
  • A reference to the assets of another webscript in the\ + \ copy argument
  • \n
\n\n The required webscript.json\ \ json file contains the function metadata,\n and must have a runtime\ \ attribute that is one of the supported runtimes \n (see GET\ \ /registry/v2/runtimes?functionType=webscripts).\n\n For each runtime\ \ other files will be required or supported.\n" parameters: + - schema: + type: boolean + default: true + in: query + name: deploy + required: false + description: 'Indicates that a function should be _deployed_ when its assets + are valid. + + + * If `true` (default), jobs to build and deploy the function will be initiated + after it is checked that the assets are valid. Invalid assets lead to a + validation error, and the function and its assets are not created or updated. + + * If `false`, the uploaded assets are stored and the function is created/updated + in `registered` state. Asset validation errors are only returned as warning, + and stored as `failureReason` on the function entity. Use an _asset update_ + or _rebuild_ to initiate a build and deploy at a later stage.' + - schema: + type: string + in: query + name: author + required: false + description: Optionally changes the author metadata when updating a function. + - schema: + type: string + in: query + name: comment + required: false + description: An optional user-specified comment corresponding to the operation. + - schema: + type: boolean + default: false + in: query + name: scaleToZero + required: false + description: If set to true, after successful deployment, the + deployed function will be scaled to zero. This saves computing resources + when the function is not to be used immediately. - schema: $ref: '#/components/schemas/DeprecatePreviousPolicy' default: patch @@ -9250,15 +8987,6 @@ paths: the required job actions asynchronously and return a 202 Accepted response. If false the request will block until the job actions are completed, or a timeout occurs. - - schema: - type: boolean - default: false - in: query - name: scaleToZero - required: false - description: If set to true, after successful deployment, the - deployed function will be scaled to zero. Saves computing resources when - the function is not to be used immediately. - schema: $ref: '#/components/schemas/SemanticVersionRange' in: query @@ -9283,6 +9011,53 @@ paths: description: If set, the created function will be a draft function and its assets are still mutable. A build and deploy is initiated only in the case when all necessary assets are present and valid. + - schema: + $ref: '#/components/schemas/NamedVersionRange' + in: query + name: runtime + required: false + description: 'If set, the created function will use the indicated runtime + (latest version within specified range). + + + This takes precedence over the runtime specified in a function manifest + (copied or from request body).' + - schema: + anyOf: + - $ref: '#/components/schemas/NamedVersionRange' + - $ref: '#/components/schemas/ExampleReference' + in: query + name: copy + required: false + description: "Indicates the _source_ of initial assets for a _new function_.\n\ + \nWhen using this query parameter, the request body does not need to contain\ + \ assets, but any assets in the request body will overwrite the copied assets.\n\ + \n#### Selection of _assets_ source\n\n* If set as `[@]`,\ + \ the _new function_ will be created with copied assets of the selected\ + \ _source function_.\n* If set as `!example`, a `runtime` query parameter\ + \ is required, and the _new function_ will be initialized with assets of\ + \ the _runtime example_.\n\n#### Selection of the _source function_\n\n\ + When `` is a range (or is not given), the latest _published_\ + \ version (in that range) is used.\n\nIf no _published_ version exists,\ + \ the latest _draft_ is selected.\n\nIf no versions in the range exist,\ + \ a `404` _Not Found_ error is returned.\n\n#### The `name` of the _new\ + \ function_\n\nIf a `name` is NOT specified (either as query parameter,\ + \ or in an optional manifest asset in the request body), the `name` of the\ + \ _new function_ will be that of the _source function_.\n\n#### The `version`\ + \ of the _new function_\n\nWhen the _target_ and _source_ name are equal,\ + \ the `version` query parameters is defaulted to ``\ + \ (`~` when it's an exact version)\n\nThe version of\ + \ the _new function_ will be:\n* If a `version` is NOT specified (either\ + \ as query parameter, in an optional manifest asset, or as ``\ + \ _default_)\n\n * a **patch increment** (`..+1`)\ + \ of the latest **existing version** with the target `name`\n\n * **`1.0.0`**\ + \ otherwise\n\n* If a `version` is specified:\n\n * the **lowest version**\ + \ in that range **if no existing version** is in that range.\n\n * an **increment**\ + \ of the latest existing version, **at the highest level** (_major_,_minor_,_patch_)\ + \ allowed by that range.\n\n * otherwise, if all allowed versions already\ + \ exist, a **`409` _Duplicate_ error** is raised.\n\n#### Deployment overrides\n\ + \nThe new function will use the deployment overrides of the copied function,\ + \ unless a _manifest_ was specified in the request body." x-version: v2 responses: '201': @@ -9299,10 +9074,10 @@ paths: $ref: '#/components/schemas/IPostWebscriptJobAsyncResponseV2' security: *id001 get: - operationId: list_webscript_functions + operationId: list_webscripts summary: List Webscripts tags: - - Webscript Functions + - Webscripts description: "List the (latest) versions of available webscripts.\n\ \n### List Latest Webscript Versions\nBy default, the result includes the\ \ latest non-deprecated, non-draft version for each webscript name.\n\ @@ -9315,19 +9090,21 @@ paths: \ versions.\n
  • includeDraft=true: do not prefer non-draft\ \ versions as a latest version: if the latest version is a draft, it will\ \ be shown, even if there are older non-draft versions.
  • \n \n\n\n\ - As long as no _version filters_ are used, each listed webscript version\ - \ item will contain a HAL **link to the \nlatest** _draft_ (`entities[]._links.draft`)\ - \ or latest _published_ (`entities[]._links.publisned`) version (if existing\ - \ and different).\n\n### List Latest Webscript Versions (with filter)\nWhen\ - \ any of the _version filter_ query parameters are used, the response contains\n\ - the _latest_ version per named webscript that satisfy the filters,\ - \ but **without links**.\n\n### List All Webscript Versions\nWhen using `latest=false`\ - \ (default when using the `namedVersion` filter), the listing contains _all_\ - \ \nwebscripts versions that satisfy the query, possibly multiple\ - \ versions per named webscripts.\nNo HAL links are provided.\n\n\ - #### Filter on _status_\nBy default webscript versions with status\ - \ `undeployed` are **excluded** in all cases.\nUse the _version filter_ `status`\ - \ to include/exclude a status from the results.\nBy example, \n> `?status=any&includeDeprecated=true&includeDraft=true&latest=false`\n\ + As long as no version filters are used, each listed webscript version\ + \ contains representations of the latest draft (`entities[]._links.draft`)\ + \ \nor latest published (`entities[]._links.published`) version (if existing\ + \ and different). \nUse the query parameter `showRelated` to include only\ + \ a link (default `showRelated=link`) or a full representation (`showRelated=embed`).\n\ + \n### List Latest Webscript Versions (with filter)\nWhen any of the _version\ + \ filter_ query parameters are used, the response contains\nthe _latest_ version\ + \ per named webscript that satisfy the filters, but **without links**.\n\ + \n### List All Webscript Versions\nWhen using `latest=false` (default when\ + \ using the `namedVersion` filter), the listing contains _all_ \nwebscripts\ + \ versions that satisfy the query, possibly multiple versions per named webscripts.\n\ + No HAL links are provided.\n\n#### Filter on _status_\nBy default webscript\ + \ versions with status `undeployed` are **excluded** in all cases.\n\ + Use the _version filter_ `status` to include/exclude a status from the results.\n\ + By example, \n> `?status=any&includeDeprecated=true&includeDraft=true&latest=false`\n\ \nwill list _ALL_ versions known to the function registry.\n\n#### Version\ \ filter parameters\nThe following query parameters are _version filters_\ \ for the webscript listing:\n> `version`, `status`, `runtimeVersion`,\ @@ -9489,6 +9266,19 @@ paths: If set to `false`, multiple versions per named function can be returned. Defaults to `true`, except when specific versions are selected with the `nameVersion` filter. + - schema: + $ref: '#/components/schemas/ShowRelatedType' + in: query + name: showRelated + required: false + description: 'Sets the representation of related function versions (like the + _latest_ draft and/or published) in the response. + + - `embed`: as full summary representation (in `_embedded`). + + - `link`: as HAL link in (in `_links`). + + - `none`: omitted.' x-version: v2 responses: '200': @@ -9500,10 +9290,10 @@ paths: security: *id001 /registry/v2/webscripts/{name}/versions: get: - operationId: listVersions_webscript_functions + operationId: listVersions_webscripts summary: List Webscript Versions tags: - - Webscript Functions + - Webscripts description: List all deployed versions of a webscript. parameters: - schema: @@ -9633,10 +9423,10 @@ paths: security: *id001 /registry/v2/webscripts/{name}/versions/{version}: get: - operationId: get_webscript_functions + operationId: get_webscripts summary: Get Webscript Version tags: - - Webscript Functions + - Webscripts description: Get the webscript version. parameters: - schema: @@ -9661,10 +9451,10 @@ paths: $ref: '#/components/schemas/IGetWebscriptResponseV2' security: *id001 delete: - operationId: removeVersion_webscript_functions + operationId: removeVersion_webscripts summary: Remove Webscript Version tags: - - Webscript Functions + - Webscripts description: "Deprecate, undeploy and/or remove a webscript version.\n\ \n By default, a `DELETE` \n * _deprecates_ the webscript version(s): they\ \ are no longer included in listings by default.\n * _undeploys_ the webscript\ @@ -9761,13 +9551,21 @@ paths: security: *id001 /registry/v2/webscripts/{name}/versions/{version}/rebuild: post: - operationId: rebuild_webscript_functions + operationId: rebuild_webscripts summary: Rebuild Webscript tags: - - Webscript Functions + - Webscripts description: Rebuild and deploy a webscript with the original or updated base image. parameters: + - schema: + type: boolean + in: query + name: scaleToZero + required: false + description: Indicates whether the function needs to be scaled down after + successful verification. If not set, the function is scaled to zero only + if it was not active before this command. - schema: type: string in: query @@ -9826,14 +9624,6 @@ paths: * running jobs on entity * the `dryRun` option' - - schema: - type: boolean - in: query - name: scaleToZero - required: false - description: Indicates whether the function needs to be scaled down after - successful (re-)deployment. If not set, the function is scaled to zero only - if it was not active before this command. - schema: type: boolean in: query @@ -9870,10 +9660,10 @@ paths: security: *id001 /registry/v2/webscripts/{name}: get: - operationId: getLatest_webscript_functions + operationId: getLatest_webscripts summary: Get Latest Webscript Version tags: - - Webscript Functions + - Webscripts description: "Fetch the latest version of a webscript.\n\n By default,\ \ the result shows the latest non-deprecated, non-draft version.\n If there\ \ is no such version, the latest deprecated or the latest draft version is\ @@ -9922,10 +9712,10 @@ paths: $ref: '#/components/schemas/IGetWebscriptResponseV2' security: *id001 delete: - operationId: removeVersions_webscript_functions + operationId: removeVersions_webscripts summary: Remove Webscript tags: - - Webscript Functions + - Webscripts description: "Deprecate, undeploy and/or remove all versions of this named webscript.\n\ \n By default, a `DELETE` \n * _deprecates_ the webscript version(s): they\ \ are no longer included in listings by default.\n * _undeploys_ the webscript\ @@ -10016,10 +9806,10 @@ paths: security: *id001 /registry/v2/webscripts/{name}/versions/{version}/metadata: patch: - operationId: patchMetadata_webscript_functions + operationId: patchMetadata_webscripts summary: Patch Webscript Metadata tags: - - Webscript Functions + - Webscripts description: Patch the metadata of a webscript version. requestBody: content: @@ -10056,10 +9846,10 @@ paths: security: *id001 /registry/v2/webscripts/{name}/versions/{version}/content: get: - operationId: getArchive_webscript_functions + operationId: getArchive_webscripts summary: Get Webscript Archive tags: - - Webscript Functions + - Webscripts description: Get the specification archive of a webscript. parameters: - schema: @@ -10094,6 +9884,12 @@ paths: description: Webscript archive type: string format: binary + application/tar: + schema: + title: Archive + description: Webscript archive + type: string + format: binary application/tar+gzip: schema: title: Archive @@ -10123,17 +9919,17 @@ paths: $ref: '#/components/schemas/IContentValidationListing' security: *id001 put: - operationId: updateAssets_webscript_functions + operationId: updateAssets_webscripts summary: Update Webscript Assets tags: - - Webscript Functions + - Webscripts description: "Update a draft webscript function by updating its assets.\n\ \ \n The assets for a webscript function can be provided as either\n\ \
      \n
    • a single tar archive (optionally compressed), with\ - \ one of the content types \n application/octet-stream, application/tar+gzip,\ - \ application/x-gzip, application/x-tar, application/gzip
    • \n\ - \
    • separate files in a multipart/form-data request
    • \n\ - \
    \n\n The provided assets will be added to the webscript\ + \ one of the content types \n application/octet-stream, application/tar,\ + \ application/tar+gzip, application/x-gzip, application/x-tar,\ + \ application/gzip\n
  • separate files in a multipart/form-data\ + \ request
  • \n \n\n The provided assets will be added to the webscript\ \ function's collection of existing assets,\n replacing any existing assets\ \ with the same name.\n\n Please note that it is not allowed to update the\ \ webscript.json json file with a changed value for any of the\n \ @@ -10143,190 +9939,113 @@ paths: content: application/octet-stream: schema: - title: Webscript Function Assets - description: "The assets for a webscript function can be provided\ - \ as either\n
      \n
    • a single tar archive (optionally\ - \ compressed), with one of the content types \n application/octet-stream,\ - \ application/tar+gzip, application/x-gzip,\ - \ application/x-tar, application/gzip
    • \n\ - \
    • separate files in a multipart/form-data request
    • \n\ - \
    \n\n The provided assets will be added to the webscript\ - \ function's collection of existing assets,\n replacing any existing\ - \ assets with the same name.\n\n Please note that it is not allowed\ - \ to update the webscript.json json file with a changed value\ - \ for any of the\n name, version and/or\ - \ runtime attributes.\n\n For each runtime\ - \ other files are supported.\n" - anyOf: - - title: Multipart file upload. - description: A multi-part upload containing one or more file assets. - type: object - properties: - filename: - type: array - items: - type: string - format: binary - - title: TAR Achive Upload - description: A single file archive containing multiple assets. + title: TAR Archive Upload + description: A single file archive containing multiple assets. + type: string + format: binary + application/tar: + schema: + title: TAR Archive Upload + description: A single file archive containing multiple assets. + type: string + format: binary application/tar+gzip: schema: - title: Webscript Function Assets - description: "The assets for a webscript function can be provided\ - \ as either\n
      \n
    • a single tar archive (optionally\ - \ compressed), with one of the content types \n application/octet-stream,\ - \ application/tar+gzip, application/x-gzip,\ - \ application/x-tar, application/gzip
    • \n\ - \
    • separate files in a multipart/form-data request
    • \n\ - \
    \n\n The provided assets will be added to the webscript\ - \ function's collection of existing assets,\n replacing any existing\ - \ assets with the same name.\n\n Please note that it is not allowed\ - \ to update the webscript.json json file with a changed value\ - \ for any of the\n name, version and/or\ - \ runtime attributes.\n\n For each runtime\ - \ other files are supported.\n" - anyOf: - - title: Multipart file upload. - description: A multi-part upload containing one or more file assets. - type: object - properties: - filename: - type: array - items: - type: string - format: binary - - title: TAR Achive Upload - description: A single file archive containing multiple assets. + title: TAR Archive Upload + description: A single file archive containing multiple assets. + type: string + format: binary application/x-gzip: schema: - title: Webscript Function Assets - description: "The assets for a webscript function can be provided\ - \ as either\n
      \n
    • a single tar archive (optionally\ - \ compressed), with one of the content types \n application/octet-stream,\ - \ application/tar+gzip, application/x-gzip,\ - \ application/x-tar, application/gzip
    • \n\ - \
    • separate files in a multipart/form-data request
    • \n\ - \
    \n\n The provided assets will be added to the webscript\ - \ function's collection of existing assets,\n replacing any existing\ - \ assets with the same name.\n\n Please note that it is not allowed\ - \ to update the webscript.json json file with a changed value\ - \ for any of the\n name, version and/or\ - \ runtime attributes.\n\n For each runtime\ - \ other files are supported.\n" - anyOf: - - title: Multipart file upload. - description: A multi-part upload containing one or more file assets. - type: object - properties: - filename: - type: array - items: - type: string - format: binary - - title: TAR Achive Upload - description: A single file archive containing multiple assets. + title: TAR Archive Upload + description: A single file archive containing multiple assets. + type: string + format: binary application/x-tar: schema: - title: Webscript Function Assets - description: "The assets for a webscript function can be provided\ - \ as either\n
      \n
    • a single tar archive (optionally\ - \ compressed), with one of the content types \n application/octet-stream,\ - \ application/tar+gzip, application/x-gzip,\ - \ application/x-tar, application/gzip
    • \n\ - \
    • separate files in a multipart/form-data request
    • \n\ - \
    \n\n The provided assets will be added to the webscript\ - \ function's collection of existing assets,\n replacing any existing\ - \ assets with the same name.\n\n Please note that it is not allowed\ - \ to update the webscript.json json file with a changed value\ - \ for any of the\n name, version and/or\ - \ runtime attributes.\n\n For each runtime\ - \ other files are supported.\n" - anyOf: - - title: Multipart file upload. - description: A multi-part upload containing one or more file assets. - type: object - properties: - filename: - type: array - items: - type: string - format: binary - - title: TAR Achive Upload - description: A single file archive containing multiple assets. + title: TAR Archive Upload + description: A single file archive containing multiple assets. + type: string + format: binary application/gzip: schema: - title: Webscript Function Assets - description: "The assets for a webscript function can be provided\ - \ as either\n
      \n
    • a single tar archive (optionally\ - \ compressed), with one of the content types \n application/octet-stream,\ - \ application/tar+gzip, application/x-gzip,\ - \ application/x-tar, application/gzip
    • \n\ - \
    • separate files in a multipart/form-data request
    • \n\ - \
    \n\n The provided assets will be added to the webscript\ - \ function's collection of existing assets,\n replacing any existing\ - \ assets with the same name.\n\n Please note that it is not allowed\ - \ to update the webscript.json json file with a changed value\ - \ for any of the\n name, version and/or\ - \ runtime attributes.\n\n For each runtime\ - \ other files are supported.\n" - anyOf: - - title: Multipart file upload. - description: A multi-part upload containing one or more file assets. - type: object - properties: - filename: - type: array - items: - type: string - format: binary - - title: TAR Achive Upload - description: A single file archive containing multiple assets. + title: TAR Archive Upload + description: A single file archive containing multiple assets. + type: string + format: binary multipart/form-data: schema: - title: Webscript Function Assets - description: "The assets for a webscript function can be provided\ - \ as either\n
      \n
    • a single tar archive (optionally\ - \ compressed), with one of the content types \n application/octet-stream,\ - \ application/tar+gzip, application/x-gzip,\ - \ application/x-tar, application/gzip
    • \n\ - \
    • separate files in a multipart/form-data request
    • \n\ - \
    \n\n The provided assets will be added to the webscript\ - \ function's collection of existing assets,\n replacing any existing\ - \ assets with the same name.\n\n Please note that it is not allowed\ - \ to update the webscript.json json file with a changed value\ - \ for any of the\n name, version and/or\ - \ runtime attributes.\n\n For each runtime\ - \ other files are supported.\n" - anyOf: - - title: Multipart file upload. - description: A multi-part upload containing one or more file assets. - type: object - properties: - filename: - type: array - items: - type: string - format: binary - - title: TAR Achive Upload - description: A single file archive containing multiple assets. + title: Multipart file upload. + description: 'A multi-part upload containing one or more file assets. + + Each part should specify a filename corresponding to the asset path.' + type: object + properties: + assets: + type: array + items: + type: string + format: binary description: "The assets for a webscript function can be provided\ \ as either\n
      \n
    • a single tar archive (optionally compressed),\ \ with one of the content types \n application/octet-stream,\ - \ application/tar+gzip, application/x-gzip, application/x-tar,\ - \ application/gzip
    • \n
    • separate files in a multipart/form-data\ - \ request
    • \n
    \n\n The provided assets will be added to the webscript\ + \ application/tar, application/tar+gzip, application/x-gzip,\ + \ application/x-tar, application/gzip\n \ + \
  • separate files in a multipart/form-data request
  • \n\ + \ \n\n The provided assets will be added to the webscript\ \ function's collection of existing assets,\n replacing any existing assets\ \ with the same name.\n\n Please note that it is not allowed to update\ \ the webscript.json json file with a changed value for any of the\n\ \ name, version and/or runtime\ \ attributes.\n\n For each runtime other files are supported.\n" parameters: + - schema: + type: boolean + default: false + in: query + name: scaleToZero + required: false + description: If set to true, after successful deployment, the + deployed function will be scaled to zero. This saves computing resources + when the function is not to be used immediately. + - schema: + type: boolean + default: true + in: query + name: deploy + required: false + description: 'Indicates that a function should be _deployed_ when its assets + are valid. + + + * If `true` (default), jobs to build and deploy the function will be initiated + after it is checked that the assets are valid. Invalid assets lead to a + validation error, and the function and its assets are not created or updated. + + * If `false`, the uploaded assets are stored and the function is created/updated + in `registered` state. Asset validation errors are only returned as warning, + and stored as `failureReason` on the function entity. Use an _asset update_ + or _rebuild_ to initiate a build and deploy at a later stage.' + - schema: + type: boolean + default: false + in: query + name: chown + required: false + description: If set, ownership of the draft function is transferred to the + current user. - schema: type: string in: query name: comment required: false description: An optional user-specified comment corresponding to the operation. + - schema: + type: string + in: query + name: author + required: false + description: Optionally changes the author metadata when updating a function. - schema: type: boolean default: true @@ -10337,14 +10056,6 @@ paths: the required job actions asynchronously and return a 202 Accepted response. If false the request will block until the job actions are completed, or a timeout occurs. - - schema: - type: boolean - default: false - in: query - name: chown - required: true - description: If set, ownership of the draft function is transferred to the - current user. - schema: type: string in: path @@ -10371,13 +10082,19 @@ paths: application/json: schema: $ref: '#/components/schemas/IPostWebscriptJobAsyncResponseV2' + '403': + description: Default Response + content: + application/json: + schema: + $ref: '#/components/schemas/IRegistryErrorResponse' security: *id001 /registry/v2/webscripts/{name}/versions/{version}/content/{*}: get: - operationId: getAsset_webscript_functions + operationId: getAsset_webscripts summary: Get File From Webscript Archive tags: - - Webscript Functions + - Webscripts description: Get a file from the specification archive of a webscript. parameters: - schema: @@ -10418,6 +10135,12 @@ paths: description: Webscript archive type: string format: binary + application/tar: + schema: + title: Archive + description: Webscript archive + type: string + format: binary application/tar+gzip: schema: title: Archive @@ -10447,10 +10170,10 @@ paths: $ref: '#/components/schemas/IContentValidationListing' security: *id001 put: - operationId: updateAsset_webscript_functions + operationId: updateAsset_webscripts summary: Update Webscript Asset tags: - - Webscript Functions + - Webscripts description: "The provided asset will be added to the webscript function's\ \ collection of existing assets,\n replacing any existing asset with the\ \ same name.\n\n Please note that it is not allowed to update the webscript.json\ @@ -10459,7 +10182,7 @@ paths: \ files are supported.\n " requestBody: content: - application/octet-stream: + '*/*': schema: title: File Upload description: A single asset file. @@ -10470,12 +10193,53 @@ paths: format: binary description: A single asset file. parameters: + - schema: + type: boolean + default: false + in: query + name: scaleToZero + required: false + description: If set to true, after successful deployment, the + deployed function will be scaled to zero. This saves computing resources + when the function is not to be used immediately. + - schema: + type: boolean + default: true + in: query + name: deploy + required: false + description: 'Indicates that a function should be _deployed_ when its assets + are valid. + + + * If `true` (default), jobs to build and deploy the function will be initiated + after it is checked that the assets are valid. Invalid assets lead to a + validation error, and the function and its assets are not created or updated. + + * If `false`, the uploaded assets are stored and the function is created/updated + in `registered` state. Asset validation errors are only returned as warning, + and stored as `failureReason` on the function entity. Use an _asset update_ + or _rebuild_ to initiate a build and deploy at a later stage.' + - schema: + type: boolean + default: false + in: query + name: chown + required: false + description: If set, ownership of the draft function is transferred to the + current user. - schema: type: string in: query name: comment required: false description: An optional user-specified comment corresponding to the operation. + - schema: + type: string + in: query + name: author + required: false + description: Optionally changes the author metadata when updating a function. - schema: type: boolean default: true @@ -10486,14 +10250,6 @@ paths: the required job actions asynchronously and return a 202 Accepted response. If false the request will block until the job actions are completed, or a timeout occurs. - - schema: - type: boolean - default: false - in: query - name: chown - required: true - description: If set, ownership of the draft function is transferred to the - current user. - schema: type: string in: path @@ -10526,20 +10282,67 @@ paths: application/json: schema: $ref: '#/components/schemas/IPostWebscriptJobAsyncResponseV2' + '403': + description: Default Response + content: + application/json: + schema: + $ref: '#/components/schemas/IRegistryErrorResponse' security: *id001 delete: - operationId: deleteAsset_webscript_functions + operationId: deleteAsset_webscripts summary: Delete Webscript Asset tags: - - Webscript Functions + - Webscripts description: Delete an asset from the webscript's collection of existing assets. parameters: + - schema: + type: boolean + default: false + in: query + name: scaleToZero + required: false + description: If set to true, after successful deployment, the + deployed function will be scaled to zero. This saves computing resources + when the function is not to be used immediately. + - schema: + type: boolean + default: true + in: query + name: deploy + required: false + description: 'Indicates that a function should be _deployed_ when its assets + are valid. + + + * If `true` (default), jobs to build and deploy the function will be initiated + after it is checked that the assets are valid. Invalid assets lead to a + validation error, and the function and its assets are not created or updated. + + * If `false`, the uploaded assets are stored and the function is created/updated + in `registered` state. Asset validation errors are only returned as warning, + and stored as `failureReason` on the function entity. Use an _asset update_ + or _rebuild_ to initiate a build and deploy at a later stage.' + - schema: + type: boolean + default: false + in: query + name: chown + required: false + description: If set, ownership of the draft function is transferred to the + current user. - schema: type: string in: query name: comment required: false description: An optional user-specified comment corresponding to the operation. + - schema: + type: string + in: query + name: author + required: false + description: Optionally changes the author metadata when updating a function. - schema: type: boolean default: true @@ -10550,14 +10353,6 @@ paths: the required job actions asynchronously and return a 202 Accepted response. If false the request will block until the job actions are completed, or a timeout occurs. - - schema: - type: boolean - default: false - in: query - name: chown - required: true - description: If set, ownership of the draft function is transferred to the - current user. - schema: type: string in: path @@ -10590,13 +10385,19 @@ paths: application/json: schema: $ref: '#/components/schemas/IPostWebscriptJobAsyncResponseV2' + '403': + description: Default Response + content: + application/json: + schema: + $ref: '#/components/schemas/IRegistryErrorResponse' security: *id001 /registry/v2/webscripts/{name}/versions/{version}/publish: post: - operationId: publish_webscript_functions + operationId: publish_webscripts summary: Publish Draft Webscript tags: - - Webscript Functions + - Webscripts description: "Mark the webscript to be ready and stable, taking it\ \ out of draft mode.,\n\n Typically, the webscript should be in\ \ the running status, \n such that publishing becomes a simple\ @@ -10604,12 +10405,26 @@ paths: \ plug-registry may need to initiate a new build and deployment procedure.\n\ \ " parameters: + - schema: + type: boolean + default: false + in: query + name: chown + required: false + description: If set, ownership of the draft function is transferred to the + current user. - schema: type: string in: query name: comment required: false description: An optional user-specified comment corresponding to the operation. + - schema: + type: string + in: query + name: author + required: false + description: Optionally changes the author metadata when updating a function. - schema: $ref: '#/components/schemas/DeprecatePreviousPolicy' default: patch @@ -10659,10 +10474,10 @@ paths: security: *id001 /registry/v2/webscripts/{name}/versions/{version}/jobs: get: - operationId: jobs_webscript_functions + operationId: jobs_webscripts summary: List Webscript Jobs tags: - - Webscript Functions + - Webscripts description: List the ongoing and completed operations on a specific webscript. parameters: - schema: @@ -10732,18 +10547,20 @@ paths: security: *id001 /registry/v2/webscripts/{name}/versions/{version}/verify: post: - operationId: verify_webscript_functions + operationId: verify_webscripts summary: Verify Health Of Webscript tags: - - Webscript Functions + - Webscripts description: Verify health of webscript deployed on openfaas. parameters: - schema: - type: string + type: boolean in: query - name: comment + name: scaleToZero required: false - description: An optional user-specified comment corresponding to the operation. + description: Indicates whether the function needs to be scaled down after + successful verification. If not set, the function is scaled to zero only + if it was not active before this command. - schema: type: boolean default: true @@ -10754,14 +10571,6 @@ paths: the required job actions asynchronously and return a 202 Accepted response. If false the request will block until the job actions are completed, or a timeout occurs. - - schema: - type: boolean - in: query - name: scaleToZero - required: false - description: Indicates whether the function needs to be scaled down after - successful verification. If not set, the function is scaled to zero only - if it was not active before this command. - schema: type: string in: path @@ -10847,190 +10656,139 @@ paths: security: *id001 /registry/v2/plugs/: post: - operationId: create_plug_functions + operationId: create_plugs summary: Create Plug tags: - - Plug Functions + - Plugs description: "Creates a new plug function by uploading its assets.\n\ - \ \n The assets for a plug function can be provided as either\n\ - \
      \n
    • a single tar archive (optionally compressed), with\ - \ one of the content types \n application/octet-stream, application/tar+gzip,\ - \ application/x-gzip, application/x-tar, application/gzip
    • \n\ - \
    • separate files in a multipart/form-data request
    • \n\ - \
    \n \n The required plug.json json file contains the\ - \ function metadata,\n and must have a runtime attribute that\ - \ is one of the supported runtimes \n (see GET /registry/v2/runtimes?functionType=plugs).\n\ - \n For each runtime other files will be required or supported.\n\ - \n " + \ \n The assets for a plug function can be provided as\n
      \n\ + \
    • A single tar archive (optionally compressed), with one of\ + \ the content types \n application/octet-stream, application/tar,\ + \ application/tar+gzip, application/x-gzip, application/x-tar,\ + \ application/gzip
    • \n
    • Separate files in a multipart/form-data\ + \ request
    • \n
    • A reference to the assets of another plug\ + \ in the copy argument
    • \n
    \n\n The required plug.json\ + \ json file contains the function metadata,\n and must have a runtime\ + \ attribute that is one of the supported runtimes \n (see GET\ + \ /registry/v2/runtimes?functionType=plugs).\n\n For each runtime\ + \ other files will be required or supported.\n\n " requestBody: content: application/octet-stream: schema: - title: Plug Function Assets - description: "The assets for a plug function can be provided\ - \ as either\n
      \n
    • a single tar archive (optionally\ - \ compressed), with one of the content types \n application/octet-stream,\ - \ application/tar+gzip, application/x-gzip,\ - \ application/x-tar, application/gzip
    • \n\ - \
    • separate files in a multipart/form-data request
    • \n\ - \
    \n \n The required plug.json json file contains\ - \ the function metadata,\n and must have a runtime attribute\ - \ that is one of the supported runtimes \n (see GET\ - \ /registry/v2/runtimes?functionType=plugs).\n\n For each\ - \ runtime other files will be required or supported.\n" - anyOf: - - title: Multipart file upload. - description: A multi-part upload containing one or more file assets. - type: object - properties: - filename: - type: array - items: - type: string - format: binary - - title: TAR Achive Upload - description: A single file archive containing multiple assets. + title: TAR Archive Upload + description: A single file archive containing multiple assets. + type: string + format: binary + application/tar: + schema: + title: TAR Archive Upload + description: A single file archive containing multiple assets. + type: string + format: binary application/tar+gzip: schema: - title: Plug Function Assets - description: "The assets for a plug function can be provided\ - \ as either\n
      \n
    • a single tar archive (optionally\ - \ compressed), with one of the content types \n application/octet-stream,\ - \ application/tar+gzip, application/x-gzip,\ - \ application/x-tar, application/gzip
    • \n\ - \
    • separate files in a multipart/form-data request
    • \n\ - \
    \n \n The required plug.json json file contains\ - \ the function metadata,\n and must have a runtime attribute\ - \ that is one of the supported runtimes \n (see GET\ - \ /registry/v2/runtimes?functionType=plugs).\n\n For each\ - \ runtime other files will be required or supported.\n" - anyOf: - - title: Multipart file upload. - description: A multi-part upload containing one or more file assets. - type: object - properties: - filename: - type: array - items: - type: string - format: binary - - title: TAR Achive Upload - description: A single file archive containing multiple assets. + title: TAR Archive Upload + description: A single file archive containing multiple assets. + type: string + format: binary application/x-gzip: schema: - title: Plug Function Assets - description: "The assets for a plug function can be provided\ - \ as either\n
      \n
    • a single tar archive (optionally\ - \ compressed), with one of the content types \n application/octet-stream,\ - \ application/tar+gzip, application/x-gzip,\ - \ application/x-tar, application/gzip
    • \n\ - \
    • separate files in a multipart/form-data request
    • \n\ - \
    \n \n The required plug.json json file contains\ - \ the function metadata,\n and must have a runtime attribute\ - \ that is one of the supported runtimes \n (see GET\ - \ /registry/v2/runtimes?functionType=plugs).\n\n For each\ - \ runtime other files will be required or supported.\n" - anyOf: - - title: Multipart file upload. - description: A multi-part upload containing one or more file assets. - type: object - properties: - filename: - type: array - items: - type: string - format: binary - - title: TAR Achive Upload - description: A single file archive containing multiple assets. + title: TAR Archive Upload + description: A single file archive containing multiple assets. + type: string + format: binary application/x-tar: schema: - title: Plug Function Assets - description: "The assets for a plug function can be provided\ - \ as either\n
      \n
    • a single tar archive (optionally\ - \ compressed), with one of the content types \n application/octet-stream,\ - \ application/tar+gzip, application/x-gzip,\ - \ application/x-tar, application/gzip
    • \n\ - \
    • separate files in a multipart/form-data request
    • \n\ - \
    \n \n The required plug.json json file contains\ - \ the function metadata,\n and must have a runtime attribute\ - \ that is one of the supported runtimes \n (see GET\ - \ /registry/v2/runtimes?functionType=plugs).\n\n For each\ - \ runtime other files will be required or supported.\n" - anyOf: - - title: Multipart file upload. - description: A multi-part upload containing one or more file assets. - type: object - properties: - filename: - type: array - items: - type: string - format: binary - - title: TAR Achive Upload - description: A single file archive containing multiple assets. + title: TAR Archive Upload + description: A single file archive containing multiple assets. + type: string + format: binary application/gzip: schema: - title: Plug Function Assets - description: "The assets for a plug function can be provided\ - \ as either\n
      \n
    • a single tar archive (optionally\ - \ compressed), with one of the content types \n application/octet-stream,\ - \ application/tar+gzip, application/x-gzip,\ - \ application/x-tar, application/gzip
    • \n\ - \
    • separate files in a multipart/form-data request
    • \n\ - \
    \n \n The required plug.json json file contains\ - \ the function metadata,\n and must have a runtime attribute\ - \ that is one of the supported runtimes \n (see GET\ - \ /registry/v2/runtimes?functionType=plugs).\n\n For each\ - \ runtime other files will be required or supported.\n" - anyOf: - - title: Multipart file upload. - description: A multi-part upload containing one or more file assets. - type: object - properties: - filename: - type: array - items: - type: string - format: binary - - title: TAR Achive Upload - description: A single file archive containing multiple assets. + title: TAR Archive Upload + description: A single file archive containing multiple assets. + type: string + format: binary multipart/form-data: schema: - title: Plug Function Assets - description: "The assets for a plug function can be provided\ - \ as either\n
      \n
    • a single tar archive (optionally\ - \ compressed), with one of the content types \n application/octet-stream,\ - \ application/tar+gzip, application/x-gzip,\ - \ application/x-tar, application/gzip
    • \n\ - \
    • separate files in a multipart/form-data request
    • \n\ - \
    \n \n The required plug.json json file contains\ - \ the function metadata,\n and must have a runtime attribute\ - \ that is one of the supported runtimes \n (see GET\ - \ /registry/v2/runtimes?functionType=plugs).\n\n For each\ - \ runtime other files will be required or supported.\n" - anyOf: - - title: Multipart file upload. - description: A multi-part upload containing one or more file assets. - type: object - properties: - filename: - type: array - items: - type: string - format: binary - - title: TAR Achive Upload - description: A single file archive containing multiple assets. - description: "The assets for a plug function can be provided as either\n\ - \
      \n
    • a single tar archive (optionally compressed),\ + title: Multipart file upload. + description: 'A multi-part upload containing one or more file assets. + + Each part should specify a filename corresponding to the asset path.' + type: object + properties: + assets: + type: array + items: + type: string + format: binary + application/json: + schema: + title: Empty Upload + description: Empty object request body, only allowed when using the + `copy` query parameter. + type: object + maxProperties: 0 + '*/*+json': + schema: + title: Empty Upload + description: Empty object request body, only allowed when using the + `copy` query parameter. + type: object + maxProperties: 0 + description: "The assets for a plug function can be provided as\n\ + \
        \n
      • A single tar archive (optionally compressed),\ \ with one of the content types \n application/octet-stream,\ - \ application/tar+gzip, application/x-gzip, application/x-tar,\ - \ application/gzip
      • \n
      • separate files in a multipart/form-data\ - \ request
      • \n
      \n \n The required plug.json json\ - \ file contains the function metadata,\n and must have a runtime\ + \ application/tar, application/tar+gzip, application/x-gzip,\ + \ application/x-tar, application/gzip
    • \n \ + \
    • Separate files in a multipart/form-data request
    • \n\ + \
    • A reference to the assets of another plug in the copy\ + \ argument
    • \n
    \n\n The required plug.json json file\ + \ contains the function metadata,\n and must have a runtime\ \ attribute that is one of the supported runtimes \n (see GET\ \ /registry/v2/runtimes?functionType=plugs).\n\n For each runtime\ \ other files will be required or supported.\n" parameters: + - schema: + type: boolean + default: true + in: query + name: deploy + required: false + description: 'Indicates that a function should be _deployed_ when its assets + are valid. + + + * If `true` (default), jobs to build and deploy the function will be initiated + after it is checked that the assets are valid. Invalid assets lead to a + validation error, and the function and its assets are not created or updated. + + * If `false`, the uploaded assets are stored and the function is created/updated + in `registered` state. Asset validation errors are only returned as warning, + and stored as `failureReason` on the function entity. Use an _asset update_ + or _rebuild_ to initiate a build and deploy at a later stage.' + - schema: + type: string + in: query + name: author + required: false + description: Optionally changes the author metadata when updating a function. + - schema: + type: string + in: query + name: comment + required: false + description: An optional user-specified comment corresponding to the operation. + - schema: + type: boolean + default: false + in: query + name: scaleToZero + required: false + description: If set to true, after successful deployment, the + deployed function will be scaled to zero. This saves computing resources + when the function is not to be used immediately. - schema: $ref: '#/components/schemas/DeprecatePreviousPolicy' default: none @@ -11056,15 +10814,6 @@ paths: the required job actions asynchronously and return a 202 Accepted response. If false the request will block until the job actions are completed, or a timeout occurs. - - schema: - type: boolean - default: false - in: query - name: scaleToZero - required: false - description: If set to true, after successful deployment, the - deployed function will be scaled to zero. Saves computing resources when - the function is not to be used immediately. - schema: $ref: '#/components/schemas/SemanticVersionRange' in: query @@ -11089,6 +10838,53 @@ paths: description: If set, the created function will be a draft function and its assets are still mutable. A build and deploy is initiated only in the case when all necessary assets are present and valid. + - schema: + $ref: '#/components/schemas/NamedVersionRange' + in: query + name: runtime + required: false + description: 'If set, the created function will use the indicated runtime + (latest version within specified range). + + + This takes precedence over the runtime specified in a function manifest + (copied or from request body).' + - schema: + anyOf: + - $ref: '#/components/schemas/NamedVersionRange' + - $ref: '#/components/schemas/ExampleReference' + in: query + name: copy + required: false + description: "Indicates the _source_ of initial assets for a _new function_.\n\ + \nWhen using this query parameter, the request body does not need to contain\ + \ assets, but any assets in the request body will overwrite the copied assets.\n\ + \n#### Selection of _assets_ source\n\n* If set as `[@]`,\ + \ the _new function_ will be created with copied assets of the selected\ + \ _source function_.\n* If set as `!example`, a `runtime` query parameter\ + \ is required, and the _new function_ will be initialized with assets of\ + \ the _runtime example_.\n\n#### Selection of the _source function_\n\n\ + When `` is a range (or is not given), the latest _published_\ + \ version (in that range) is used.\n\nIf no _published_ version exists,\ + \ the latest _draft_ is selected.\n\nIf no versions in the range exist,\ + \ a `404` _Not Found_ error is returned.\n\n#### The `name` of the _new\ + \ function_\n\nIf a `name` is NOT specified (either as query parameter,\ + \ or in an optional manifest asset in the request body), the `name` of the\ + \ _new function_ will be that of the _source function_.\n\n#### The `version`\ + \ of the _new function_\n\nWhen the _target_ and _source_ name are equal,\ + \ the `version` query parameters is defaulted to ``\ + \ (`~` when it's an exact version)\n\nThe version of\ + \ the _new function_ will be:\n* If a `version` is NOT specified (either\ + \ as query parameter, in an optional manifest asset, or as ``\ + \ _default_)\n\n * a **patch increment** (`..+1`)\ + \ of the latest **existing version** with the target `name`\n\n * **`1.0.0`**\ + \ otherwise\n\n* If a `version` is specified:\n\n * the **lowest version**\ + \ in that range **if no existing version** is in that range.\n\n * an **increment**\ + \ of the latest existing version, **at the highest level** (_major_,_minor_,_patch_)\ + \ allowed by that range.\n\n * otherwise, if all allowed versions already\ + \ exist, a **`409` _Duplicate_ error** is raised.\n\n#### Deployment overrides\n\ + \nThe new function will use the deployment overrides of the copied function,\ + \ unless a _manifest_ was specified in the request body." x-version: v2 responses: '201': @@ -11105,10 +10901,10 @@ paths: $ref: '#/components/schemas/IPostPlugJobAsyncResponseV2' security: *id001 get: - operationId: list_plug_functions + operationId: list_plugs summary: List Plugs tags: - - Plug Functions + - Plugs description: "List the (latest) versions of available plugs.\n\n###\ \ List Latest Plug Versions\nBy default, the result includes the latest non-deprecated,\ \ non-draft version for each plug name.\nIf there is no such version,\ @@ -11120,19 +10916,21 @@ paths: \ versions.\n
  • includeDraft=true: do not prefer non-draft\ \ versions as a latest version: if the latest version is a draft, it will\ \ be shown, even if there are older non-draft versions.
  • \n \n\n\n\ - As long as no _version filters_ are used, each listed plug version\ - \ item will contain a HAL **link to the \nlatest** _draft_ (`entities[]._links.draft`)\ - \ or latest _published_ (`entities[]._links.publisned`) version (if existing\ - \ and different).\n\n### List Latest Plug Versions (with filter)\nWhen any\ - \ of the _version filter_ query parameters are used, the response contains\n\ - the _latest_ version per named plug that satisfy the filters, but\ - \ **without links**.\n\n### List All Plug Versions\nWhen using `latest=false`\ - \ (default when using the `namedVersion` filter), the listing contains _all_\ - \ \nplugs versions that satisfy the query, possibly multiple versions\ - \ per named plugs.\nNo HAL links are provided.\n\n#### Filter on\ - \ _status_\nBy default plug versions with status `undeployed` are\ - \ **excluded** in all cases.\nUse the _version filter_ `status` to include/exclude\ - \ a status from the results.\nBy example, \n> `?status=any&includeDeprecated=true&includeDraft=true&latest=false`\n\ + As long as no version filters are used, each listed plug version\ + \ contains representations of the latest draft (`entities[]._links.draft`)\ + \ \nor latest published (`entities[]._links.published`) version (if existing\ + \ and different). \nUse the query parameter `showRelated` to include only\ + \ a link (default `showRelated=link`) or a full representation (`showRelated=embed`).\n\ + \n### List Latest Plug Versions (with filter)\nWhen any of the _version filter_\ + \ query parameters are used, the response contains\nthe _latest_ version per\ + \ named plug that satisfy the filters, but **without links**.\n\n\ + ### List All Plug Versions\nWhen using `latest=false` (default when using\ + \ the `namedVersion` filter), the listing contains _all_ \nplugs\ + \ versions that satisfy the query, possibly multiple versions per named plugs.\n\ + No HAL links are provided.\n\n#### Filter on _status_\nBy default plug\ + \ versions with status `undeployed` are **excluded** in all cases.\n\ + Use the _version filter_ `status` to include/exclude a status from the results.\n\ + By example, \n> `?status=any&includeDeprecated=true&includeDraft=true&latest=false`\n\ \nwill list _ALL_ versions known to the function registry.\n\n#### Version\ \ filter parameters\nThe following query parameters are _version filters_\ \ for the plug listing:\n> `version`, `status`, `runtimeVersion`,\ @@ -11308,6 +11106,19 @@ paths: If set to `false`, multiple versions per named function can be returned. Defaults to `true`, except when specific versions are selected with the `nameVersion` filter. + - schema: + $ref: '#/components/schemas/ShowRelatedType' + in: query + name: showRelated + required: false + description: 'Sets the representation of related function versions (like the + _latest_ draft and/or published) in the response. + + - `embed`: as full summary representation (in `_embedded`). + + - `link`: as HAL link in (in `_links`). + + - `none`: omitted.' x-version: v2 responses: '200': @@ -11319,10 +11130,10 @@ paths: security: *id001 /registry/v2/plugs/{name}: get: - operationId: getLatest_plug_functions + operationId: getLatest_plugs summary: Get Latest Plug Version tags: - - Plug Functions + - Plugs description: "Fetch the latest version of a plug.\n\n By default,\ \ the result shows the latest non-deprecated, non-draft version.\n If there\ \ is no such version, the latest deprecated or the latest draft version is\ @@ -11380,10 +11191,10 @@ paths: $ref: '#/components/schemas/PlugHtmlResponse' security: *id001 delete: - operationId: removeVersions_plug_functions + operationId: removeVersions_plugs summary: Remove Plug tags: - - Plug Functions + - Plugs description: "Deprecate, undeploy and/or remove all versions of this named plug.\n\ \nBy default, a `DELETE` \n* marks _published_ version(s) _deprecated_: they\ \ remain active, but are no longer included in listings by default.\n* completely\ @@ -11472,10 +11283,10 @@ paths: security: *id001 /registry/v2/plugs/{name}/versions: get: - operationId: listVersions_plug_functions + operationId: listVersions_plugs summary: List Plug Versions tags: - - Plug Functions + - Plugs description: List all versions of a plug, including deprecated versions or not. parameters: - schema: @@ -11613,10 +11424,10 @@ paths: security: *id001 /registry/v2/plugs/{name}/versions/{version}: get: - operationId: get_plug_functions + operationId: get_plugs summary: Get Plug Version tags: - - Plug Functions + - Plugs description: Get a specific version of a plug. parameters: - schema: @@ -11644,10 +11455,10 @@ paths: $ref: '#/components/schemas/PlugHtmlResponse' security: *id001 delete: - operationId: removeVersion_plug_functions + operationId: removeVersion_plugs summary: Remove Plug Version tags: - - Plug Functions + - Plugs description: "Deprecate, undeploy and/or remove a plug version.\n\n\ By default, a `DELETE` \n* marks _published_ version(s) _deprecated_: they\ \ remain active, but are no longer included in listings by default.\n* completely\ @@ -11742,12 +11553,20 @@ paths: security: *id001 /registry/v2/plugs/{name}/versions/{version}/rebuild: post: - operationId: rebuild_plug_functions + operationId: rebuild_plugs summary: Rebuild Plug tags: - - Plug Functions + - Plugs description: Rebuild and deploy a plug with the original or updated base image. parameters: + - schema: + type: boolean + in: query + name: scaleToZero + required: false + description: Indicates whether the function needs to be scaled down after + successful verification. If not set, the function is scaled to zero only + if it was not active before this command. - schema: type: string in: query @@ -11806,14 +11625,6 @@ paths: * running jobs on entity * the `dryRun` option' - - schema: - type: boolean - in: query - name: scaleToZero - required: false - description: Indicates whether the function needs to be scaled down after - successful (re-)deployment. If not set, the function is scaled to zero only - if it was not active before this command. - schema: type: boolean in: query @@ -11850,10 +11661,10 @@ paths: security: *id001 /registry/v2/plugs/{name}/versions/{version}/content: get: - operationId: getArchive_plug_functions + operationId: getArchive_plugs summary: Get Plug Archive tags: - - Plug Functions + - Plugs description: Get the specification archive of a plug. parameters: - schema: @@ -11888,6 +11699,12 @@ paths: description: Plug archive type: string format: binary + application/tar: + schema: + title: Archive + description: Plug archive + type: string + format: binary application/tar+gzip: schema: title: Archive @@ -11917,204 +11734,133 @@ paths: $ref: '#/components/schemas/IContentValidationListing' security: *id001 put: - operationId: updateAssets_plug_functions + operationId: updateAssets_plugs summary: Update Plug Assets tags: - - Plug Functions + - Plugs description: "Update a draft plug function by updating its assets.\n\ \ \n The assets for a plug function can be provided as either\n\ \
      \n
    • a single tar archive (optionally compressed), with\ - \ one of the content types \n application/octet-stream, application/tar+gzip,\ - \ application/x-gzip, application/x-tar, application/gzip
    • \n\ - \
    • separate files in a multipart/form-data request
    • \n\ - \
    \n\n The provided assets will be added to the plug function's\ - \ collection of existing assets,\n replacing any existing assets with the\ - \ same name.\n\n Please note that it is not allowed to update the plug.json\ - \ json file with a changed value for any of the\n name, version\ - \ and/or runtime attributes.\n\n For each runtime other\ - \ files are supported.\n\n " + \ one of the content types \n application/octet-stream, application/tar,\ + \ application/tar+gzip, application/x-gzip, application/x-tar,\ + \ application/gzip\n
  • separate files in a multipart/form-data\ + \ request
  • \n \n\n The provided assets will be added to the plug\ + \ function's collection of existing assets,\n replacing any existing assets\ + \ with the same name.\n\n Please note that it is not allowed to update the\ + \ plug.json json file with a changed value for any of the\n name,\ + \ version and/or runtime attributes.\n\n For each\ + \ runtime other files are supported.\n\n " requestBody: content: application/octet-stream: schema: - title: Plug Function Assets - description: "The assets for a plug function can be provided\ - \ as either\n
      \n
    • a single tar archive (optionally\ - \ compressed), with one of the content types \n application/octet-stream,\ - \ application/tar+gzip, application/x-gzip,\ - \ application/x-tar, application/gzip
    • \n\ - \
    • separate files in a multipart/form-data request
    • \n\ - \
    \n\n The provided assets will be added to the plug\ - \ function's collection of existing assets,\n replacing any existing\ - \ assets with the same name.\n\n Please note that it is not allowed\ - \ to update the plug.json json file with a changed value for\ - \ any of the\n name, version and/or runtime\ - \ attributes.\n\n For each runtime other files are supported.\n" - anyOf: - - title: Multipart file upload. - description: A multi-part upload containing one or more file assets. - type: object - properties: - filename: - type: array - items: - type: string - format: binary - - title: TAR Achive Upload - description: A single file archive containing multiple assets. + title: TAR Archive Upload + description: A single file archive containing multiple assets. + type: string + format: binary + application/tar: + schema: + title: TAR Archive Upload + description: A single file archive containing multiple assets. + type: string + format: binary application/tar+gzip: schema: - title: Plug Function Assets - description: "The assets for a plug function can be provided\ - \ as either\n
      \n
    • a single tar archive (optionally\ - \ compressed), with one of the content types \n application/octet-stream,\ - \ application/tar+gzip, application/x-gzip,\ - \ application/x-tar, application/gzip
    • \n\ - \
    • separate files in a multipart/form-data request
    • \n\ - \
    \n\n The provided assets will be added to the plug\ - \ function's collection of existing assets,\n replacing any existing\ - \ assets with the same name.\n\n Please note that it is not allowed\ - \ to update the plug.json json file with a changed value for\ - \ any of the\n name, version and/or runtime\ - \ attributes.\n\n For each runtime other files are supported.\n" - anyOf: - - title: Multipart file upload. - description: A multi-part upload containing one or more file assets. - type: object - properties: - filename: - type: array - items: - type: string - format: binary - - title: TAR Achive Upload - description: A single file archive containing multiple assets. + title: TAR Archive Upload + description: A single file archive containing multiple assets. + type: string + format: binary application/x-gzip: schema: - title: Plug Function Assets - description: "The assets for a plug function can be provided\ - \ as either\n
      \n
    • a single tar archive (optionally\ - \ compressed), with one of the content types \n application/octet-stream,\ - \ application/tar+gzip, application/x-gzip,\ - \ application/x-tar, application/gzip
    • \n\ - \
    • separate files in a multipart/form-data request
    • \n\ - \
    \n\n The provided assets will be added to the plug\ - \ function's collection of existing assets,\n replacing any existing\ - \ assets with the same name.\n\n Please note that it is not allowed\ - \ to update the plug.json json file with a changed value for\ - \ any of the\n name, version and/or runtime\ - \ attributes.\n\n For each runtime other files are supported.\n" - anyOf: - - title: Multipart file upload. - description: A multi-part upload containing one or more file assets. - type: object - properties: - filename: - type: array - items: - type: string - format: binary - - title: TAR Achive Upload - description: A single file archive containing multiple assets. + title: TAR Archive Upload + description: A single file archive containing multiple assets. + type: string + format: binary application/x-tar: schema: - title: Plug Function Assets - description: "The assets for a plug function can be provided\ - \ as either\n
      \n
    • a single tar archive (optionally\ - \ compressed), with one of the content types \n application/octet-stream,\ - \ application/tar+gzip, application/x-gzip,\ - \ application/x-tar, application/gzip
    • \n\ - \
    • separate files in a multipart/form-data request
    • \n\ - \
    \n\n The provided assets will be added to the plug\ - \ function's collection of existing assets,\n replacing any existing\ - \ assets with the same name.\n\n Please note that it is not allowed\ - \ to update the plug.json json file with a changed value for\ - \ any of the\n name, version and/or runtime\ - \ attributes.\n\n For each runtime other files are supported.\n" - anyOf: - - title: Multipart file upload. - description: A multi-part upload containing one or more file assets. - type: object - properties: - filename: - type: array - items: - type: string - format: binary - - title: TAR Achive Upload - description: A single file archive containing multiple assets. + title: TAR Archive Upload + description: A single file archive containing multiple assets. + type: string + format: binary application/gzip: schema: - title: Plug Function Assets - description: "The assets for a plug function can be provided\ - \ as either\n
      \n
    • a single tar archive (optionally\ - \ compressed), with one of the content types \n application/octet-stream,\ - \ application/tar+gzip, application/x-gzip,\ - \ application/x-tar, application/gzip
    • \n\ - \
    • separate files in a multipart/form-data request
    • \n\ - \
    \n\n The provided assets will be added to the plug\ - \ function's collection of existing assets,\n replacing any existing\ - \ assets with the same name.\n\n Please note that it is not allowed\ - \ to update the plug.json json file with a changed value for\ - \ any of the\n name, version and/or runtime\ - \ attributes.\n\n For each runtime other files are supported.\n" - anyOf: - - title: Multipart file upload. - description: A multi-part upload containing one or more file assets. - type: object - properties: - filename: - type: array - items: - type: string - format: binary - - title: TAR Achive Upload - description: A single file archive containing multiple assets. + title: TAR Archive Upload + description: A single file archive containing multiple assets. + type: string + format: binary multipart/form-data: schema: - title: Plug Function Assets - description: "The assets for a plug function can be provided\ - \ as either\n
      \n
    • a single tar archive (optionally\ - \ compressed), with one of the content types \n application/octet-stream,\ - \ application/tar+gzip, application/x-gzip,\ - \ application/x-tar, application/gzip
    • \n\ - \
    • separate files in a multipart/form-data request
    • \n\ - \
    \n\n The provided assets will be added to the plug\ - \ function's collection of existing assets,\n replacing any existing\ - \ assets with the same name.\n\n Please note that it is not allowed\ - \ to update the plug.json json file with a changed value for\ - \ any of the\n name, version and/or runtime\ - \ attributes.\n\n For each runtime other files are supported.\n" - anyOf: - - title: Multipart file upload. - description: A multi-part upload containing one or more file assets. - type: object - properties: - filename: - type: array - items: - type: string - format: binary - - title: TAR Achive Upload - description: A single file archive containing multiple assets. + title: Multipart file upload. + description: 'A multi-part upload containing one or more file assets. + + Each part should specify a filename corresponding to the asset path.' + type: object + properties: + assets: + type: array + items: + type: string + format: binary description: "The assets for a plug function can be provided as either\n\ \
      \n
    • a single tar archive (optionally compressed),\ \ with one of the content types \n application/octet-stream,\ - \ application/tar+gzip, application/x-gzip, application/x-tar,\ - \ application/gzip
    • \n
    • separate files in a multipart/form-data\ - \ request
    • \n
    \n\n The provided assets will be added to the plug\ - \ function's collection of existing assets,\n replacing any existing assets\ - \ with the same name.\n\n Please note that it is not allowed to update\ - \ the plug.json json file with a changed value for any of the\n \ - \ name, version and/or runtime attributes.\n\ - \n For each runtime other files are supported.\n" + \ application/tar, application/tar+gzip, application/x-gzip,\ + \ application/x-tar, application/gzip\n \ + \
  • separate files in a multipart/form-data request
  • \n\ + \ \n\n The provided assets will be added to the plug function's\ + \ collection of existing assets,\n replacing any existing assets with the\ + \ same name.\n\n Please note that it is not allowed to update the plug.json\ + \ json file with a changed value for any of the\n name, version\ + \ and/or runtime attributes.\n\n For each runtime\ + \ other files are supported.\n" parameters: + - schema: + type: boolean + default: false + in: query + name: scaleToZero + required: false + description: If set to true, after successful deployment, the + deployed function will be scaled to zero. This saves computing resources + when the function is not to be used immediately. + - schema: + type: boolean + default: true + in: query + name: deploy + required: false + description: 'Indicates that a function should be _deployed_ when its assets + are valid. + + + * If `true` (default), jobs to build and deploy the function will be initiated + after it is checked that the assets are valid. Invalid assets lead to a + validation error, and the function and its assets are not created or updated. + + * If `false`, the uploaded assets are stored and the function is created/updated + in `registered` state. Asset validation errors are only returned as warning, + and stored as `failureReason` on the function entity. Use an _asset update_ + or _rebuild_ to initiate a build and deploy at a later stage.' + - schema: + type: boolean + default: false + in: query + name: chown + required: false + description: If set, ownership of the draft function is transferred to the + current user. - schema: type: string in: query name: comment required: false description: An optional user-specified comment corresponding to the operation. + - schema: + type: string + in: query + name: author + required: false + description: Optionally changes the author metadata when updating a function. - schema: type: boolean default: true @@ -12125,14 +11871,6 @@ paths: the required job actions asynchronously and return a 202 Accepted response. If false the request will block until the job actions are completed, or a timeout occurs. - - schema: - type: boolean - default: false - in: query - name: chown - required: true - description: If set, ownership of the draft function is transferred to the - current user. - schema: type: string in: path @@ -12159,13 +11897,19 @@ paths: application/json: schema: $ref: '#/components/schemas/IPostPlugJobAsyncResponseV2' + '403': + description: Default Response + content: + application/json: + schema: + $ref: '#/components/schemas/IRegistryErrorResponse' security: *id001 /registry/v2/plugs/{name}/versions/{version}/content/{*}: get: - operationId: getAsset_plug_functions + operationId: getAsset_plugs summary: Get File From Plug Archive tags: - - Plug Functions + - Plugs description: Get a file from the specification archive of a plug. parameters: - schema: @@ -12206,6 +11950,12 @@ paths: description: Plug archive type: string format: binary + application/tar: + schema: + title: Archive + description: Plug archive + type: string + format: binary application/tar+gzip: schema: title: Archive @@ -12235,10 +11985,10 @@ paths: $ref: '#/components/schemas/IContentValidationListing' security: *id001 put: - operationId: updateAsset_plug_functions + operationId: updateAsset_plugs summary: Update Plug Asset tags: - - Plug Functions + - Plugs description: "The provided asset will be added to the plug function's\ \ collection of existing assets,\n replacing any existing asset with the\ \ same name.\n\n Please note that it is not allowed to update the plug.json\ @@ -12247,7 +11997,7 @@ paths: \ files are supported.\n " requestBody: content: - application/octet-stream: + '*/*': schema: title: File Upload description: A single asset file. @@ -12258,12 +12008,53 @@ paths: format: binary description: A single asset file. parameters: + - schema: + type: boolean + default: false + in: query + name: scaleToZero + required: false + description: If set to true, after successful deployment, the + deployed function will be scaled to zero. This saves computing resources + when the function is not to be used immediately. + - schema: + type: boolean + default: true + in: query + name: deploy + required: false + description: 'Indicates that a function should be _deployed_ when its assets + are valid. + + + * If `true` (default), jobs to build and deploy the function will be initiated + after it is checked that the assets are valid. Invalid assets lead to a + validation error, and the function and its assets are not created or updated. + + * If `false`, the uploaded assets are stored and the function is created/updated + in `registered` state. Asset validation errors are only returned as warning, + and stored as `failureReason` on the function entity. Use an _asset update_ + or _rebuild_ to initiate a build and deploy at a later stage.' + - schema: + type: boolean + default: false + in: query + name: chown + required: false + description: If set, ownership of the draft function is transferred to the + current user. - schema: type: string in: query name: comment required: false description: An optional user-specified comment corresponding to the operation. + - schema: + type: string + in: query + name: author + required: false + description: Optionally changes the author metadata when updating a function. - schema: type: boolean default: true @@ -12274,14 +12065,6 @@ paths: the required job actions asynchronously and return a 202 Accepted response. If false the request will block until the job actions are completed, or a timeout occurs. - - schema: - type: boolean - default: false - in: query - name: chown - required: true - description: If set, ownership of the draft function is transferred to the - current user. - schema: type: string in: path @@ -12314,20 +12097,67 @@ paths: application/json: schema: $ref: '#/components/schemas/IPostPlugJobAsyncResponseV2' + '403': + description: Default Response + content: + application/json: + schema: + $ref: '#/components/schemas/IRegistryErrorResponse' security: *id001 delete: - operationId: deleteAsset_plug_functions + operationId: deleteAsset_plugs summary: Delete Plug Asset tags: - - Plug Functions + - Plugs description: Delete an asset from the plug's collection of existing assets. parameters: + - schema: + type: boolean + default: false + in: query + name: scaleToZero + required: false + description: If set to true, after successful deployment, the + deployed function will be scaled to zero. This saves computing resources + when the function is not to be used immediately. + - schema: + type: boolean + default: true + in: query + name: deploy + required: false + description: 'Indicates that a function should be _deployed_ when its assets + are valid. + + + * If `true` (default), jobs to build and deploy the function will be initiated + after it is checked that the assets are valid. Invalid assets lead to a + validation error, and the function and its assets are not created or updated. + + * If `false`, the uploaded assets are stored and the function is created/updated + in `registered` state. Asset validation errors are only returned as warning, + and stored as `failureReason` on the function entity. Use an _asset update_ + or _rebuild_ to initiate a build and deploy at a later stage.' + - schema: + type: boolean + default: false + in: query + name: chown + required: false + description: If set, ownership of the draft function is transferred to the + current user. - schema: type: string in: query name: comment required: false description: An optional user-specified comment corresponding to the operation. + - schema: + type: string + in: query + name: author + required: false + description: Optionally changes the author metadata when updating a function. - schema: type: boolean default: true @@ -12338,14 +12168,6 @@ paths: the required job actions asynchronously and return a 202 Accepted response. If false the request will block until the job actions are completed, or a timeout occurs. - - schema: - type: boolean - default: false - in: query - name: chown - required: true - description: If set, ownership of the draft function is transferred to the - current user. - schema: type: string in: path @@ -12378,25 +12200,45 @@ paths: application/json: schema: $ref: '#/components/schemas/IPostPlugJobAsyncResponseV2' + '403': + description: Default Response + content: + application/json: + schema: + $ref: '#/components/schemas/IRegistryErrorResponse' security: *id001 /registry/v2/plugs/{name}/versions/{version}/publish: post: - operationId: publish_plug_functions + operationId: publish_plugs summary: Publish Draft Plug tags: - - Plug Functions + - Plugs description: "Mark the plug to be ready and stable, taking it out of\ \ draft mode.,\n\n Typically, the plug should be in the running\ \ status, \n such that publishing becomes a simple operation where the existing\ \ deployment can be re-used.\n In other statuses, plug-registry may need\ \ to initiate a new build and deployment procedure.\n " parameters: + - schema: + type: boolean + default: false + in: query + name: chown + required: false + description: If set, ownership of the draft function is transferred to the + current user. - schema: type: string in: query name: comment required: false description: An optional user-specified comment corresponding to the operation. + - schema: + type: string + in: query + name: author + required: false + description: Optionally changes the author metadata when updating a function. - schema: $ref: '#/components/schemas/DeprecatePreviousPolicy' default: none @@ -12446,10 +12288,10 @@ paths: security: *id001 /registry/v2/plugs/{name}/versions/{version}/interface: patch: - operationId: patchInterface_plug_functions + operationId: patchInterface_plugs summary: Patch Plug Interface tags: - - Plug Functions + - Plugs description: Patch the interface documentation of a plug version. requestBody: content: @@ -12486,10 +12328,10 @@ paths: security: *id001 /registry/v2/plugs/{name}/versions/{version}/metadata: patch: - operationId: patchMetadata_plug_functions + operationId: patchMetadata_plugs summary: Patch Plug Metadata tags: - - Plug Functions + - Plugs description: Patch the metadata of a plug version. requestBody: content: @@ -12526,10 +12368,10 @@ paths: security: *id001 /registry/v2/plugs/{name}/versions/{version}/jobs: get: - operationId: jobs_plug_functions + operationId: jobs_plugs summary: List Plug Jobs tags: - - Plug Functions + - Plugs description: List the ongoing and completed operations on a specific plug. parameters: - schema: @@ -12599,18 +12441,20 @@ paths: security: *id001 /registry/v2/plugs/{name}/versions/{version}/verify: post: - operationId: verify_plug_functions + operationId: verify_plugs summary: Verify Health Of Plug tags: - - Plug Functions + - Plugs description: Verify health of plug deployed on openfaas. parameters: - schema: - type: string + type: boolean in: query - name: comment + name: scaleToZero required: false - description: An optional user-specified comment corresponding to the operation. + description: Indicates whether the function needs to be scaled down after + successful verification. If not set, the function is scaled to zero only + if it was not active before this command. - schema: type: boolean default: true @@ -12621,14 +12465,6 @@ paths: the required job actions asynchronously and return a 202 Accepted response. If false the request will block until the job actions are completed, or a timeout occurs. - - schema: - type: boolean - in: query - name: scaleToZero - required: false - description: Indicates whether the function needs to be scaled down after - successful verification. If not set, the function is scaled to zero only - if it was not active before this command. - schema: type: string in: path @@ -12659,190 +12495,139 @@ paths: security: *id001 /registry/v2/models/: post: - operationId: create_model_functions + operationId: create_models summary: Create Model tags: - - Model Functions + - Models description: "Creates a new model function by uploading its assets.\n\ - \ \n The assets for a model function can be provided as either\n\ - \
      \n
    • a single tar archive (optionally compressed), with\ - \ one of the content types \n application/octet-stream, application/tar+gzip,\ - \ application/x-gzip, application/x-tar, application/gzip
    • \n\ - \
    • separate files in a multipart/form-data request
    • \n\ - \
    \n \n The required model.json json file contains the\ - \ function metadata,\n and must have a runtime attribute that\ - \ is one of the supported runtimes \n (see GET /registry/v2/runtimes?functionType=kfserving).\n\ - \n For each runtime other files will be required or supported.\n\ - \n " + \ \n The assets for a model function can be provided as\n
      \n\ + \
    • A single tar archive (optionally compressed), with one of\ + \ the content types \n application/octet-stream, application/tar,\ + \ application/tar+gzip, application/x-gzip, application/x-tar,\ + \ application/gzip
    • \n
    • Separate files in a multipart/form-data\ + \ request
    • \n
    • A reference to the assets of another model\ + \ in the copy argument
    • \n
    \n\n The required model.json\ + \ json file contains the function metadata,\n and must have a runtime\ + \ attribute that is one of the supported runtimes \n (see GET\ + \ /registry/v2/runtimes?functionType=kfserving).\n\n For each runtime\ + \ other files will be required or supported.\n\n " requestBody: content: application/octet-stream: schema: - title: Model Function Assets - description: "The assets for a model function can be provided\ - \ as either\n
      \n
    • a single tar archive (optionally\ - \ compressed), with one of the content types \n application/octet-stream,\ - \ application/tar+gzip, application/x-gzip,\ - \ application/x-tar, application/gzip
    • \n\ - \
    • separate files in a multipart/form-data request
    • \n\ - \
    \n \n The required model.json json file contains\ - \ the function metadata,\n and must have a runtime attribute\ - \ that is one of the supported runtimes \n (see GET\ - \ /registry/v2/runtimes?functionType=kfserving).\n\n For each\ - \ runtime other files will be required or supported.\n" - anyOf: - - title: Multipart file upload. - description: A multi-part upload containing one or more file assets. - type: object - properties: - filename: - type: array - items: - type: string - format: binary - - title: TAR Achive Upload - description: A single file archive containing multiple assets. + title: TAR Archive Upload + description: A single file archive containing multiple assets. + type: string + format: binary + application/tar: + schema: + title: TAR Archive Upload + description: A single file archive containing multiple assets. + type: string + format: binary application/tar+gzip: schema: - title: Model Function Assets - description: "The assets for a model function can be provided\ - \ as either\n
      \n
    • a single tar archive (optionally\ - \ compressed), with one of the content types \n application/octet-stream,\ - \ application/tar+gzip, application/x-gzip,\ - \ application/x-tar, application/gzip
    • \n\ - \
    • separate files in a multipart/form-data request
    • \n\ - \
    \n \n The required model.json json file contains\ - \ the function metadata,\n and must have a runtime attribute\ - \ that is one of the supported runtimes \n (see GET\ - \ /registry/v2/runtimes?functionType=kfserving).\n\n For each\ - \ runtime other files will be required or supported.\n" - anyOf: - - title: Multipart file upload. - description: A multi-part upload containing one or more file assets. - type: object - properties: - filename: - type: array - items: - type: string - format: binary - - title: TAR Achive Upload - description: A single file archive containing multiple assets. + title: TAR Archive Upload + description: A single file archive containing multiple assets. + type: string + format: binary application/x-gzip: schema: - title: Model Function Assets - description: "The assets for a model function can be provided\ - \ as either\n
      \n
    • a single tar archive (optionally\ - \ compressed), with one of the content types \n application/octet-stream,\ - \ application/tar+gzip, application/x-gzip,\ - \ application/x-tar, application/gzip
    • \n\ - \
    • separate files in a multipart/form-data request
    • \n\ - \
    \n \n The required model.json json file contains\ - \ the function metadata,\n and must have a runtime attribute\ - \ that is one of the supported runtimes \n (see GET\ - \ /registry/v2/runtimes?functionType=kfserving).\n\n For each\ - \ runtime other files will be required or supported.\n" - anyOf: - - title: Multipart file upload. - description: A multi-part upload containing one or more file assets. - type: object - properties: - filename: - type: array - items: - type: string - format: binary - - title: TAR Achive Upload - description: A single file archive containing multiple assets. + title: TAR Archive Upload + description: A single file archive containing multiple assets. + type: string + format: binary application/x-tar: schema: - title: Model Function Assets - description: "The assets for a model function can be provided\ - \ as either\n
      \n
    • a single tar archive (optionally\ - \ compressed), with one of the content types \n application/octet-stream,\ - \ application/tar+gzip, application/x-gzip,\ - \ application/x-tar, application/gzip
    • \n\ - \
    • separate files in a multipart/form-data request
    • \n\ - \
    \n \n The required model.json json file contains\ - \ the function metadata,\n and must have a runtime attribute\ - \ that is one of the supported runtimes \n (see GET\ - \ /registry/v2/runtimes?functionType=kfserving).\n\n For each\ - \ runtime other files will be required or supported.\n" - anyOf: - - title: Multipart file upload. - description: A multi-part upload containing one or more file assets. - type: object - properties: - filename: - type: array - items: - type: string - format: binary - - title: TAR Achive Upload - description: A single file archive containing multiple assets. + title: TAR Archive Upload + description: A single file archive containing multiple assets. + type: string + format: binary application/gzip: schema: - title: Model Function Assets - description: "The assets for a model function can be provided\ - \ as either\n
      \n
    • a single tar archive (optionally\ - \ compressed), with one of the content types \n application/octet-stream,\ - \ application/tar+gzip, application/x-gzip,\ - \ application/x-tar, application/gzip
    • \n\ - \
    • separate files in a multipart/form-data request
    • \n\ - \
    \n \n The required model.json json file contains\ - \ the function metadata,\n and must have a runtime attribute\ - \ that is one of the supported runtimes \n (see GET\ - \ /registry/v2/runtimes?functionType=kfserving).\n\n For each\ - \ runtime other files will be required or supported.\n" - anyOf: - - title: Multipart file upload. - description: A multi-part upload containing one or more file assets. - type: object - properties: - filename: - type: array - items: - type: string - format: binary - - title: TAR Achive Upload - description: A single file archive containing multiple assets. + title: TAR Archive Upload + description: A single file archive containing multiple assets. + type: string + format: binary multipart/form-data: schema: - title: Model Function Assets - description: "The assets for a model function can be provided\ - \ as either\n
      \n
    • a single tar archive (optionally\ - \ compressed), with one of the content types \n application/octet-stream,\ - \ application/tar+gzip, application/x-gzip,\ - \ application/x-tar, application/gzip
    • \n\ - \
    • separate files in a multipart/form-data request
    • \n\ - \
    \n \n The required model.json json file contains\ - \ the function metadata,\n and must have a runtime attribute\ - \ that is one of the supported runtimes \n (see GET\ - \ /registry/v2/runtimes?functionType=kfserving).\n\n For each\ - \ runtime other files will be required or supported.\n" - anyOf: - - title: Multipart file upload. - description: A multi-part upload containing one or more file assets. - type: object - properties: - filename: - type: array - items: - type: string - format: binary - - title: TAR Achive Upload - description: A single file archive containing multiple assets. - description: "The assets for a model function can be provided as\ - \ either\n
      \n
    • a single tar archive (optionally compressed),\ + title: Multipart file upload. + description: 'A multi-part upload containing one or more file assets. + + Each part should specify a filename corresponding to the asset path.' + type: object + properties: + assets: + type: array + items: + type: string + format: binary + application/json: + schema: + title: Empty Upload + description: Empty object request body, only allowed when using the + `copy` query parameter. + type: object + maxProperties: 0 + '*/*+json': + schema: + title: Empty Upload + description: Empty object request body, only allowed when using the + `copy` query parameter. + type: object + maxProperties: 0 + description: "The assets for a model function can be provided as\n\ + \
        \n
      • A single tar archive (optionally compressed),\ \ with one of the content types \n application/octet-stream,\ - \ application/tar+gzip, application/x-gzip, application/x-tar,\ - \ application/gzip
      • \n
      • separate files in a multipart/form-data\ - \ request
      • \n
      \n \n The required model.json json\ + \ application/tar, application/tar+gzip, application/x-gzip,\ + \ application/x-tar, application/gzip
    • \n \ + \
    • Separate files in a multipart/form-data request
    • \n\ + \
    • A reference to the assets of another model in the copy\ + \ argument
    • \n
    \n\n The required model.json json\ \ file contains the function metadata,\n and must have a runtime\ \ attribute that is one of the supported runtimes \n (see GET\ \ /registry/v2/runtimes?functionType=kfserving).\n\n For each runtime\ \ other files will be required or supported.\n" parameters: + - schema: + type: boolean + default: true + in: query + name: deploy + required: false + description: 'Indicates that a function should be _deployed_ when its assets + are valid. + + + * If `true` (default), jobs to build and deploy the function will be initiated + after it is checked that the assets are valid. Invalid assets lead to a + validation error, and the function and its assets are not created or updated. + + * If `false`, the uploaded assets are stored and the function is created/updated + in `registered` state. Asset validation errors are only returned as warning, + and stored as `failureReason` on the function entity. Use an _asset update_ + or _rebuild_ to initiate a build and deploy at a later stage.' + - schema: + type: string + in: query + name: author + required: false + description: Optionally changes the author metadata when updating a function. + - schema: + type: string + in: query + name: comment + required: false + description: An optional user-specified comment corresponding to the operation. + - schema: + type: boolean + default: false + in: query + name: scaleToZero + required: false + description: If set to true, after successful deployment, the + deployed function will be scaled to zero. This saves computing resources + when the function is not to be used immediately. - schema: $ref: '#/components/schemas/DeprecatePreviousPolicy' default: patch @@ -12868,15 +12653,6 @@ paths: the required job actions asynchronously and return a 202 Accepted response. If false the request will block until the job actions are completed, or a timeout occurs. - - schema: - type: boolean - default: false - in: query - name: scaleToZero - required: false - description: If set to true, after successful deployment, the - deployed function will be scaled to zero. Saves computing resources when - the function is not to be used immediately. - schema: $ref: '#/components/schemas/SemanticVersionRange' in: query @@ -12901,6 +12677,53 @@ paths: description: If set, the created function will be a draft function and its assets are still mutable. A build and deploy is initiated only in the case when all necessary assets are present and valid. + - schema: + $ref: '#/components/schemas/NamedVersionRange' + in: query + name: runtime + required: false + description: 'If set, the created function will use the indicated runtime + (latest version within specified range). + + + This takes precedence over the runtime specified in a function manifest + (copied or from request body).' + - schema: + anyOf: + - $ref: '#/components/schemas/NamedVersionRange' + - $ref: '#/components/schemas/ExampleReference' + in: query + name: copy + required: false + description: "Indicates the _source_ of initial assets for a _new function_.\n\ + \nWhen using this query parameter, the request body does not need to contain\ + \ assets, but any assets in the request body will overwrite the copied assets.\n\ + \n#### Selection of _assets_ source\n\n* If set as `[@]`,\ + \ the _new function_ will be created with copied assets of the selected\ + \ _source function_.\n* If set as `!example`, a `runtime` query parameter\ + \ is required, and the _new function_ will be initialized with assets of\ + \ the _runtime example_.\n\n#### Selection of the _source function_\n\n\ + When `` is a range (or is not given), the latest _published_\ + \ version (in that range) is used.\n\nIf no _published_ version exists,\ + \ the latest _draft_ is selected.\n\nIf no versions in the range exist,\ + \ a `404` _Not Found_ error is returned.\n\n#### The `name` of the _new\ + \ function_\n\nIf a `name` is NOT specified (either as query parameter,\ + \ or in an optional manifest asset in the request body), the `name` of the\ + \ _new function_ will be that of the _source function_.\n\n#### The `version`\ + \ of the _new function_\n\nWhen the _target_ and _source_ name are equal,\ + \ the `version` query parameters is defaulted to ``\ + \ (`~` when it's an exact version)\n\nThe version of\ + \ the _new function_ will be:\n* If a `version` is NOT specified (either\ + \ as query parameter, in an optional manifest asset, or as ``\ + \ _default_)\n\n * a **patch increment** (`..+1`)\ + \ of the latest **existing version** with the target `name`\n\n * **`1.0.0`**\ + \ otherwise\n\n* If a `version` is specified:\n\n * the **lowest version**\ + \ in that range **if no existing version** is in that range.\n\n * an **increment**\ + \ of the latest existing version, **at the highest level** (_major_,_minor_,_patch_)\ + \ allowed by that range.\n\n * otherwise, if all allowed versions already\ + \ exist, a **`409` _Duplicate_ error** is raised.\n\n#### Deployment overrides\n\ + \nThe new function will use the deployment overrides of the copied function,\ + \ unless a _manifest_ was specified in the request body." x-version: v2 responses: '201': @@ -12917,10 +12740,10 @@ paths: $ref: '#/components/schemas/IPostModelJobAsyncResponseV2' security: *id001 get: - operationId: list_model_functions + operationId: list_models summary: List Models tags: - - Model Functions + - Models description: "List the (latest) versions of available models.\n\n###\ \ List Latest Model Versions\nBy default, the result includes the latest non-deprecated,\ \ non-draft version for each model name.\nIf there is no such version,\ @@ -12932,19 +12755,21 @@ paths: \ versions.\n
  • includeDraft=true: do not prefer non-draft\ \ versions as a latest version: if the latest version is a draft, it will\ \ be shown, even if there are older non-draft versions.
  • \n \n\n\n\ - As long as no _version filters_ are used, each listed model version\ - \ item will contain a HAL **link to the \nlatest** _draft_ (`entities[]._links.draft`)\ - \ or latest _published_ (`entities[]._links.publisned`) version (if existing\ - \ and different).\n\n### List Latest Model Versions (with filter)\nWhen any\ - \ of the _version filter_ query parameters are used, the response contains\n\ - the _latest_ version per named model that satisfy the filters, but\ - \ **without links**.\n\n### List All Model Versions\nWhen using `latest=false`\ - \ (default when using the `namedVersion` filter), the listing contains _all_\ - \ \nmodels versions that satisfy the query, possibly multiple versions\ - \ per named models.\nNo HAL links are provided.\n\n#### Filter on\ - \ _status_\nBy default model versions with status `undeployed` are\ - \ **excluded** in all cases.\nUse the _version filter_ `status` to include/exclude\ - \ a status from the results.\nBy example, \n> `?status=any&includeDeprecated=true&includeDraft=true&latest=false`\n\ + As long as no version filters are used, each listed model version\ + \ contains representations of the latest draft (`entities[]._links.draft`)\ + \ \nor latest published (`entities[]._links.published`) version (if existing\ + \ and different). \nUse the query parameter `showRelated` to include only\ + \ a link (default `showRelated=link`) or a full representation (`showRelated=embed`).\n\ + \n### List Latest Model Versions (with filter)\nWhen any of the _version filter_\ + \ query parameters are used, the response contains\nthe _latest_ version per\ + \ named model that satisfy the filters, but **without links**.\n\n\ + ### List All Model Versions\nWhen using `latest=false` (default when using\ + \ the `namedVersion` filter), the listing contains _all_ \nmodels\ + \ versions that satisfy the query, possibly multiple versions per named models.\n\ + No HAL links are provided.\n\n#### Filter on _status_\nBy default model\ + \ versions with status `undeployed` are **excluded** in all cases.\n\ + Use the _version filter_ `status` to include/exclude a status from the results.\n\ + By example, \n> `?status=any&includeDeprecated=true&includeDraft=true&latest=false`\n\ \nwill list _ALL_ versions known to the function registry.\n\n#### Version\ \ filter parameters\nThe following query parameters are _version filters_\ \ for the model listing:\n> `version`, `status`, `runtimeVersion`,\ @@ -13106,6 +12931,19 @@ paths: If set to `false`, multiple versions per named function can be returned. Defaults to `true`, except when specific versions are selected with the `nameVersion` filter. + - schema: + $ref: '#/components/schemas/ShowRelatedType' + in: query + name: showRelated + required: false + description: 'Sets the representation of related function versions (like the + _latest_ draft and/or published) in the response. + + - `embed`: as full summary representation (in `_embedded`). + + - `link`: as HAL link in (in `_links`). + + - `none`: omitted.' x-version: v2 responses: '200': @@ -13117,10 +12955,10 @@ paths: security: *id001 /registry/v2/models/{name}: get: - operationId: getLatest_model_functions + operationId: getLatest_models summary: Get Latest Model Version tags: - - Model Functions + - Models description: "Fetch the latest version of a model.\n\n By default,\ \ the result shows the latest non-deprecated, non-draft version.\n If there\ \ is no such version, the latest deprecated or the latest draft version is\ @@ -13169,10 +13007,10 @@ paths: $ref: '#/components/schemas/IGetModelResponseV2' security: *id001 delete: - operationId: removeVersions_model_functions + operationId: removeVersions_models summary: Remove Model tags: - - Model Functions + - Models description: "Deprecate, undeploy and/or remove all versions of this named model.\n\ \n By default, a `DELETE` \n * _deprecates_ the model version(s): they are\ \ no longer included in listings by default.\n * _undeploys_ the model version(s)\ @@ -13263,10 +13101,10 @@ paths: security: *id001 /registry/v2/models/{name}/versions: get: - operationId: listVersions_model_functions + operationId: listVersions_models summary: List Model Versions tags: - - Model Functions + - Models description: List all deployed versions of a model. parameters: - schema: @@ -13396,10 +13234,10 @@ paths: security: *id001 /registry/v2/models/{name}/versions/{version}: get: - operationId: get_model_functions + operationId: get_models summary: Get Model Version tags: - - Model Functions + - Models description: Get a model by name and version. parameters: - schema: @@ -13424,10 +13262,10 @@ paths: $ref: '#/components/schemas/IGetModelResponseV2' security: *id001 delete: - operationId: removeVersion_model_functions + operationId: removeVersion_models summary: Remove Model Version tags: - - Model Functions + - Models description: "Deprecate, undeploy and/or remove a model version.\n\n\ \ By default, a `DELETE` \n * _deprecates_ the model version(s): they are\ \ no longer included in listings by default.\n * _undeploys_ the model version(s)\ @@ -13524,10 +13362,10 @@ paths: security: *id001 /registry/v2/models/{name}/versions/{version}/content: get: - operationId: getArchive_model_functions + operationId: getArchive_models summary: Get Model Archive tags: - - Model Functions + - Models description: Get the specification archive of a model. parameters: - schema: @@ -13562,6 +13400,12 @@ paths: description: Model archive type: string format: binary + application/tar: + schema: + title: Archive + description: Model archive + type: string + format: binary application/tar+gzip: schema: title: Archive @@ -13591,204 +13435,133 @@ paths: $ref: '#/components/schemas/IContentValidationListing' security: *id001 put: - operationId: updateAssets_model_functions + operationId: updateAssets_models summary: Update Model Assets tags: - - Model Functions + - Models description: "Update a draft model function by updating its assets.\n\ \ \n The assets for a model function can be provided as either\n\ \
      \n
    • a single tar archive (optionally compressed), with\ - \ one of the content types \n application/octet-stream, application/tar+gzip,\ - \ application/x-gzip, application/x-tar, application/gzip
    • \n\ - \
    • separate files in a multipart/form-data request
    • \n\ - \
    \n\n The provided assets will be added to the model function's\ - \ collection of existing assets,\n replacing any existing assets with the\ - \ same name.\n\n Please note that it is not allowed to update the model.json\ - \ json file with a changed value for any of the\n name, version\ - \ and/or runtime attributes.\n\n For each runtime other\ - \ files are supported.\n\n " + \ one of the content types \n application/octet-stream, application/tar,\ + \ application/tar+gzip, application/x-gzip, application/x-tar,\ + \ application/gzip\n
  • separate files in a multipart/form-data\ + \ request
  • \n \n\n The provided assets will be added to the model\ + \ function's collection of existing assets,\n replacing any existing assets\ + \ with the same name.\n\n Please note that it is not allowed to update the\ + \ model.json json file with a changed value for any of the\n name,\ + \ version and/or runtime attributes.\n\n For each\ + \ runtime other files are supported.\n\n " requestBody: content: application/octet-stream: schema: - title: Model Function Assets - description: "The assets for a model function can be provided\ - \ as either\n
      \n
    • a single tar archive (optionally\ - \ compressed), with one of the content types \n application/octet-stream,\ - \ application/tar+gzip, application/x-gzip,\ - \ application/x-tar, application/gzip
    • \n\ - \
    • separate files in a multipart/form-data request
    • \n\ - \
    \n\n The provided assets will be added to the model\ - \ function's collection of existing assets,\n replacing any existing\ - \ assets with the same name.\n\n Please note that it is not allowed\ - \ to update the model.json json file with a changed value for\ - \ any of the\n name, version and/or runtime\ - \ attributes.\n\n For each runtime other files are supported.\n" - anyOf: - - title: Multipart file upload. - description: A multi-part upload containing one or more file assets. - type: object - properties: - filename: - type: array - items: - type: string - format: binary - - title: TAR Achive Upload - description: A single file archive containing multiple assets. + title: TAR Archive Upload + description: A single file archive containing multiple assets. + type: string + format: binary + application/tar: + schema: + title: TAR Archive Upload + description: A single file archive containing multiple assets. + type: string + format: binary application/tar+gzip: schema: - title: Model Function Assets - description: "The assets for a model function can be provided\ - \ as either\n
      \n
    • a single tar archive (optionally\ - \ compressed), with one of the content types \n application/octet-stream,\ - \ application/tar+gzip, application/x-gzip,\ - \ application/x-tar, application/gzip
    • \n\ - \
    • separate files in a multipart/form-data request
    • \n\ - \
    \n\n The provided assets will be added to the model\ - \ function's collection of existing assets,\n replacing any existing\ - \ assets with the same name.\n\n Please note that it is not allowed\ - \ to update the model.json json file with a changed value for\ - \ any of the\n name, version and/or runtime\ - \ attributes.\n\n For each runtime other files are supported.\n" - anyOf: - - title: Multipart file upload. - description: A multi-part upload containing one or more file assets. - type: object - properties: - filename: - type: array - items: - type: string - format: binary - - title: TAR Achive Upload - description: A single file archive containing multiple assets. + title: TAR Archive Upload + description: A single file archive containing multiple assets. + type: string + format: binary application/x-gzip: schema: - title: Model Function Assets - description: "The assets for a model function can be provided\ - \ as either\n
      \n
    • a single tar archive (optionally\ - \ compressed), with one of the content types \n application/octet-stream,\ - \ application/tar+gzip, application/x-gzip,\ - \ application/x-tar, application/gzip
    • \n\ - \
    • separate files in a multipart/form-data request
    • \n\ - \
    \n\n The provided assets will be added to the model\ - \ function's collection of existing assets,\n replacing any existing\ - \ assets with the same name.\n\n Please note that it is not allowed\ - \ to update the model.json json file with a changed value for\ - \ any of the\n name, version and/or runtime\ - \ attributes.\n\n For each runtime other files are supported.\n" - anyOf: - - title: Multipart file upload. - description: A multi-part upload containing one or more file assets. - type: object - properties: - filename: - type: array - items: - type: string - format: binary - - title: TAR Achive Upload - description: A single file archive containing multiple assets. + title: TAR Archive Upload + description: A single file archive containing multiple assets. + type: string + format: binary application/x-tar: schema: - title: Model Function Assets - description: "The assets for a model function can be provided\ - \ as either\n
      \n
    • a single tar archive (optionally\ - \ compressed), with one of the content types \n application/octet-stream,\ - \ application/tar+gzip, application/x-gzip,\ - \ application/x-tar, application/gzip
    • \n\ - \
    • separate files in a multipart/form-data request
    • \n\ - \
    \n\n The provided assets will be added to the model\ - \ function's collection of existing assets,\n replacing any existing\ - \ assets with the same name.\n\n Please note that it is not allowed\ - \ to update the model.json json file with a changed value for\ - \ any of the\n name, version and/or runtime\ - \ attributes.\n\n For each runtime other files are supported.\n" - anyOf: - - title: Multipart file upload. - description: A multi-part upload containing one or more file assets. - type: object - properties: - filename: - type: array - items: - type: string - format: binary - - title: TAR Achive Upload - description: A single file archive containing multiple assets. + title: TAR Archive Upload + description: A single file archive containing multiple assets. + type: string + format: binary application/gzip: schema: - title: Model Function Assets - description: "The assets for a model function can be provided\ - \ as either\n
      \n
    • a single tar archive (optionally\ - \ compressed), with one of the content types \n application/octet-stream,\ - \ application/tar+gzip, application/x-gzip,\ - \ application/x-tar, application/gzip
    • \n\ - \
    • separate files in a multipart/form-data request
    • \n\ - \
    \n\n The provided assets will be added to the model\ - \ function's collection of existing assets,\n replacing any existing\ - \ assets with the same name.\n\n Please note that it is not allowed\ - \ to update the model.json json file with a changed value for\ - \ any of the\n name, version and/or runtime\ - \ attributes.\n\n For each runtime other files are supported.\n" - anyOf: - - title: Multipart file upload. - description: A multi-part upload containing one or more file assets. - type: object - properties: - filename: - type: array - items: - type: string - format: binary - - title: TAR Achive Upload - description: A single file archive containing multiple assets. + title: TAR Archive Upload + description: A single file archive containing multiple assets. + type: string + format: binary multipart/form-data: schema: - title: Model Function Assets - description: "The assets for a model function can be provided\ - \ as either\n
      \n
    • a single tar archive (optionally\ - \ compressed), with one of the content types \n application/octet-stream,\ - \ application/tar+gzip, application/x-gzip,\ - \ application/x-tar, application/gzip
    • \n\ - \
    • separate files in a multipart/form-data request
    • \n\ - \
    \n\n The provided assets will be added to the model\ - \ function's collection of existing assets,\n replacing any existing\ - \ assets with the same name.\n\n Please note that it is not allowed\ - \ to update the model.json json file with a changed value for\ - \ any of the\n name, version and/or runtime\ - \ attributes.\n\n For each runtime other files are supported.\n" - anyOf: - - title: Multipart file upload. - description: A multi-part upload containing one or more file assets. - type: object - properties: - filename: - type: array - items: - type: string - format: binary - - title: TAR Achive Upload - description: A single file archive containing multiple assets. + title: Multipart file upload. + description: 'A multi-part upload containing one or more file assets. + + Each part should specify a filename corresponding to the asset path.' + type: object + properties: + assets: + type: array + items: + type: string + format: binary description: "The assets for a model function can be provided as\ \ either\n
      \n
    • a single tar archive (optionally compressed),\ \ with one of the content types \n application/octet-stream,\ - \ application/tar+gzip, application/x-gzip, application/x-tar,\ - \ application/gzip
    • \n
    • separate files in a multipart/form-data\ - \ request
    • \n
    \n\n The provided assets will be added to the model\ - \ function's collection of existing assets,\n replacing any existing assets\ - \ with the same name.\n\n Please note that it is not allowed to update\ - \ the model.json json file with a changed value for any of the\n\ - \ name, version and/or runtime\ - \ attributes.\n\n For each runtime other files are supported.\n" + \ application/tar, application/tar+gzip, application/x-gzip,\ + \ application/x-tar, application/gzip\n \ + \
  • separate files in a multipart/form-data request
  • \n\ + \ \n\n The provided assets will be added to the model function's\ + \ collection of existing assets,\n replacing any existing assets with the\ + \ same name.\n\n Please note that it is not allowed to update the model.json\ + \ json file with a changed value for any of the\n name, version\ + \ and/or runtime attributes.\n\n For each runtime\ + \ other files are supported.\n" parameters: + - schema: + type: boolean + default: false + in: query + name: scaleToZero + required: false + description: If set to true, after successful deployment, the + deployed function will be scaled to zero. This saves computing resources + when the function is not to be used immediately. + - schema: + type: boolean + default: true + in: query + name: deploy + required: false + description: 'Indicates that a function should be _deployed_ when its assets + are valid. + + + * If `true` (default), jobs to build and deploy the function will be initiated + after it is checked that the assets are valid. Invalid assets lead to a + validation error, and the function and its assets are not created or updated. + + * If `false`, the uploaded assets are stored and the function is created/updated + in `registered` state. Asset validation errors are only returned as warning, + and stored as `failureReason` on the function entity. Use an _asset update_ + or _rebuild_ to initiate a build and deploy at a later stage.' + - schema: + type: boolean + default: false + in: query + name: chown + required: false + description: If set, ownership of the draft function is transferred to the + current user. - schema: type: string in: query name: comment required: false description: An optional user-specified comment corresponding to the operation. + - schema: + type: string + in: query + name: author + required: false + description: Optionally changes the author metadata when updating a function. - schema: type: boolean default: true @@ -13799,14 +13572,6 @@ paths: the required job actions asynchronously and return a 202 Accepted response. If false the request will block until the job actions are completed, or a timeout occurs. - - schema: - type: boolean - default: false - in: query - name: chown - required: true - description: If set, ownership of the draft function is transferred to the - current user. - schema: type: string in: path @@ -13833,13 +13598,19 @@ paths: application/json: schema: $ref: '#/components/schemas/IPostModelJobAsyncResponseV2' + '403': + description: Default Response + content: + application/json: + schema: + $ref: '#/components/schemas/IRegistryErrorResponse' security: *id001 /registry/v2/models/{name}/versions/{version}/content/{*}: get: - operationId: getAsset_model_functions + operationId: getAsset_models summary: Get File From Model Archive tags: - - Model Functions + - Models description: Get a file from the specification archive of a model. parameters: - schema: @@ -13880,6 +13651,12 @@ paths: description: Model archive type: string format: binary + application/tar: + schema: + title: Archive + description: Model archive + type: string + format: binary application/tar+gzip: schema: title: Archive @@ -13909,10 +13686,10 @@ paths: $ref: '#/components/schemas/IContentValidationListing' security: *id001 put: - operationId: updateAsset_model_functions + operationId: updateAsset_models summary: Update Model Asset tags: - - Model Functions + - Models description: "The provided asset will be added to the model function's\ \ collection of existing assets,\n replacing any existing asset with the\ \ same name.\n\n Please note that it is not allowed to update the model.json\ @@ -13921,7 +13698,7 @@ paths: \ files are supported.\n " requestBody: content: - application/octet-stream: + '*/*': schema: title: File Upload description: A single asset file. @@ -13932,12 +13709,53 @@ paths: format: binary description: A single asset file. parameters: + - schema: + type: boolean + default: false + in: query + name: scaleToZero + required: false + description: If set to true, after successful deployment, the + deployed function will be scaled to zero. This saves computing resources + when the function is not to be used immediately. + - schema: + type: boolean + default: true + in: query + name: deploy + required: false + description: 'Indicates that a function should be _deployed_ when its assets + are valid. + + + * If `true` (default), jobs to build and deploy the function will be initiated + after it is checked that the assets are valid. Invalid assets lead to a + validation error, and the function and its assets are not created or updated. + + * If `false`, the uploaded assets are stored and the function is created/updated + in `registered` state. Asset validation errors are only returned as warning, + and stored as `failureReason` on the function entity. Use an _asset update_ + or _rebuild_ to initiate a build and deploy at a later stage.' + - schema: + type: boolean + default: false + in: query + name: chown + required: false + description: If set, ownership of the draft function is transferred to the + current user. - schema: type: string in: query name: comment required: false description: An optional user-specified comment corresponding to the operation. + - schema: + type: string + in: query + name: author + required: false + description: Optionally changes the author metadata when updating a function. - schema: type: boolean default: true @@ -13948,14 +13766,6 @@ paths: the required job actions asynchronously and return a 202 Accepted response. If false the request will block until the job actions are completed, or a timeout occurs. - - schema: - type: boolean - default: false - in: query - name: chown - required: true - description: If set, ownership of the draft function is transferred to the - current user. - schema: type: string in: path @@ -13988,20 +13798,67 @@ paths: application/json: schema: $ref: '#/components/schemas/IPostModelJobAsyncResponseV2' + '403': + description: Default Response + content: + application/json: + schema: + $ref: '#/components/schemas/IRegistryErrorResponse' security: *id001 delete: - operationId: deleteAsset_model_functions + operationId: deleteAsset_models summary: Delete Model Asset tags: - - Model Functions + - Models description: Delete an asset from the model's collection of existing assets. parameters: + - schema: + type: boolean + default: false + in: query + name: scaleToZero + required: false + description: If set to true, after successful deployment, the + deployed function will be scaled to zero. This saves computing resources + when the function is not to be used immediately. + - schema: + type: boolean + default: true + in: query + name: deploy + required: false + description: 'Indicates that a function should be _deployed_ when its assets + are valid. + + + * If `true` (default), jobs to build and deploy the function will be initiated + after it is checked that the assets are valid. Invalid assets lead to a + validation error, and the function and its assets are not created or updated. + + * If `false`, the uploaded assets are stored and the function is created/updated + in `registered` state. Asset validation errors are only returned as warning, + and stored as `failureReason` on the function entity. Use an _asset update_ + or _rebuild_ to initiate a build and deploy at a later stage.' + - schema: + type: boolean + default: false + in: query + name: chown + required: false + description: If set, ownership of the draft function is transferred to the + current user. - schema: type: string in: query name: comment required: false description: An optional user-specified comment corresponding to the operation. + - schema: + type: string + in: query + name: author + required: false + description: Optionally changes the author metadata when updating a function. - schema: type: boolean default: true @@ -14012,14 +13869,6 @@ paths: the required job actions asynchronously and return a 202 Accepted response. If false the request will block until the job actions are completed, or a timeout occurs. - - schema: - type: boolean - default: false - in: query - name: chown - required: true - description: If set, ownership of the draft function is transferred to the - current user. - schema: type: string in: path @@ -14052,25 +13901,45 @@ paths: application/json: schema: $ref: '#/components/schemas/IPostModelJobAsyncResponseV2' + '403': + description: Default Response + content: + application/json: + schema: + $ref: '#/components/schemas/IRegistryErrorResponse' security: *id001 /registry/v2/models/{name}/versions/{version}/publish: post: - operationId: publish_model_functions + operationId: publish_models summary: Publish Draft Model tags: - - Model Functions + - Models description: "Mark the model to be ready and stable, taking it out\ \ of draft mode.,\n\n Typically, the model should be in the running\ \ status, \n such that publishing becomes a simple operation where the existing\ \ deployment can be re-used.\n In other statuses, plug-registry may need\ \ to initiate a new build and deployment procedure.\n " parameters: + - schema: + type: boolean + default: false + in: query + name: chown + required: false + description: If set, ownership of the draft function is transferred to the + current user. - schema: type: string in: query name: comment required: false description: An optional user-specified comment corresponding to the operation. + - schema: + type: string + in: query + name: author + required: false + description: Optionally changes the author metadata when updating a function. - schema: $ref: '#/components/schemas/DeprecatePreviousPolicy' default: patch @@ -14120,10 +13989,10 @@ paths: security: *id001 /registry/v2/models/{name}/versions/{version}/metadata: patch: - operationId: patchMetadata_model_functions + operationId: patchMetadata_models summary: Patch Model Metadata tags: - - Model Functions + - Models description: Patch the metadata of a model version. requestBody: content: @@ -14160,10 +14029,10 @@ paths: security: *id001 /registry/v2/models/{name}/versions/{version}/jobs: get: - operationId: jobs_model_functions + operationId: jobs_models summary: List Model Jobs tags: - - Model Functions + - Models description: List the ongoing and completed operations on a model. parameters: - schema: @@ -14233,12 +14102,20 @@ paths: security: *id001 /registry/v2/models/{name}/versions/{version}/rebuild: post: - operationId: rebuild_model_functions + operationId: rebuild_models summary: Rebuild Model tags: - - Model Functions + - Models description: Rebuild and deploy a model with the original or updated base image. parameters: + - schema: + type: boolean + in: query + name: scaleToZero + required: false + description: Indicates whether the function needs to be scaled down after + successful verification. If not set, the function is scaled to zero only + if it was not active before this command. - schema: type: string in: query @@ -14297,14 +14174,6 @@ paths: * running jobs on entity * the `dryRun` option' - - schema: - type: boolean - in: query - name: scaleToZero - required: false - description: Indicates whether the function needs to be scaled down after - successful (re-)deployment. If not set, the function is scaled to zero only - if it was not active before this command. - schema: type: boolean in: query @@ -14341,18 +14210,20 @@ paths: security: *id001 /registry/v2/models/{name}/versions/{version}/verify: post: - operationId: verify_model_functions + operationId: verify_models summary: Verify Health Of Model tags: - - Model Functions + - Models description: Verify health of model deployed on openfaas. parameters: - schema: - type: string + type: boolean in: query - name: comment + name: scaleToZero required: false - description: An optional user-specified comment corresponding to the operation. + description: Indicates whether the function needs to be scaled down after + successful verification. If not set, the function is scaled to zero only + if it was not active before this command. - schema: type: boolean default: true @@ -14363,14 +14234,6 @@ paths: the required job actions asynchronously and return a 202 Accepted response. If false the request will block until the job actions are completed, or a timeout occurs. - - schema: - type: boolean - in: query - name: scaleToZero - required: false - description: Indicates whether the function needs to be scaled down after - successful verification. If not set, the function is scaled to zero only - if it was not active before this command. - schema: type: string in: path @@ -14400,15 +14263,28 @@ paths: description: Model Verification Initiated security: *id001 tags: +- name: Models + description: BYOML Models are functions that wrap a machine learning model. + externalDocs: + url: https://docs-staging.waylay.io/#/features/byoml/ + description: Waylay Documentation +- name: Plugs + description: Plugs are functions that can be used in the rule engine. +- name: Webscripts + description: Webscripts are functions that are securely exposed to an http endpoint. - name: Jobs description: Jobs represent the ongoing asynchronous operations in the function registry. - name: Runtimes description: "Runtimes are the available base infrastructure for functions, and\ \ define how \n the plug gets build and deployed." +- name: Schemas + description: Schemas referenced in the API. +- name: About + description: Version and Health information. externalDocs: - url: https://docs.waylay.io/#/api/registry/ + url: https://docs-staging.waylay.io/#/api/registry/ description: Waylay Documentation servers: -- url: https://api.waylay.io - description: Waylay enterprise gateway +- url: https://api-aws-dev.waylay.io + description: Waylay staging gateway diff --git a/openapi/registry.transformed.openapi.yaml b/openapi/registry.transformed.openapi.yaml index 71bba365..849e958e 100644 --- a/openapi/registry.transformed.openapi.yaml +++ b/openapi/registry.transformed.openapi.yaml @@ -1,7 +1,7 @@ openapi: 3.0.3 info: title: Waylay Function Registry - version: 2.12.4 + version: 2.13.0 x-visibility: stable description: >- V2 API to build and deploy Waylay functions (plugs, webscripts, BYOML @@ -48,7 +48,7 @@ components: - batch - scale - cleanup - - other + - notify JobEventsFilterQuery: type: object properties: @@ -110,81 +110,6 @@ components: description: >- The policy to select a new runtime version when a rebuild is issued. - RebuildQueryParams: - type: object - properties: - upgrade: - $ref: '#/components/schemas/RebuildPolicy' - description: >- - If set, force a rebuild with the given runtime version - selection policy.
    • same patch - version. This should only include backward compatible upgrades. -
    • minor major version. This might - include an upgrade of e.g. the language runtime and/or provided - dependencies that could break compatiblity with the function. .
    • -
    - dryRun: - type: boolean - description: >- - If set to true, checks whether rebuild jobs are needed, - but do not start any jobs. - forceVersion: - $ref: '#/components/schemas/SemanticVersion' - description: >- - If set, force a rebuild with the given runtime version (including - downgrades). This parameter is mutually exclusive to the `upgrade` - parameter. - ignoreChecks: - type: boolean - description: >- - If set to true, checks that normally prevent a rebuild are - overriden. These checks include: - - * function state in `pending`, `running`, `failed` or `undeployed` - - * backoff period due to recent failures - - * usage of deprecated dependencies - - * running jobs on entity - - * the `dryRun` option - scaleToZero: - type: boolean - description: >- - Indicates whether the function needs to be scaled down after - successful (re-)deployment. If not set, the function is scaled to - zero only if it was not active before this command. - skipRebuild: - type: boolean - description: >- - If set, the function will not be rebuild. Always uses the current - runtime version when re-deploying/re-verifying the function. - additionalProperties: false - LimitQuery: - type: object - properties: - limit: - type: number - description: >- - The maximum number of items to be return from this query. Has a - deployment-defined default and maximum value. - minimum: 0 - additionalProperties: false - PagingQuery: - type: object - properties: - limit: - type: number - description: >- - The maximum number of items to be return from this query. Has a - deployment-defined default and maximum value. - minimum: 0 - page: - type: number - description: The number of pages to skip when returning result to this query. - minimum: 0 - additionalProperties: false StatusInclude: type: string enum: @@ -200,6 +125,15 @@ components: example: running StatusExclude: type: string + enum: + - registered- + - running- + - pending- + - deployed- + - unhealthy- + - failed- + - undeploying- + - undeployed- description: >- Any status value with a `-` postfix appended, excludes that status as a filter. @@ -217,170 +151,6 @@ components: - $ref: '#/components/schemas/StatusExclude' - $ref: '#/components/schemas/StatusAny' description: Inclusion or exclusion filter on the `status` property. - FunctionEntityQuery: - type: object - properties: - name: - type: string - description: >- - Filter on the name of the function. This is case-insensitive and - supports wild-cards `?` (any one character) and `*` (any sequence of - characters). - archiveFormat: - type: array - items: - $ref: '#/components/schemas/ArchiveFormat' - description: Filter on the archive format of the function. - runtime: - type: array - items: - $ref: '#/components/schemas/Runtime' - description: Filter on the runtime of the function. - additionalProperties: false - description: >- - Filter on function attributes that do not change across function - versions. - ArchiveFormat: - type: string - enum: - - node - - python - - golang - - byoml - - native - Runtime: - type: string - FunctionVersionQuery: - type: object - properties: - version: - type: string - description: >- - Filter on the version of the function (case-sensitive, supports - wildcards). - status: - type: array - items: - $ref: '#/components/schemas/StatusFilter' - description: >- - Filter on the status of the plug. Filter values with a `-` postfix - exclude the status. Use the `any` filter value to include all - states. When not specified, a default `undeployed-` filter excludes - _undeployed_ functions. - runtimeVersion: - $ref: '#/components/schemas/SemanticVersionRange' - description: Filter on the runtime version. - createdBy: - type: string - description: >- - Filter on the user that create the plug. You can use the `@me` token - to indicate your own plugs. - example: '@me' - updatedBy: - type: string - description: >- - Filter on the user that last updated the plug. You can use the `@me` - token to indicate your own plugs. - example: '@me' - createdBefore: - $ref: '#/components/schemas/TimestampSpec' - description: >- - Filter on funtions that were created before the given timestamp or - age. - createdAfter: - $ref: '#/components/schemas/TimestampSpec' - description: >- - Filter on funtions that were created after the given timestamp or - age. - updatedBefore: - $ref: '#/components/schemas/TimestampSpec' - description: >- - Filter on funtions that were updated before the given timestamp or - age. - updatedAfter: - $ref: '#/components/schemas/TimestampSpec' - description: >- - Filter on funtions that were updated after the given timestamp or - age. - additionalProperties: false - description: >- - Filter on function attributes that can change across function versions. - When these query parameters are used, the query is considered a - _function version_ listing and no HAL links to latest (_draft_, - _published_) versions are included. - SemanticVersionRange: - anyOf: - - type: string - - $ref: '#/components/schemas/SemanticVersion' - description: A range of semantic versions. See https://devhints.io/semver - TimestampSpec: - anyOf: - - $ref: '#/components/schemas/TimestampAge' - - $ref: '#/components/schemas/TimestampAbsolute' - description: A timestamp specification. - TimestampAge: - anyOf: - - $ref: '#/components/schemas/SO8601Period' - - $ref: '#/components/schemas/DurationSpec' - description: A timestamp expressed as a age relative to now - SO8601Period: - type: string - description: An ISO8601 period expression - pattern: P(\d+Y)?(\d+M)?(\d+D)?(T(\d+H)?(\d+M)?(\d+(\.\d+)S))? - format: duration - DurationSpec: - type: string - description: >- - An duration expression. A numeric value without unit is interpreted as - milliseconds. - pattern: \d+([ybwdhms])? - TimestampAbsolute: - anyOf: - - $ref: '#/components/schemas/SO8601DateTime' - - $ref: '#/components/schemas/SO8601Date' - description: An absolute timestamp as an ISO8601 string - SO8601DateTime: - type: string - description: An ISO8601 date-time expression. - pattern: \d{4}-\d{2}-\d{2}[T ]\d{2}:\d{2}(:\d{2})?(Z|([+-]\d\d:\d\d))? - format: date-time - SO8601Date: - type: string - description: An ISO8601 date expression. - pattern: \d{4}-\d{2}-\d{2}(Z|([+-]\d\d:\d\d))? - format: date - DeprecatedDraftFilter: - type: object - properties: - deprecated: - type: boolean - description: Filter on the deprecation status of the function. - draft: - type: boolean - description: Filter on the draft status of the function. - additionalProperties: false - DeployAttributesFilter: - type: object - properties: - endpoint: - type: string - description: >- - Filter on the openfaas endpoint. This is case-insensitive and - supports wild-cards `?` (any one character) and `*` (any sequence of - characters). - imageName: - type: string - description: >- - Filter on the container image name. This is case-insensitive and - supports wild-cards `?` (any one character) and `*` (any sequence of - characters). - storageLocation: - type: string - description: >- - Filter on the storageLocation. This is case-insensitive and supports - wild-cards `?` (any one character) and `*` (any sequence of - characters). - additionalProperties: false VersionIncludes: type: object properties: @@ -401,26 +171,27 @@ components: deprecated versions are **included**. If set to `false`, deprecated versions are **excluded**. additionalProperties: false - NamedVersionsFilter: - type: object - properties: - nameVersion: - type: array - items: - $ref: '#/components/schemas/NamedVersion' - description: >- - Filter on exact `{name}@{version}` functions. Using this filter - implies a `latest=false` default, returning multiple versions of the - same named versions if they are filtered. - additionalProperties: false - NamedVersion: + ShowRelatedType: type: string - description: A function reference represented by `name@version`. - pattern: ^.*@(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)$ + enum: + - embed + - link + - none LatestFunctionsQuery: type: object additionalProperties: false properties: + showRelated: + $ref: '#/components/schemas/ShowRelatedType' + description: >- + Sets the representation of related function versions (like the + _latest_ draft and/or published) in the response. + + - `embed`: as full summary representation (in `_embedded`). + + - `link`: as HAL link in (in `_links`). + + - `none`: omitted. limit: type: number description: >- @@ -467,206 +238,18 @@ components: Request to list latest function versions per named function. A request that only uses these query parameters will include links to the _latest_ draft/published versions. - LatestFunctionVersionsQuery: - type: object - properties: - limit: - type: number - description: >- - The maximum number of items to be return from this query. Has a - deployment-defined default and maximum value. - minimum: 0 - page: - type: number - description: The number of pages to skip when returning result to this query. - minimum: 0 - includeDraft: - type: boolean - description: >- - Configures the inclusion of _draft_ versions when selecting latest - versions per name. By default, draft versions are only considered - when no other versions are available. If set to `true`, draft - versions are **included**. If set to `false`, draft versions are - **excluded**. - includeDeprecated: - type: boolean - description: >- - Configures the inclusion of _deprecated_ versions when selecting - latest versions per name. By default, deprecated versions are only - considered when no other versions are available. If set to `true`, - deprecated versions are **included**. If set to `false`, deprecated - versions are **excluded**. - deprecated: - type: boolean - description: Filter on the deprecation status of the function. - draft: - type: boolean - description: Filter on the draft status of the function. - nameVersion: - type: array - items: - $ref: '#/components/schemas/NamedVersion' - description: >- - Filter on exact `{name}@{version}` functions. Using this filter - implies a `latest=false` default, returning multiple versions of the - same named versions if they are filtered. - version: - type: string - description: >- - Filter on the version of the function (case-sensitive, supports - wildcards). - status: - type: array - items: - $ref: '#/components/schemas/StatusFilter' - description: >- - Filter on the status of the plug. Filter values with a `-` postfix - exclude the status. Use the `any` filter value to include all - states. When not specified, a default `undeployed-` filter excludes - _undeployed_ functions. - runtimeVersion: - $ref: '#/components/schemas/SemanticVersionRange' - description: Filter on the runtime version. - createdBy: - type: string - description: >- - Filter on the user that create the plug. You can use the `@me` token - to indicate your own plugs. - example: '@me' - updatedBy: - type: string - description: >- - Filter on the user that last updated the plug. You can use the `@me` - token to indicate your own plugs. - example: '@me' - createdBefore: - $ref: '#/components/schemas/TimestampSpec' - description: >- - Filter on funtions that were created before the given timestamp or - age. - createdAfter: - $ref: '#/components/schemas/TimestampSpec' - description: >- - Filter on funtions that were created after the given timestamp or - age. - updatedBefore: - $ref: '#/components/schemas/TimestampSpec' - description: >- - Filter on funtions that were updated before the given timestamp or - age. - updatedAfter: - $ref: '#/components/schemas/TimestampSpec' - description: >- - Filter on funtions that were updated after the given timestamp or - age. - name: - type: string - description: >- - Filter on the name of the function. This is case-insensitive and - supports wild-cards `?` (any one character) and `*` (any sequence of - characters). - archiveFormat: - type: array - items: - $ref: '#/components/schemas/ArchiveFormat' - description: Filter on the archive format of the function. - runtime: - type: array - items: - $ref: '#/components/schemas/Runtime' - description: Filter on the runtime of the function. - latest: - type: boolean - description: >- - When `true`, only the latest version per function name is returned. - If set to `false`, multiple versions per named function can be - returned. Defaults to `true`, except when specific versions are - selected with the `nameVersion` filter. - additionalProperties: false - description: Latest function versions listing query. - NamedFunctionVersionsQuery: - type: object - additionalProperties: false - properties: - limit: - type: number - description: >- - The maximum number of items to be return from this query. Has a - deployment-defined default and maximum value. - minimum: 0 - page: - type: number - description: The number of pages to skip when returning result to this query. - minimum: 0 - deprecated: - type: boolean - description: Filter on the deprecation status of the function. - draft: - type: boolean - description: Filter on the draft status of the function. - version: - type: string - description: >- - Filter on the version of the function (case-sensitive, supports - wildcards). - status: - type: array - items: - $ref: '#/components/schemas/StatusFilter' - description: >- - Filter on the status of the plug. Filter values with a `-` postfix - exclude the status. Use the `any` filter value to include all - states. When not specified, a default `undeployed-` filter excludes - _undeployed_ functions. - runtimeVersion: - $ref: '#/components/schemas/SemanticVersionRange' - description: Filter on the runtime version. - createdBy: - type: string - description: >- - Filter on the user that create the plug. You can use the `@me` token - to indicate your own plugs. - example: '@me' - updatedBy: - type: string - description: >- - Filter on the user that last updated the plug. You can use the `@me` - token to indicate your own plugs. - example: '@me' - createdBefore: - $ref: '#/components/schemas/TimestampSpec' - description: >- - Filter on funtions that were created before the given timestamp or - age. - createdAfter: - $ref: '#/components/schemas/TimestampSpec' - description: >- - Filter on funtions that were created after the given timestamp or - age. - updatedBefore: - $ref: '#/components/schemas/TimestampSpec' - description: >- - Filter on funtions that were updated before the given timestamp or - age. - updatedAfter: - $ref: '#/components/schemas/TimestampSpec' - description: >- - Filter on funtions that were updated after the given timestamp or - age. - archiveFormat: - type: array - items: - $ref: '#/components/schemas/ArchiveFormat' - description: Filter on the archive format of the function. - runtime: - type: array - items: - $ref: '#/components/schemas/Runtime' - description: Filter on the runtime of the function. - description: Named function versions listing query. - VersionsQuery: + ArchiveFormat: + type: string + enum: + - node + - python + - golang + - byoml + - native + Runtime: + type: string + LatestFunctionVersionsQuery: type: object - additionalProperties: false properties: limit: type: number @@ -678,24 +261,22 @@ components: type: number description: The number of pages to skip when returning result to this query. minimum: 0 - endpoint: - type: string - description: >- - Filter on the openfaas endpoint. This is case-insensitive and - supports wild-cards `?` (any one character) and `*` (any sequence of - characters). - imageName: - type: string + includeDraft: + type: boolean description: >- - Filter on the container image name. This is case-insensitive and - supports wild-cards `?` (any one character) and `*` (any sequence of - characters). - storageLocation: - type: string + Configures the inclusion of _draft_ versions when selecting latest + versions per name. By default, draft versions are only considered + when no other versions are available. If set to `true`, draft + versions are **included**. If set to `false`, draft versions are + **excluded**. + includeDeprecated: + type: boolean description: >- - Filter on the storageLocation. This is case-insensitive and supports - wild-cards `?` (any one character) and `*` (any sequence of - characters). + Configures the inclusion of _deprecated_ versions when selecting + latest versions per name. By default, deprecated versions are only + considered when no other versions are available. If set to `true`, + deprecated versions are **included**. If set to `false`, deprecated + versions are **excluded**. deprecated: type: boolean description: Filter on the deprecation status of the function. @@ -775,20 +356,64 @@ components: items: $ref: '#/components/schemas/Runtime' description: Filter on the runtime of the function. - description: Function versions paged query - PlugTypeQuery: - type: object - properties: - type: - $ref: '#/components/schemas/PlugType' - description: If set, filters on the type of plug. + latest: + type: boolean + description: >- + When `true`, only the latest version per function name is returned. + If set to `false`, multiple versions per named function can be + returned. Defaults to `true`, except when specific versions are + selected with the `nameVersion` filter. + showRelated: + type: string + enum: + - none additionalProperties: false - PlugType: + description: Latest function versions listing query. + SemanticVersionRange: + anyOf: + - type: string + - $ref: '#/components/schemas/SemanticVersion' + description: A range of semantic versions. See https://devhints.io/semver + TimestampSpec: + anyOf: + - $ref: '#/components/schemas/TimestampAge' + - $ref: '#/components/schemas/TimestampAbsolute' + description: A timestamp specification. + TimestampAge: + anyOf: + - $ref: '#/components/schemas/SO8601Period' + - $ref: '#/components/schemas/DurationSpec' + description: A timestamp expressed as a age relative to now + SO8601Period: type: string - enum: - - sensor - - actuator - - transformer + description: An ISO8601 period expression + pattern: P(\d+Y)?(\d+M)?(\d+D)?(T(\d+H)?(\d+M)?(\d+(\.\d+)S))? + format: duration + DurationSpec: + type: string + description: >- + An duration expression. A numeric value without unit is interpreted as + milliseconds. + pattern: \d+([ybwdhms])? + TimestampAbsolute: + anyOf: + - $ref: '#/components/schemas/SO8601DateTime' + - $ref: '#/components/schemas/SO8601Date' + description: An absolute timestamp as an ISO8601 string + SO8601DateTime: + type: string + description: An ISO8601 date-time expression. + pattern: \d{4}-\d{2}-\d{2}[T ]\d{2}:\d{2}(:\d{2})?(Z|([+-]\d\d:\d\d))? + format: date-time + SO8601Date: + type: string + description: An ISO8601 date expression. + pattern: \d{4}-\d{2}-\d{2}(Z|([+-]\d\d:\d\d))? + format: date + NamedVersion: + type: string + description: A function version reference represented as `@`. + pattern: ^[^@]*@(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)$ LatestPlugsQuery: type: object additionalProperties: false @@ -796,6 +421,17 @@ components: type: $ref: '#/components/schemas/PlugType' description: If set, filters on the type of plug. + showRelated: + $ref: '#/components/schemas/ShowRelatedType' + description: >- + Sets the representation of related function versions (like the + _latest_ draft and/or published) in the response. + + - `embed`: as full summary representation (in `_embedded`). + + - `link`: as HAL link in (in `_links`). + + - `none`: omitted. limit: type: number description: >- @@ -842,6 +478,12 @@ components: Latest plug versions listing query with latest links. A request that only uses these query parameters will include links to the _latest_ draft/published versions of the plug. + PlugType: + type: string + enum: + - sensor + - actuator + - transformer LatestPlugVersionsQuery: type: object additionalProperties: false @@ -967,17 +609,11 @@ components: If set to `false`, multiple versions per named function can be returned. Defaults to `true`, except when specific versions are selected with the `nameVersion` filter. + showRelated: + type: string + enum: + - none description: Plug versions listing query. - TagsQuery: - type: object - properties: - tags: - $ref: '#/components/schemas/TagsFilter' - description: >- - Filter on the tags of the item. Can be a single tag, or a list of - tags. When multiple tags are specified, an item must have all of the - tags to be selected. - additionalProperties: false TagsFilter: anyOf: - type: array @@ -1000,47 +636,6 @@ components: match. example: '#4153ea' additionalProperties: false - FunctionDeleteQuery: - type: object - properties: - force: - type: boolean - description: >- - If true, the function version will be immediately - undeployed and removed. - - - Otherwise, the removal will be delayed to allow current invocations - to end. During that period, the function is marked _deprecated_. - undeploy: - type: boolean - description: >- - If `true`, the `DELETE` operation - - * undeploys the (openfaas) function: it becomes no longer available - for invocation. - - * does NOT remove the function from registry: it stays in an - `undeployed` status. All assets and definitions are retained, so - the version can be restored later with a _rebuild_ action. - - - If `false`, the `DELETE` operation - - * _only_ marks the plug function as _deprecated_, the function - remains active but is removed from the default listings. This also - applies to _draft_ versions. - - - This parameter is incompatible with `force=true`. - - - If not set the default behaviour applies: - - * _draft_ versions are _undeployed_ and _removed_ from registry. - - * non-_draft_ versions are marked _deprecated_ only. - additionalProperties: false PlugDeleteForceQuery: type: object properties: @@ -1051,44 +646,6 @@ components: removed. Otherwise, the plug version(s) will only be deprecated, i.e removed from regular listings. additionalProperties: false - PlugDeleteQuery: - type: object - properties: - force: - type: boolean - description: >- - If true, the plug version(s) will be undeployed and - removed. Otherwise, the plug version(s) will only be - deprecated, i.e removed from regular listings. - undeploy: - type: boolean - description: >- - If `true`, the `DELETE` operation - - * undeploys the (openfaas) function for the plug: it becomes no - longer available for invocation. - - * does NOT remove the plug from registry: it stays in an - `undeployed` status. All assets and definitions are retained, so - the plug can be restored later with a _rebuild_ action. - - - If `false`, the `DELETE` operation - - * _only_ marks the plug version(s) as _deprecated_: the plug remains - active but is removed from the default listings. This also applies - to _draft_ versions. - - - This parameter is incompatible with `force=true`. - - - If not set the default behaviour applies: - - * _draft_ versions are _undeployed_ and _removed_ from registry. - - * non-_draft_ versions are marked _deprecated_ only. - additionalProperties: false AsyncQueryDefaultFalse: type: object properties: @@ -1101,99 +658,24 @@ components: the job actions are completed, or a timeout occurs. default: false additionalProperties: false - AsyncQueryDefaultTrue: - type: object - properties: - async: - type: boolean - description: >- - Unless this is set to false, the server will start the - required job actions asynchronously and return a 202 - Accepted response. If false the request will - block until the job actions are completed, or a timeout occurs. - default: true - additionalProperties: false AsyncVerifyQuery: type: object + additionalProperties: false properties: - comment: - type: string - description: An optional user-specified comment corresponding to the operation. - async: - type: boolean - description: >- - Unless this is set to false, the server will start the - required job actions asynchronously and return a 202 - Accepted response. If false the request will - block until the job actions are completed, or a timeout occurs. - default: true scaleToZero: type: boolean description: >- Indicates whether the function needs to be scaled down after successful verification. If not set, the function is scaled to zero only if it was not active before this command. - additionalProperties: false - UpdateComment: - type: object - properties: - comment: - type: string - description: An optional user-specified comment corresponding to the operation. - AsyncDeployQuery: - type: object - properties: - deprecatePrevious: - $ref: '#/components/schemas/DeprecatePreviousPolicy' - description: >- - Set the cleanup policy used to automatically deprecate/delete - previous versions. - dryRun: - type: boolean - description: >- - If set to true, validates the deployment conditions, - but does not change anything. async: type: boolean description: >- - Unless this is set to false, the server will start the - required job actions asynchronously and return a 202 - Accepted response. If false the request will - block until the job actions are completed, or a timeout occurs. - default: true - scaleToZero: - type: boolean - description: >- - If set to true, after successful deployment, the - deployed function will be scaled to zero. Saves computing resources - when the function is not to be used immediately. - default: false - additionalProperties: false - DryRunQuery: - type: object - properties: - dryRun: - type: boolean - description: >- - If set to true, validates the deployment conditions, - but does not change anything. - additionalProperties: false - DeprecatePreviousQuery: - type: object - properties: - deprecatePrevious: - $ref: '#/components/schemas/DeprecatePreviousPolicy' - description: >- - Set the cleanup policy used to automatically deprecate/delete - previous versions. - additionalProperties: false - DeprecatePreviousPolicy: - type: string - enum: - - none - - all - - patch - - minor + Unless this is set to false, the server will start the + required job actions asynchronously and return a 202 + Accepted response. If false the request will + block until the job actions are completed, or a timeout occurs. + default: true JobQuery: type: object properties: @@ -1233,6 +715,7 @@ components: - $ref: '#/components/schemas/JobTypeUndeploy' - $ref: '#/components/schemas/JobTypeScale' - $ref: '#/components/schemas/JobTypeBatch' + - $ref: '#/components/schemas/JobTypeNotify' JobTypeBuild: type: string description: Build @@ -1265,6 +748,11 @@ components: description: A job that groups other jobs as a parent. enum: - batch + JobTypeNotify: + type: string + description: A job to notify that an function version has changed. + enum: + - notify JobStateResult: anyOf: - $ref: '#/components/schemas/JobState' @@ -2106,7 +1594,14 @@ components: description: Webscript named versions listing query. RebuildQueryV2: type: object + additionalProperties: false properties: + scaleToZero: + type: boolean + description: >- + Indicates whether the function needs to be scaled down after + successful verification. If not set, the function is scaled to zero + only if it was not active before this command. comment: type: string description: An optional user-specified comment corresponding to the operation. @@ -2154,18 +1649,11 @@ components: * running jobs on entity * the `dryRun` option - scaleToZero: - type: boolean - description: >- - Indicates whether the function needs to be scaled down after - successful (re-)deployment. If not set, the function is scaled to - zero only if it was not active before this command. skipRebuild: type: boolean description: >- If set, the function will not be rebuild. Always uses the current runtime version when re-deploying/re-verifying the function. - additionalProperties: false RemovePlugQueryV2: type: object additionalProperties: false @@ -2421,9 +1909,62 @@ components: - deployed - unhealthy additionalProperties: false + RequestDeployQuery: + type: object + properties: + deploy: + type: boolean + description: >- + Indicates that a function should be _deployed_ when its assets are + valid. + + + * If `true` (default), jobs to build and deploy the function will be + initiated after it is checked that the assets are valid. Invalid + assets lead to a validation error, and the function and its assets + are not created or updated. + + * If `false`, the uploaded assets are stored and the function is + created/updated in `registered` state. Asset validation errors are + only returned as warning, and stored as `failureReason` on the + function entity. Use an _asset update_ or _rebuild_ to initiate a + build and deploy at a later stage. + default: true + additionalProperties: false CreateFunctionQueryV2: type: object properties: + deploy: + type: boolean + description: >- + Indicates that a function should be _deployed_ when its assets are + valid. + + + * If `true` (default), jobs to build and deploy the function will be + initiated after it is checked that the assets are valid. Invalid + assets lead to a validation error, and the function and its assets + are not created or updated. + + * If `false`, the uploaded assets are stored and the function is + created/updated in `registered` state. Asset validation errors are + only returned as warning, and stored as `failureReason` on the + function entity. Use an _asset update_ or _rebuild_ to initiate a + build and deploy at a later stage. + default: true + author: + type: string + description: Optionally changes the author metadata when updating a function. + comment: + type: string + description: An optional user-specified comment corresponding to the operation. + scaleToZero: + type: boolean + description: >- + If set to true, after successful deployment, the + deployed function will be scaled to zero. This saves computing + resources when the function is not to be used immediately. + default: false deprecatePrevious: $ref: '#/components/schemas/DeprecatePreviousPolicy' description: >- @@ -2442,13 +1983,6 @@ components: Accepted response. If false the request will block until the job actions are completed, or a timeout occurs. default: true - scaleToZero: - type: boolean - description: >- - If set to true, after successful deployment, the - deployed function will be scaled to zero. Saves computing resources - when the function is not to be used immediately. - default: false version: $ref: '#/components/schemas/SemanticVersionRange' description: >- @@ -2468,14 +2002,133 @@ components: are still mutable. A build and deploy is initiated only in the case when all necessary assets are present and valid. default: false + runtime: + $ref: '#/components/schemas/NamedVersionRange' + description: >- + If set, the created function will use the indicated runtime (latest + version within specified range). + + + This takes precedence over the runtime specified in a function + manifest (copied or from request body). + copy: + anyOf: + - $ref: '#/components/schemas/NamedVersionRange' + - $ref: '#/components/schemas/ExampleReference' + description: >- + Indicates the _source_ of initial assets for a _new function_. + + + When using this query parameter, the request body does not need to + contain assets, but any assets in the request body will overwrite + the copied assets. + + + #### Selection of _assets_ source + + + * If set as `[@]`, the _new + function_ will be created with copied assets of the selected _source + function_. + + * If set as `!example`, a `runtime` query parameter is required, and + the _new function_ will be initialized with assets of the _runtime + example_. + + + #### Selection of the _source function_ + + + When `` is a range (or is not given), the latest + _published_ version (in that range) is used. + + + If no _published_ version exists, the latest _draft_ is selected. + + + If no versions in the range exist, a `404` _Not Found_ error is + returned. + + + #### The `name` of the _new function_ + + + If a `name` is NOT specified (either as query parameter, or in an + optional manifest asset in the request body), the `name` of the _new + function_ will be that of the _source function_. + + + #### The `version` of the _new function_ + + + When the _target_ and _source_ name are equal, the `version` query + parameters is defaulted to `` + (`~` when it's an exact version) + + + The version of the _new function_ will be: + + * If a `version` is NOT specified (either as query parameter, in an + optional manifest asset, or as `` _default_) + + * a **patch increment** (`..+1`) of the latest **existing version** with the target `name` + + * **`1.0.0`** otherwise + + * If a `version` is specified: + + * the **lowest version** in that range **if no existing version** is in that range. + + * an **increment** of the latest existing version, **at the highest level** (_major_,_minor_,_patch_) allowed by that range. + + * otherwise, if all allowed versions already exist, a **`409` _Duplicate_ error** is raised. + + #### Deployment overrides + + + The new function will use the deployment overrides of the copied + function, unless a _manifest_ was specified in the request body. additionalProperties: false + DeprecatePreviousPolicy: + type: string + enum: + - none + - all + - patch + - minor + NamedVersionRange: + type: string + description: >- + A name reference with optional version range: `[@]`. + + + References (a version range of) a named and versioned entity like + _function_ or _runtime_. + pattern: ^[^@]*(@.*)?$ + ExampleReference: + type: string + description: |- + Example reference. + + References the example assets from the selected runtime. + enum: + - '!example' PublishFunctionQuery: type: object additionalProperties: false properties: + chown: + type: boolean + description: >- + If set, ownership of the draft function is transferred to the + current user. + default: false comment: type: string description: An optional user-specified comment corresponding to the operation. + author: + type: string + description: Optionally changes the author metadata when updating a function. deprecatePrevious: $ref: '#/components/schemas/DeprecatePreviousPolicy' description: >- @@ -2537,10 +2190,45 @@ components: additionalProperties: false UpdateDraftQuery: type: object + additionalProperties: false properties: + scaleToZero: + type: boolean + description: >- + If set to true, after successful deployment, the + deployed function will be scaled to zero. This saves computing + resources when the function is not to be used immediately. + default: false + deploy: + type: boolean + description: >- + Indicates that a function should be _deployed_ when its assets are + valid. + + + * If `true` (default), jobs to build and deploy the function will be + initiated after it is checked that the assets are valid. Invalid + assets lead to a validation error, and the function and its assets + are not created or updated. + + * If `false`, the uploaded assets are stored and the function is + created/updated in `registered` state. Asset validation errors are + only returned as warning, and stored as `failureReason` on the + function entity. Use an _asset update_ or _rebuild_ to initiate a + build and deploy at a later stage. + default: true + chown: + type: boolean + description: >- + If set, ownership of the draft function is transferred to the + current user. + default: false comment: type: string description: An optional user-specified comment corresponding to the operation. + author: + type: string + description: Optionally changes the author metadata when updating a function. async: type: boolean description: >- @@ -2549,15 +2237,6 @@ components: Accepted response. If false the request will block until the job actions are completed, or a timeout occurs. default: true - chown: - type: boolean - description: >- - If set, ownership of the draft function is transferred to the - current user. - default: false - required: - - chown - additionalProperties: false LatestPlugQuery: type: object properties: @@ -3874,13 +3553,6 @@ components: type: object additionalProperties: false properties: - scaleToZero: - type: boolean - description: >- - If set to true, after successful deployment, the - deployed function will be scaled to zero. Saves computing resources - when the function is not to be used immediately. - default: false async: type: boolean description: >- @@ -3894,6 +3566,13 @@ components: description: >- If set to true, validates the deployment conditions, but does not change anything. + scaleToZero: + type: boolean + description: >- + If set to true, after successful deployment, the + deployed function will be scaled to zero. This saves computing + resources when the function is not to be used immediately. + default: false MessageResponse: type: object properties: @@ -3908,6 +3587,23 @@ components: type: string required: - error + RegistryErrorResponse: + type: object + properties: + error: + type: string + code: + type: string + statusCode: + type: number + data: + type: object + additionalProperties: + type: string + required: + - code + - error + - statusCode Operation: type: object properties: @@ -5377,107 +5073,124 @@ components: count: type: number description: >- - The total count of matching items, from which this result is one - page. - page: - type: number - description: The page number of a paged query result. - entities: - type: array - items: - type: object - properties: - _links: - $ref: '#/components/schemas/AltVersionHALLink' - createdBy: - type: string - description: The user that created this entity. - createdAt: - type: string - format: date-time - description: The timestamp at which this entity was created. - updatedBy: - type: string - description: The user that last updated this entity. - updatedAt: - type: string - format: date-time - description: The timestamp at which this entity was last updated. - updates: - type: array - items: - $ref: '#/components/schemas/UpdateRecord' - description: >- - The audit logs corresponding to the latest modifying - operations on this entity. - status: - $ref: '#/components/schemas/Status' - description: The current status of this function entity. - failureReason: - $ref: '#/components/schemas/FailureReason' - description: >- - A description of the last failure related to this function - entity. - runtime: - $ref: '#/components/schemas/RuntimeAttributes' - description: >- - Information about the current runtime used by this function - deployment. - deprecated: - type: boolean - description: >- - If true this plug is removed from regular - listings, as a result of a DELETE with - force=false. - draft: - type: boolean - description: >- - If true this function is a draft function and - it's assets are still mutable. - plug: - $ref: '#/components/schemas/PlugManifest' - description: >- - The plug specification as provided by the - plug.json asset. - required: - - _links - - createdAt - - createdBy - - deprecated - - draft - - plug - - runtime - - status - - updatedAt - - updatedBy - - updates - description: The specification and deployment status of the queried functions + The total count of matching items, from which this result is one + page. + page: + type: number + description: The page number of a paged query result. + entities: + type: array + items: + $ref: '#/components/schemas/EntityWithLinks_IPlugResponseV2_' + description: The specification and deployment status of the queried functions + required: + - count + - entities + description: Plugs Found + WithPaging: + type: object + properties: + limit: + type: number + description: The page size used for this query result. + count: + type: number + description: >- + The total count of matching items, from which this result is one + page. + page: + type: number + description: The page number of a paged query result. + required: + - count + WithLimit: + type: object + properties: + limit: + type: number + description: The page size used for this query result. + EntityWithLinks_IPlugResponseV2_: + type: object + properties: + _embedded: + $ref: '#/components/schemas/AltEmbeddedVersion_IPlugResponseV2_' + description: Embedded representations of the _latest_ draft/published versions. + _links: + $ref: '#/components/schemas/AltVersionHALLink' + createdBy: + type: string + description: The user that created this entity. + createdAt: + type: string + format: date-time + description: The timestamp at which this entity was created. + updatedBy: + type: string + description: The user that last updated this entity. + updatedAt: + type: string + format: date-time + description: The timestamp at which this entity was last updated. + updates: + type: array + items: + $ref: '#/components/schemas/UpdateRecord' + description: >- + The audit logs corresponding to the latest modifying operations on + this entity. + status: + $ref: '#/components/schemas/Status' + description: The current status of this function entity. + failureReason: + $ref: '#/components/schemas/FailureReason' + description: A description of the last failure related to this function entity. + runtime: + $ref: '#/components/schemas/RuntimeAttributes' + description: >- + Information about the current runtime used by this function + deployment. + deprecated: + type: boolean + description: >- + If true this plug is removed from regular listings, as + a result of a DELETE with force=false. + draft: + type: boolean + description: >- + If true this function is a draft function and it's + assets are still mutable. + plug: + $ref: '#/components/schemas/PlugManifest' + description: >- + The plug specification as provided by the plug.json + asset. required: - - count - - entities - description: Plugs Found - WithPaging: + - createdAt + - createdBy + - deprecated + - draft + - plug + - runtime + - status + - updatedAt + - updatedBy + - updates + WithEmbeddedAltVersions_IPlugResponseV2_: type: object properties: - limit: - type: number - description: The page size used for this query result. - count: - type: number - description: >- - The total count of matching items, from which this result is one - page. - page: - type: number - description: The page number of a paged query result. - required: - - count - WithLimit: + _embedded: + $ref: '#/components/schemas/AltEmbeddedVersion_IPlugResponseV2_' + description: Embedded representations of the _latest_ draft/published versions. + AltEmbeddedVersion_IPlugResponseV2_: type: object properties: - limit: - type: number - description: The page size used for this query result. + draft: + $ref: '#/components/schemas/PlugResponseV2' + description: Embedded representation of the lastest draft version. + published: + $ref: '#/components/schemas/PlugResponseV2' + description: Embedded representation of the lastest published version. + description: Embedded representations of the _latest_ draft/published versions. PlugVersionsResponseV2: type: object properties: @@ -5890,6 +5603,7 @@ components: required: - args - imageName + - revision - runtimeName - runtimeVersion - storageLocation @@ -5909,6 +5623,7 @@ components: required: - runtimeName - runtimeVersion + - revision description: Job arguments shared by all function jobs BuildResult: type: object @@ -6052,6 +5767,7 @@ components: - endpoint - imageName - namespace + - revision - runtimeName - runtimeVersion description: Input argument to an (openfaas) deployment job for a function. @@ -6138,6 +5854,7 @@ components: required: - endpoint - namespace + - revision - runtimeName - runtimeVersion description: Input arguments for an (openfaas) deployment verification job. @@ -6169,6 +5886,7 @@ components: - endpoint - isNativePlug - namespace + - revision - runtimeName - runtimeVersion description: Input argument to an (openfaas) undeployment job for a function. @@ -6211,6 +5929,7 @@ components: - endpoint - namespace - replicas + - revision - runtimeName - runtimeVersion description: Input argument to an (openfaas) scale job for a function. @@ -6301,76 +6020,94 @@ components: entities: type: array items: - type: object - properties: - _links: - $ref: '#/components/schemas/AltVersionHALLink' - createdBy: - type: string - description: The user that created this entity. - createdAt: - type: string - format: date-time - description: The timestamp at which this entity was created. - updatedBy: - type: string - description: The user that last updated this entity. - updatedAt: - type: string - format: date-time - description: The timestamp at which this entity was last updated. - updates: - type: array - items: - $ref: '#/components/schemas/UpdateRecord' - description: >- - The audit logs corresponding to the latest modifying - operations on this entity. - status: - $ref: '#/components/schemas/Status' - description: The current status of this function entity. - failureReason: - $ref: '#/components/schemas/FailureReason' - description: >- - A description of the last failure related to this function - entity. - runtime: - $ref: '#/components/schemas/RuntimeAttributes' - description: >- - Information about the current runtime used by this function - deployment. - deprecated: - type: boolean - description: >- - If true this function is deprecated and removed - from regular listings. - draft: - type: boolean - description: >- - If true this function is a draft function and - it's assets are still mutable. - model: - $ref: '#/components/schemas/KFServingManifest' - description: >- - The model specification as provided by the - model.json asset. - required: - - _links - - createdAt - - createdBy - - deprecated - - draft - - model - - runtime - - status - - updatedAt - - updatedBy - - updates + $ref: '#/components/schemas/EntityWithLinks_IKfservingResponseV2_' description: The specification and deployment status of the queried functions required: - count - entities description: Models Found + EntityWithLinks_IKfservingResponseV2_: + type: object + properties: + _embedded: + $ref: '#/components/schemas/AltEmbeddedVersion_IKfservingResponseV2_' + description: Embedded representations of the _latest_ draft/published versions. + _links: + $ref: '#/components/schemas/AltVersionHALLink' + createdBy: + type: string + description: The user that created this entity. + createdAt: + type: string + format: date-time + description: The timestamp at which this entity was created. + updatedBy: + type: string + description: The user that last updated this entity. + updatedAt: + type: string + format: date-time + description: The timestamp at which this entity was last updated. + updates: + type: array + items: + $ref: '#/components/schemas/UpdateRecord' + description: >- + The audit logs corresponding to the latest modifying operations on + this entity. + status: + $ref: '#/components/schemas/Status' + description: The current status of this function entity. + failureReason: + $ref: '#/components/schemas/FailureReason' + description: A description of the last failure related to this function entity. + runtime: + $ref: '#/components/schemas/RuntimeAttributes' + description: >- + Information about the current runtime used by this function + deployment. + deprecated: + type: boolean + description: >- + If true this function is deprecated and removed from + regular listings. + draft: + type: boolean + description: >- + If true this function is a draft function and it's + assets are still mutable. + model: + $ref: '#/components/schemas/KFServingManifest' + description: >- + The model specification as provided by the model.json + asset. + required: + - createdAt + - createdBy + - deprecated + - draft + - model + - runtime + - status + - updatedAt + - updatedBy + - updates + WithEmbeddedAltVersions_IKfservingResponseV2_: + type: object + properties: + _embedded: + $ref: '#/components/schemas/AltEmbeddedVersion_IKfservingResponseV2_' + description: Embedded representations of the _latest_ draft/published versions. + AltEmbeddedVersion_IKfservingResponseV2_: + type: object + properties: + draft: + $ref: '#/components/schemas/KfservingResponseV2' + description: Embedded representation of the lastest draft version. + published: + $ref: '#/components/schemas/KfservingResponseV2' + description: Embedded representation of the lastest published version. + description: Embedded representations of the _latest_ draft/published versions. ModelVersionsResponseV2: type: object properties: @@ -6503,126 +6240,146 @@ components: additionalProperties: false description: Link to the function entity. required: - - function - - jobs - description: Model Jobs Found - GetWebscriptResponseV2: + - function + - jobs + description: Model Jobs Found + GetWebscriptResponseV2: + type: object + properties: + entity: + $ref: '#/components/schemas/WebscriptResponseV2' + description: The specification and deployment status of the function + _links: + type: object + properties: + invoke: + $ref: '#/components/schemas/HALLink' + description: HAL link to the endpoint where the webscript is exposed. + example: + href: >- + https://api-aws-dev.waylay.io/functions/v1//myWebscript + jobs: + $ref: '#/components/schemas/HALLink' + description: HAL link to all active jobs for this function (if any) + description: HAL links to related actions. + required: + - _links + - entity + description: Webscript Found + LatestWebscriptsResponseV2: + type: object + properties: + limit: + type: number + description: The page size used for this query result. + count: + type: number + description: >- + The total count of matching items, from which this result is one + page. + page: + type: number + description: The page number of a paged query result. + entities: + type: array + items: + $ref: >- + #/components/schemas/EntityWithLinks_IWebscriptResponseWithInvokeLinkV2_ + description: The specification and deployment status of the queried functions + required: + - count + - entities + description: Webscripts Found + EntityWithLinks_IWebscriptResponseWithInvokeLinkV2_: + type: object + properties: + _embedded: + $ref: >- + #/components/schemas/AltEmbeddedVersion_IWebscriptResponseWithInvokeLinkV2_ + description: Embedded representations of the _latest_ draft/published versions. + _links: + $ref: '#/components/schemas/InvokeHALLink' + description: HAL links to related actions. + createdBy: + type: string + description: The user that created this entity. + createdAt: + type: string + format: date-time + description: The timestamp at which this entity was created. + updatedBy: + type: string + description: The user that last updated this entity. + updatedAt: + type: string + format: date-time + description: The timestamp at which this entity was last updated. + updates: + type: array + items: + $ref: '#/components/schemas/UpdateRecord' + description: >- + The audit logs corresponding to the latest modifying operations on + this entity. + status: + $ref: '#/components/schemas/Status' + description: The current status of this function entity. + failureReason: + $ref: '#/components/schemas/FailureReason' + description: A description of the last failure related to this function entity. + runtime: + $ref: '#/components/schemas/RuntimeAttributes' + description: >- + Information about the current runtime used by this function + deployment. + deprecated: + type: boolean + description: >- + If true this function is deprecated and removed from + regular listings. + draft: + type: boolean + description: >- + If true this function is a draft function and it's + assets are still mutable. + webscript: + $ref: '#/components/schemas/WebscriptManifest' + description: >- + The webscript specification as provided by the + webscript.json asset. + secret: + type: string + description: >- + The secret for this webscript deployment. This is null + when allowHmac=false in the webscript specificaton. + required: + - createdAt + - createdBy + - deprecated + - draft + - runtime + - status + - updatedAt + - updatedBy + - updates + - webscript + WithEmbeddedAltVersions_IWebscriptResponseWithInvokeLinkV2_: type: object properties: - entity: - $ref: '#/components/schemas/WebscriptResponseV2' - description: The specification and deployment status of the function - _links: - type: object - properties: - invoke: - $ref: '#/components/schemas/HALLink' - description: HAL link to the endpoint where the webscript is exposed. - example: - href: >- - https://api-aws-dev.waylay.io/functions/v1//myWebscript - jobs: - $ref: '#/components/schemas/HALLink' - description: HAL link to all active jobs for this function (if any) - description: HAL links to related actions. - required: - - _links - - entity - description: Webscript Found - LatestWebscriptsResponseV2: + _embedded: + $ref: >- + #/components/schemas/AltEmbeddedVersion_IWebscriptResponseWithInvokeLinkV2_ + description: Embedded representations of the _latest_ draft/published versions. + AltEmbeddedVersion_IWebscriptResponseWithInvokeLinkV2_: type: object properties: - limit: - type: number - description: The page size used for this query result. - count: - type: number - description: >- - The total count of matching items, from which this result is one - page. - page: - type: number - description: The page number of a paged query result. - entities: - type: array - items: - type: object - properties: - _links: - $ref: '#/components/schemas/InvokeHALLink' - description: HAL links to related actions. - createdBy: - type: string - description: The user that created this entity. - createdAt: - type: string - format: date-time - description: The timestamp at which this entity was created. - updatedBy: - type: string - description: The user that last updated this entity. - updatedAt: - type: string - format: date-time - description: The timestamp at which this entity was last updated. - updates: - type: array - items: - $ref: '#/components/schemas/UpdateRecord' - description: >- - The audit logs corresponding to the latest modifying - operations on this entity. - status: - $ref: '#/components/schemas/Status' - description: The current status of this function entity. - failureReason: - $ref: '#/components/schemas/FailureReason' - description: >- - A description of the last failure related to this function - entity. - runtime: - $ref: '#/components/schemas/RuntimeAttributes' - description: >- - Information about the current runtime used by this function - deployment. - deprecated: - type: boolean - description: >- - If true this function is deprecated and removed - from regular listings. - draft: - type: boolean - description: >- - If true this function is a draft function and - it's assets are still mutable. - webscript: - $ref: '#/components/schemas/WebscriptManifest' - description: >- - The webscript specification as provided by the - webscript.json asset. - secret: - type: string - description: >- - The secret for this webscript deployment. This is - null when allowHmac=false in the - webscript specificaton. - required: - - _links - - createdAt - - createdBy - - deprecated - - draft - - runtime - - status - - updatedAt - - updatedBy - - updates - - webscript - description: The specification and deployment status of the queried functions - required: - - count - - entities - description: Webscripts Found + draft: + $ref: '#/components/schemas/WebscriptResponseWithInvokeLinkV2' + description: Embedded representation of the lastest draft version. + published: + $ref: '#/components/schemas/WebscriptResponseWithInvokeLinkV2' + description: Embedded representation of the lastest published version. + description: Embedded representations of the _latest_ draft/published versions. WebscriptVersionsResponseV2: type: object properties: @@ -7855,11 +7612,11 @@ components: prev: $ref: '#/components/schemas/QueueEvents' description: The previous state of the job - returnValue: + returnvalue: $ref: '#/components/schemas/AnyJobResult' description: The return value of the job required: - - returnValue + - returnvalue AnyJobResult: anyOf: - $ref: '#/components/schemas/BuildResult' @@ -7869,12 +7626,21 @@ components: - $ref: '#/components/schemas/ScaleResult' - $ref: '#/components/schemas/BatchResult' - $ref: '#/components/schemas/CleanupResult' + - $ref: '#/components/schemas/NotifyResult' CleanupResult: type: object properties: scheduledJob: $ref: '#/components/schemas/JobReference' description: The result data for a completed cleanup job. + NotifyResult: + type: object + properties: + operation: + $ref: '#/components/schemas/RequestOperation' + required: + - operation + description: The result data for a change notification. FailedEventSSE: type: object properties: @@ -9418,6 +9184,12 @@ paths: description: Runtime example archive type: string format: binary + application/tar: + schema: + title: Archive + description: Runtime example archive + type: string + format: binary application/tar+gzip: schema: title: Archive @@ -9511,6 +9283,12 @@ paths: description: Runtime example archive type: string format: binary + application/tar: + schema: + title: Archive + description: Runtime example archive + type: string + format: binary application/tar+gzip: schema: title: Archive @@ -9547,20 +9325,21 @@ paths: x-consumes-other: false /registry/v2/webscripts/: post: - operationId: create_webscript_functions + operationId: create_webscripts summary: Create Webscript Version tags: - - Webscript Functions + - Webscripts description: |- Creates a new webscript function by uploading its assets. - The assets for a webscript function can be provided as either + The assets for a webscript function can be provided as
      -
    • a single tar archive (optionally compressed), with one of the content types - application/octet-stream, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • -
    • separate files in a multipart/form-data request
    • +
    • A single tar archive (optionally compressed), with one of the content types + application/octet-stream, application/tar, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • +
    • Separate files in a multipart/form-data request
    • +
    • A reference to the assets of another webscript in the copy argument
    - + The required webscript.json json file contains the function metadata, and must have a runtime attribute that is one of the supported runtimes (see GET /registry/v2/runtimes?functionType=webscripts). @@ -9572,192 +9351,133 @@ paths: content: application/octet-stream: schema: - title: Webscript Function Assets - description: > - The assets for a webscript function can be provided as - either -
      -
    • a single tar archive (optionally compressed), with one of the content types - application/octet-stream, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • -
    • separate files in a multipart/form-data request
    • -
    - - The required webscript.json json file contains the function metadata, - and must have a runtime attribute that is one of the supported runtimes - (see GET /registry/v2/runtimes?functionType=webscripts). - - For each runtime other files will be required or supported. - anyOf: - - title: Multipart file upload. - description: A multi-part upload containing one or more file assets. - type: object - properties: - filename: - type: array - items: - type: string - format: binary - - title: TAR Achive Upload - description: A single file archive containing multiple assets. + title: TAR Archive Upload + description: A single file archive containing multiple assets. + type: string + format: binary + application/tar: + schema: + title: TAR Archive Upload + description: A single file archive containing multiple assets. + type: string + format: binary application/tar+gzip: schema: - title: Webscript Function Assets - description: > - The assets for a webscript function can be provided as - either -
      -
    • a single tar archive (optionally compressed), with one of the content types - application/octet-stream, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • -
    • separate files in a multipart/form-data request
    • -
    - - The required webscript.json json file contains the function metadata, - and must have a runtime attribute that is one of the supported runtimes - (see GET /registry/v2/runtimes?functionType=webscripts). - - For each runtime other files will be required or supported. - anyOf: - - title: Multipart file upload. - description: A multi-part upload containing one or more file assets. - type: object - properties: - filename: - type: array - items: - type: string - format: binary - - title: TAR Achive Upload - description: A single file archive containing multiple assets. + title: TAR Archive Upload + description: A single file archive containing multiple assets. + type: string + format: binary application/x-gzip: schema: - title: Webscript Function Assets - description: > - The assets for a webscript function can be provided as - either -
      -
    • a single tar archive (optionally compressed), with one of the content types - application/octet-stream, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • -
    • separate files in a multipart/form-data request
    • -
    - - The required webscript.json json file contains the function metadata, - and must have a runtime attribute that is one of the supported runtimes - (see GET /registry/v2/runtimes?functionType=webscripts). - - For each runtime other files will be required or supported. - anyOf: - - title: Multipart file upload. - description: A multi-part upload containing one or more file assets. - type: object - properties: - filename: - type: array - items: - type: string - format: binary - - title: TAR Achive Upload - description: A single file archive containing multiple assets. + title: TAR Archive Upload + description: A single file archive containing multiple assets. + type: string + format: binary application/x-tar: schema: - title: Webscript Function Assets - description: > - The assets for a webscript function can be provided as - either -
      -
    • a single tar archive (optionally compressed), with one of the content types - application/octet-stream, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • -
    • separate files in a multipart/form-data request
    • -
    - - The required webscript.json json file contains the function metadata, - and must have a runtime attribute that is one of the supported runtimes - (see GET /registry/v2/runtimes?functionType=webscripts). - - For each runtime other files will be required or supported. - anyOf: - - title: Multipart file upload. - description: A multi-part upload containing one or more file assets. - type: object - properties: - filename: - type: array - items: - type: string - format: binary - - title: TAR Achive Upload - description: A single file archive containing multiple assets. + title: TAR Archive Upload + description: A single file archive containing multiple assets. + type: string + format: binary application/gzip: schema: - title: Webscript Function Assets - description: > - The assets for a webscript function can be provided as - either -
      -
    • a single tar archive (optionally compressed), with one of the content types - application/octet-stream, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • -
    • separate files in a multipart/form-data request
    • -
    - - The required webscript.json json file contains the function metadata, - and must have a runtime attribute that is one of the supported runtimes - (see GET /registry/v2/runtimes?functionType=webscripts). - - For each runtime other files will be required or supported. - anyOf: - - title: Multipart file upload. - description: A multi-part upload containing one or more file assets. - type: object - properties: - filename: - type: array - items: - type: string - format: binary - - title: TAR Achive Upload - description: A single file archive containing multiple assets. + title: TAR Archive Upload + description: A single file archive containing multiple assets. + type: string + format: binary multipart/form-data: schema: - title: Webscript Function Assets - description: > - The assets for a webscript function can be provided as - either -
      -
    • a single tar archive (optionally compressed), with one of the content types - application/octet-stream, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • -
    • separate files in a multipart/form-data request
    • -
    - - The required webscript.json json file contains the function metadata, - and must have a runtime attribute that is one of the supported runtimes - (see GET /registry/v2/runtimes?functionType=webscripts). - - For each runtime other files will be required or supported. - anyOf: - - title: Multipart file upload. - description: A multi-part upload containing one or more file assets. - type: object - properties: - filename: - type: array - items: - type: string - format: binary - - title: TAR Achive Upload - description: A single file archive containing multiple assets. + title: Multipart file upload. + description: >- + A multi-part upload containing one or more file assets. + + Each part should specify a filename corresponding to the asset + path. + type: object + properties: + assets: + type: array + items: + type: string + format: binary + application/json: + schema: + title: Empty Upload + description: >- + Empty object request body, only allowed when using the `copy` + query parameter. + type: object + maxProperties: 0 + '*/*+json': + schema: + title: Empty Upload + description: >- + Empty object request body, only allowed when using the `copy` + query parameter. + type: object + maxProperties: 0 description: | - The assets for a webscript function can be provided as either + The assets for a webscript function can be provided as
      -
    • a single tar archive (optionally compressed), with one of the content types - application/octet-stream, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • -
    • separate files in a multipart/form-data request
    • +
    • A single tar archive (optionally compressed), with one of the content types + application/octet-stream, application/tar, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • +
    • Separate files in a multipart/form-data request
    • +
    • A reference to the assets of another webscript in the copy argument
    - + The required webscript.json json file contains the function metadata, and must have a runtime attribute that is one of the supported runtimes (see GET /registry/v2/runtimes?functionType=webscripts). For each runtime other files will be required or supported. parameters: + - schema: + type: boolean + default: true + in: query + name: deploy + required: false + description: >- + Indicates that a function should be _deployed_ when its assets are + valid. + + + * If `true` (default), jobs to build and deploy the function will be + initiated after it is checked that the assets are valid. Invalid + assets lead to a validation error, and the function and its assets + are not created or updated. + + * If `false`, the uploaded assets are stored and the function is + created/updated in `registered` state. Asset validation errors are + only returned as warning, and stored as `failureReason` on the + function entity. Use an _asset update_ or _rebuild_ to initiate a + build and deploy at a later stage. + x-showExample: true + - schema: + type: string + in: query + name: author + required: false + description: Optionally changes the author metadata when updating a function. + x-showExample: false + - schema: + type: string + in: query + name: comment + required: false + description: An optional user-specified comment corresponding to the operation. + x-showExample: false + - schema: + type: boolean + default: false + in: query + name: scaleToZero + required: false + description: >- + If set to true, after successful deployment, the + deployed function will be scaled to zero. This saves computing + resources when the function is not to be used immediately. + x-showExample: true - schema: $ref: '#/components/schemas/DeprecatePreviousPolicy' default: patch @@ -9789,17 +9509,6 @@ paths: Accepted response. If false the request will block until the job actions are completed, or a timeout occurs. x-showExample: true - - schema: - type: boolean - default: false - in: query - name: scaleToZero - required: false - description: >- - If set to true, after successful deployment, the - deployed function will be scaled to zero. Saves computing resources - when the function is not to be used immediately. - x-showExample: true - schema: $ref: '#/components/schemas/SemanticVersionRange' in: query @@ -9831,6 +9540,100 @@ paths: are still mutable. A build and deploy is initiated only in the case when all necessary assets are present and valid. x-showExample: true + - schema: + $ref: '#/components/schemas/NamedVersionRange' + in: query + name: runtime + required: false + description: >- + If set, the created function will use the indicated runtime (latest + version within specified range). + + + This takes precedence over the runtime specified in a function + manifest (copied or from request body). + x-showExample: false + - schema: + anyOf: + - $ref: '#/components/schemas/NamedVersionRange' + - $ref: '#/components/schemas/ExampleReference' + in: query + name: copy + required: false + description: >- + Indicates the _source_ of initial assets for a _new function_. + + + When using this query parameter, the request body does not need to + contain assets, but any assets in the request body will overwrite + the copied assets. + + + #### Selection of _assets_ source + + + * If set as `[@]`, the _new + function_ will be created with copied assets of the selected _source + function_. + + * If set as `!example`, a `runtime` query parameter is required, and + the _new function_ will be initialized with assets of the _runtime + example_. + + + #### Selection of the _source function_ + + + When `` is a range (or is not given), the latest + _published_ version (in that range) is used. + + + If no _published_ version exists, the latest _draft_ is selected. + + + If no versions in the range exist, a `404` _Not Found_ error is + returned. + + + #### The `name` of the _new function_ + + + If a `name` is NOT specified (either as query parameter, or in an + optional manifest asset in the request body), the `name` of the _new + function_ will be that of the _source function_. + + + #### The `version` of the _new function_ + + + When the _target_ and _source_ name are equal, the `version` query + parameters is defaulted to `` + (`~` when it's an exact version) + + + The version of the _new function_ will be: + + * If a `version` is NOT specified (either as query parameter, in an + optional manifest asset, or as `` _default_) + + * a **patch increment** (`..+1`) of the latest **existing version** with the target `name` + + * **`1.0.0`** otherwise + + * If a `version` is specified: + + * the **lowest version** in that range **if no existing version** is in that range. + + * an **increment** of the latest existing version, **at the highest level** (_major_,_minor_,_patch_) allowed by that range. + + * otherwise, if all allowed versions already exist, a **`409` _Duplicate_ error** is raised. + + #### Deployment overrides + + + The new function will use the deployment overrides of the copied + function, unless a _manifest_ was specified in the request body. + x-showExample: false x-version: v2 responses: '201': @@ -9850,13 +9653,13 @@ paths: x-py-method: create x-consumes-multipart: true x-consumes-urlencoded: false - x-consumes-json: false + x-consumes-json: true x-consumes-other: true get: - operationId: list_webscript_functions + operationId: list_webscripts summary: List Webscripts tags: - - Webscript Functions + - Webscripts description: > List the (latest) versions of available webscripts. @@ -9877,11 +9680,15 @@ paths: - As long as no _version filters_ are used, each listed webscript - version item will contain a HAL **link to the + As long as no version filters are used, each listed webscript + version contains representations of the latest draft + (`entities[]._links.draft`) - latest** _draft_ (`entities[]._links.draft`) or latest _published_ - (`entities[]._links.publisned`) version (if existing and different). + or latest published (`entities[]._links.published`) version (if existing + and different). + + Use the query parameter `showRelated` to include only a link (default + `showRelated=link`) or a full representation (`showRelated=embed`). ### List Latest Webscript Versions (with filter) @@ -10123,6 +9930,21 @@ paths: returned. Defaults to `true`, except when specific versions are selected with the `nameVersion` filter. x-showExample: true + - schema: + $ref: '#/components/schemas/ShowRelatedType' + in: query + name: showRelated + required: false + description: >- + Sets the representation of related function versions (like the + _latest_ draft and/or published) in the response. + + - `embed`: as full summary representation (in `_embedded`). + + - `link`: as HAL link in (in `_links`). + + - `none`: omitted. + x-showExample: true x-version: v2 responses: '200': @@ -10140,10 +9962,10 @@ paths: x-consumes-other: false /registry/v2/webscripts/{name}/versions: get: - operationId: listVersions_webscript_functions + operationId: listVersions_webscripts summary: List Webscript Versions tags: - - Webscript Functions + - Webscripts description: List all deployed versions of a webscript. parameters: - schema: @@ -10307,10 +10129,10 @@ paths: x-consumes-other: false /registry/v2/webscripts/{name}/versions/{version}: get: - operationId: get_webscript_functions + operationId: get_webscripts summary: Get Webscript Version tags: - - Webscript Functions + - Webscripts description: Get the webscript version. parameters: - schema: @@ -10343,10 +10165,10 @@ paths: x-consumes-json: false x-consumes-other: false delete: - operationId: removeVersion_webscript_functions + operationId: removeVersion_webscripts summary: Remove Webscript Version tags: - - Webscript Functions + - Webscripts description: | Deprecate, undeploy and/or remove a webscript version. @@ -10462,12 +10284,22 @@ paths: x-consumes-other: false /registry/v2/webscripts/{name}/versions/{version}/rebuild: post: - operationId: rebuild_webscript_functions + operationId: rebuild_webscripts summary: Rebuild Webscript tags: - - Webscript Functions + - Webscripts description: Rebuild and deploy a webscript with the original or updated base image. parameters: + - schema: + type: boolean + in: query + name: scaleToZero + required: false + description: >- + Indicates whether the function needs to be scaled down after + successful verification. If not set, the function is scaled to zero + only if it was not active before this command. + x-showExample: true - schema: type: string in: query @@ -10539,16 +10371,6 @@ paths: * the `dryRun` option x-showExample: true - - schema: - type: boolean - in: query - name: scaleToZero - required: false - description: >- - Indicates whether the function needs to be scaled down after - successful (re-)deployment. If not set, the function is scaled to - zero only if it was not active before this command. - x-showExample: true - schema: type: boolean in: query @@ -10595,10 +10417,10 @@ paths: x-consumes-other: false /registry/v2/webscripts/{name}: get: - operationId: getLatest_webscript_functions + operationId: getLatest_webscripts summary: Get Latest Webscript Version tags: - - Webscript Functions + - Webscripts description: |- Fetch the latest version of a webscript. @@ -10664,10 +10486,10 @@ paths: x-consumes-json: false x-consumes-other: false delete: - operationId: removeVersions_webscript_functions + operationId: removeVersions_webscripts summary: Remove Webscript tags: - - Webscript Functions + - Webscripts description: > Deprecate, undeploy and/or remove all versions of this named webscript. @@ -10777,10 +10599,10 @@ paths: x-consumes-other: false /registry/v2/webscripts/{name}/versions/{version}/metadata: patch: - operationId: patchMetadata_webscript_functions + operationId: patchMetadata_webscripts summary: Patch Webscript Metadata tags: - - Webscript Functions + - Webscripts description: Patch the metadata of a webscript version. requestBody: content: @@ -10826,10 +10648,10 @@ paths: x-consumes-other: false /registry/v2/webscripts/{name}/versions/{version}/content: get: - operationId: getArchive_webscript_functions + operationId: getArchive_webscripts summary: Get Webscript Archive tags: - - Webscript Functions + - Webscripts description: Get the specification archive of a webscript. parameters: - schema: @@ -10868,6 +10690,12 @@ paths: description: Webscript archive type: string format: binary + application/tar: + schema: + title: Archive + description: Webscript archive + type: string + format: binary application/tar+gzip: schema: title: Archive @@ -10903,17 +10731,17 @@ paths: x-consumes-json: false x-consumes-other: false put: - operationId: updateAssets_webscript_functions + operationId: updateAssets_webscripts summary: Update Webscript Assets tags: - - Webscript Functions + - Webscripts description: |- Update a draft webscript function by updating its assets. The assets for a webscript function can be provided as either
    • a single tar archive (optionally compressed), with one of the content types - application/octet-stream, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • + application/octet-stream, application/tar, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • separate files in a multipart/form-data request
    @@ -10930,195 +10758,60 @@ paths: content: application/octet-stream: schema: - title: Webscript Function Assets - description: > - The assets for a webscript function can be provided as - either -
      -
    • a single tar archive (optionally compressed), with one of the content types - application/octet-stream, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • -
    • separate files in a multipart/form-data request
    • -
    - - The provided assets will be added to the webscript function's collection of existing assets, - replacing any existing assets with the same name. - - Please note that it is not allowed to update the webscript.json json file with a changed value for any of the - name, version and/or runtime attributes. - - For each runtime other files are supported. - anyOf: - - title: Multipart file upload. - description: A multi-part upload containing one or more file assets. - type: object - properties: - filename: - type: array - items: - type: string - format: binary - - title: TAR Achive Upload - description: A single file archive containing multiple assets. + title: TAR Archive Upload + description: A single file archive containing multiple assets. + type: string + format: binary + application/tar: + schema: + title: TAR Archive Upload + description: A single file archive containing multiple assets. + type: string + format: binary application/tar+gzip: schema: - title: Webscript Function Assets - description: > - The assets for a webscript function can be provided as - either -
      -
    • a single tar archive (optionally compressed), with one of the content types - application/octet-stream, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • -
    • separate files in a multipart/form-data request
    • -
    - - The provided assets will be added to the webscript function's collection of existing assets, - replacing any existing assets with the same name. - - Please note that it is not allowed to update the webscript.json json file with a changed value for any of the - name, version and/or runtime attributes. - - For each runtime other files are supported. - anyOf: - - title: Multipart file upload. - description: A multi-part upload containing one or more file assets. - type: object - properties: - filename: - type: array - items: - type: string - format: binary - - title: TAR Achive Upload - description: A single file archive containing multiple assets. + title: TAR Archive Upload + description: A single file archive containing multiple assets. + type: string + format: binary application/x-gzip: schema: - title: Webscript Function Assets - description: > - The assets for a webscript function can be provided as - either -
      -
    • a single tar archive (optionally compressed), with one of the content types - application/octet-stream, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • -
    • separate files in a multipart/form-data request
    • -
    - - The provided assets will be added to the webscript function's collection of existing assets, - replacing any existing assets with the same name. - - Please note that it is not allowed to update the webscript.json json file with a changed value for any of the - name, version and/or runtime attributes. - - For each runtime other files are supported. - anyOf: - - title: Multipart file upload. - description: A multi-part upload containing one or more file assets. - type: object - properties: - filename: - type: array - items: - type: string - format: binary - - title: TAR Achive Upload - description: A single file archive containing multiple assets. + title: TAR Archive Upload + description: A single file archive containing multiple assets. + type: string + format: binary application/x-tar: schema: - title: Webscript Function Assets - description: > - The assets for a webscript function can be provided as - either -
      -
    • a single tar archive (optionally compressed), with one of the content types - application/octet-stream, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • -
    • separate files in a multipart/form-data request
    • -
    - - The provided assets will be added to the webscript function's collection of existing assets, - replacing any existing assets with the same name. - - Please note that it is not allowed to update the webscript.json json file with a changed value for any of the - name, version and/or runtime attributes. - - For each runtime other files are supported. - anyOf: - - title: Multipart file upload. - description: A multi-part upload containing one or more file assets. - type: object - properties: - filename: - type: array - items: - type: string - format: binary - - title: TAR Achive Upload - description: A single file archive containing multiple assets. + title: TAR Archive Upload + description: A single file archive containing multiple assets. + type: string + format: binary application/gzip: schema: - title: Webscript Function Assets - description: > - The assets for a webscript function can be provided as - either -
      -
    • a single tar archive (optionally compressed), with one of the content types - application/octet-stream, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • -
    • separate files in a multipart/form-data request
    • -
    - - The provided assets will be added to the webscript function's collection of existing assets, - replacing any existing assets with the same name. - - Please note that it is not allowed to update the webscript.json json file with a changed value for any of the - name, version and/or runtime attributes. - - For each runtime other files are supported. - anyOf: - - title: Multipart file upload. - description: A multi-part upload containing one or more file assets. - type: object - properties: - filename: - type: array - items: - type: string - format: binary - - title: TAR Achive Upload - description: A single file archive containing multiple assets. + title: TAR Archive Upload + description: A single file archive containing multiple assets. + type: string + format: binary multipart/form-data: schema: - title: Webscript Function Assets - description: > - The assets for a webscript function can be provided as - either -
      -
    • a single tar archive (optionally compressed), with one of the content types - application/octet-stream, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • -
    • separate files in a multipart/form-data request
    • -
    - - The provided assets will be added to the webscript function's collection of existing assets, - replacing any existing assets with the same name. - - Please note that it is not allowed to update the webscript.json json file with a changed value for any of the - name, version and/or runtime attributes. - - For each runtime other files are supported. - anyOf: - - title: Multipart file upload. - description: A multi-part upload containing one or more file assets. - type: object - properties: - filename: - type: array - items: - type: string - format: binary - - title: TAR Achive Upload - description: A single file archive containing multiple assets. + title: Multipart file upload. + description: >- + A multi-part upload containing one or more file assets. + + Each part should specify a filename corresponding to the asset + path. + type: object + properties: + assets: + type: array + items: + type: string + format: binary description: | The assets for a webscript function can be provided as either
    • a single tar archive (optionally compressed), with one of the content types - application/octet-stream, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • + application/octet-stream, application/tar, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • separate files in a multipart/form-data request
    @@ -11131,34 +10824,74 @@ paths: For each runtime other files are supported. parameters: - schema: - type: string + type: boolean + default: false in: query - name: comment + name: scaleToZero required: false - description: An optional user-specified comment corresponding to the operation. - x-showExample: false + description: >- + If set to true, after successful deployment, the + deployed function will be scaled to zero. This saves computing + resources when the function is not to be used immediately. + x-showExample: true - schema: type: boolean default: true in: query - name: async + name: deploy required: false description: >- - Unless this is set to false, the server will start the - required job actions asynchronously and return a 202 - Accepted response. If false the request will - block until the job actions are completed, or a timeout occurs. + Indicates that a function should be _deployed_ when its assets are + valid. + + + * If `true` (default), jobs to build and deploy the function will be + initiated after it is checked that the assets are valid. Invalid + assets lead to a validation error, and the function and its assets + are not created or updated. + + * If `false`, the uploaded assets are stored and the function is + created/updated in `registered` state. Asset validation errors are + only returned as warning, and stored as `failureReason` on the + function entity. Use an _asset update_ or _rebuild_ to initiate a + build and deploy at a later stage. x-showExample: true - schema: type: boolean default: false in: query name: chown - required: true + required: false description: >- If set, ownership of the draft function is transferred to the current user. x-showExample: true + - schema: + type: string + in: query + name: comment + required: false + description: An optional user-specified comment corresponding to the operation. + x-showExample: false + - schema: + type: string + in: query + name: author + required: false + description: Optionally changes the author metadata when updating a function. + x-showExample: false + - schema: + type: boolean + default: true + in: query + name: async + required: false + description: >- + Unless this is set to false, the server will start the + required job actions asynchronously and return a 202 + Accepted response. If false the request will + block until the job actions are completed, or a timeout occurs. + x-showExample: true - schema: type: string in: path @@ -11187,6 +10920,12 @@ paths: application/json: schema: $ref: '#/components/schemas/PostWebscriptJobAsyncResponseV2' + '403': + description: Default Response + content: + application/json: + schema: + $ref: '#/components/schemas/RegistryErrorResponse' security: - waylayApiKeySecret: [] x-py-method: update_assets @@ -11196,10 +10935,10 @@ paths: x-consumes-other: true /registry/v2/webscripts/{name}/versions/{version}/content/{wildcard}: get: - operationId: getAsset_webscript_functions + operationId: getAsset_webscripts summary: Get File From Webscript Archive tags: - - Webscript Functions + - Webscripts description: Get a file from the specification archive of a webscript. parameters: - schema: @@ -11245,6 +10984,12 @@ paths: description: Webscript archive type: string format: binary + application/tar: + schema: + title: Archive + description: Webscript archive + type: string + format: binary application/tar+gzip: schema: title: Archive @@ -11280,10 +11025,10 @@ paths: x-consumes-json: false x-consumes-other: false put: - operationId: updateAsset_webscript_functions + operationId: updateAsset_webscripts summary: Update Webscript Asset tags: - - Webscript Functions + - Webscripts description: >- The provided asset will be added to the webscript function's collection of existing assets, @@ -11296,7 +11041,7 @@ paths: requestBody: content: - application/octet-stream: + '*/*': schema: title: File Upload description: A single asset file. @@ -11308,34 +11053,74 @@ paths: description: A single asset file. parameters: - schema: - type: string + type: boolean + default: false in: query - name: comment + name: scaleToZero required: false - description: An optional user-specified comment corresponding to the operation. - x-showExample: false + description: >- + If set to true, after successful deployment, the + deployed function will be scaled to zero. This saves computing + resources when the function is not to be used immediately. + x-showExample: true - schema: type: boolean default: true in: query - name: async + name: deploy required: false description: >- - Unless this is set to false, the server will start the - required job actions asynchronously and return a 202 - Accepted response. If false the request will - block until the job actions are completed, or a timeout occurs. + Indicates that a function should be _deployed_ when its assets are + valid. + + + * If `true` (default), jobs to build and deploy the function will be + initiated after it is checked that the assets are valid. Invalid + assets lead to a validation error, and the function and its assets + are not created or updated. + + * If `false`, the uploaded assets are stored and the function is + created/updated in `registered` state. Asset validation errors are + only returned as warning, and stored as `failureReason` on the + function entity. Use an _asset update_ or _rebuild_ to initiate a + build and deploy at a later stage. x-showExample: true - schema: type: boolean default: false in: query name: chown - required: true + required: false description: >- If set, ownership of the draft function is transferred to the current user. x-showExample: true + - schema: + type: string + in: query + name: comment + required: false + description: An optional user-specified comment corresponding to the operation. + x-showExample: false + - schema: + type: string + in: query + name: author + required: false + description: Optionally changes the author metadata when updating a function. + x-showExample: false + - schema: + type: boolean + default: true + in: query + name: async + required: false + description: >- + Unless this is set to false, the server will start the + required job actions asynchronously and return a 202 + Accepted response. If false the request will + block until the job actions are completed, or a timeout occurs. + x-showExample: true - schema: type: string in: path @@ -11371,6 +11156,12 @@ paths: application/json: schema: $ref: '#/components/schemas/PostWebscriptJobAsyncResponseV2' + '403': + description: Default Response + content: + application/json: + schema: + $ref: '#/components/schemas/RegistryErrorResponse' security: - waylayApiKeySecret: [] x-py-method: update_asset @@ -11379,41 +11170,81 @@ paths: x-consumes-json: false x-consumes-other: true delete: - operationId: deleteAsset_webscript_functions + operationId: deleteAsset_webscripts summary: Delete Webscript Asset tags: - - Webscript Functions + - Webscripts description: Delete an asset from the webscript's collection of existing assets. parameters: - schema: - type: string + type: boolean + default: false in: query - name: comment + name: scaleToZero required: false - description: An optional user-specified comment corresponding to the operation. - x-showExample: false + description: >- + If set to true, after successful deployment, the + deployed function will be scaled to zero. This saves computing + resources when the function is not to be used immediately. + x-showExample: true - schema: type: boolean default: true in: query - name: async + name: deploy required: false description: >- - Unless this is set to false, the server will start the - required job actions asynchronously and return a 202 - Accepted response. If false the request will - block until the job actions are completed, or a timeout occurs. + Indicates that a function should be _deployed_ when its assets are + valid. + + + * If `true` (default), jobs to build and deploy the function will be + initiated after it is checked that the assets are valid. Invalid + assets lead to a validation error, and the function and its assets + are not created or updated. + + * If `false`, the uploaded assets are stored and the function is + created/updated in `registered` state. Asset validation errors are + only returned as warning, and stored as `failureReason` on the + function entity. Use an _asset update_ or _rebuild_ to initiate a + build and deploy at a later stage. x-showExample: true - schema: type: boolean default: false in: query name: chown - required: true + required: false description: >- If set, ownership of the draft function is transferred to the current user. x-showExample: true + - schema: + type: string + in: query + name: comment + required: false + description: An optional user-specified comment corresponding to the operation. + x-showExample: false + - schema: + type: string + in: query + name: author + required: false + description: Optionally changes the author metadata when updating a function. + x-showExample: false + - schema: + type: boolean + default: true + in: query + name: async + required: false + description: >- + Unless this is set to false, the server will start the + required job actions asynchronously and return a 202 + Accepted response. If false the request will + block until the job actions are completed, or a timeout occurs. + x-showExample: true - schema: type: string in: path @@ -11449,6 +11280,12 @@ paths: application/json: schema: $ref: '#/components/schemas/PostWebscriptJobAsyncResponseV2' + '403': + description: Default Response + content: + application/json: + schema: + $ref: '#/components/schemas/RegistryErrorResponse' security: - waylayApiKeySecret: [] x-py-method: delete_asset @@ -11458,10 +11295,10 @@ paths: x-consumes-other: false /registry/v2/webscripts/{name}/versions/{version}/publish: post: - operationId: publish_webscript_functions + operationId: publish_webscripts summary: Publish Draft Webscript tags: - - Webscript Functions + - Webscripts description: >- Mark the webscript to be ready and stable, taking it out of draft mode., @@ -11471,6 +11308,16 @@ paths: In other statuses, plug-registry may need to initiate a new build and deployment procedure. parameters: + - schema: + type: boolean + default: false + in: query + name: chown + required: false + description: >- + If set, ownership of the draft function is transferred to the + current user. + x-showExample: true - schema: type: string in: query @@ -11478,6 +11325,13 @@ paths: required: false description: An optional user-specified comment corresponding to the operation. x-showExample: false + - schema: + type: string + in: query + name: author + required: false + description: Optionally changes the author metadata when updating a function. + x-showExample: false - schema: $ref: '#/components/schemas/DeprecatePreviousPolicy' default: patch @@ -11539,10 +11393,10 @@ paths: x-consumes-other: false /registry/v2/webscripts/{name}/versions/{version}/jobs: get: - operationId: jobs_webscript_functions + operationId: jobs_webscripts summary: List Webscript Jobs tags: - - Webscript Functions + - Webscripts description: List the ongoing and completed operations on a specific webscript. parameters: - schema: @@ -11627,19 +11481,22 @@ paths: x-consumes-other: false /registry/v2/webscripts/{name}/versions/{version}/verify: post: - operationId: verify_webscript_functions + operationId: verify_webscripts summary: Verify Health Of Webscript tags: - - Webscript Functions + - Webscripts description: Verify health of webscript deployed on openfaas. parameters: - schema: - type: string + type: boolean in: query - name: comment + name: scaleToZero required: false - description: An optional user-specified comment corresponding to the operation. - x-showExample: false + description: >- + Indicates whether the function needs to be scaled down after + successful verification. If not set, the function is scaled to zero + only if it was not active before this command. + x-showExample: true - schema: type: boolean default: true @@ -11652,16 +11509,6 @@ paths: Accepted response. If false the request will block until the job actions are completed, or a timeout occurs. x-showExample: true - - schema: - type: boolean - in: query - name: scaleToZero - required: false - description: >- - Indicates whether the function needs to be scaled down after - successful verification. If not set, the function is scaled to zero - only if it was not active before this command. - x-showExample: true - schema: type: string in: path @@ -11770,20 +11617,21 @@ paths: x-consumes-other: false /registry/v2/plugs/: post: - operationId: create_plug_functions + operationId: create_plugs summary: Create Plug tags: - - Plug Functions + - Plugs description: |- Creates a new plug function by uploading its assets. - The assets for a plug function can be provided as either + The assets for a plug function can be provided as
      -
    • a single tar archive (optionally compressed), with one of the content types - application/octet-stream, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • -
    • separate files in a multipart/form-data request
    • +
    • A single tar archive (optionally compressed), with one of the content types + application/octet-stream, application/tar, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • +
    • Separate files in a multipart/form-data request
    • +
    • A reference to the assets of another plug in the copy argument
    - + The required plug.json json file contains the function metadata, and must have a runtime attribute that is one of the supported runtimes (see GET /registry/v2/runtimes?functionType=plugs). @@ -11795,192 +11643,133 @@ paths: content: application/octet-stream: schema: - title: Plug Function Assets - description: > - The assets for a plug function can be provided as - either -
      -
    • a single tar archive (optionally compressed), with one of the content types - application/octet-stream, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • -
    • separate files in a multipart/form-data request
    • -
    - - The required plug.json json file contains the function metadata, - and must have a runtime attribute that is one of the supported runtimes - (see GET /registry/v2/runtimes?functionType=plugs). - - For each runtime other files will be required or supported. - anyOf: - - title: Multipart file upload. - description: A multi-part upload containing one or more file assets. - type: object - properties: - filename: - type: array - items: - type: string - format: binary - - title: TAR Achive Upload - description: A single file archive containing multiple assets. + title: TAR Archive Upload + description: A single file archive containing multiple assets. + type: string + format: binary + application/tar: + schema: + title: TAR Archive Upload + description: A single file archive containing multiple assets. + type: string + format: binary application/tar+gzip: schema: - title: Plug Function Assets - description: > - The assets for a plug function can be provided as - either -
      -
    • a single tar archive (optionally compressed), with one of the content types - application/octet-stream, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • -
    • separate files in a multipart/form-data request
    • -
    - - The required plug.json json file contains the function metadata, - and must have a runtime attribute that is one of the supported runtimes - (see GET /registry/v2/runtimes?functionType=plugs). - - For each runtime other files will be required or supported. - anyOf: - - title: Multipart file upload. - description: A multi-part upload containing one or more file assets. - type: object - properties: - filename: - type: array - items: - type: string - format: binary - - title: TAR Achive Upload - description: A single file archive containing multiple assets. + title: TAR Archive Upload + description: A single file archive containing multiple assets. + type: string + format: binary application/x-gzip: schema: - title: Plug Function Assets - description: > - The assets for a plug function can be provided as - either -
      -
    • a single tar archive (optionally compressed), with one of the content types - application/octet-stream, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • -
    • separate files in a multipart/form-data request
    • -
    - - The required plug.json json file contains the function metadata, - and must have a runtime attribute that is one of the supported runtimes - (see GET /registry/v2/runtimes?functionType=plugs). - - For each runtime other files will be required or supported. - anyOf: - - title: Multipart file upload. - description: A multi-part upload containing one or more file assets. - type: object - properties: - filename: - type: array - items: - type: string - format: binary - - title: TAR Achive Upload - description: A single file archive containing multiple assets. + title: TAR Archive Upload + description: A single file archive containing multiple assets. + type: string + format: binary application/x-tar: schema: - title: Plug Function Assets - description: > - The assets for a plug function can be provided as - either -
      -
    • a single tar archive (optionally compressed), with one of the content types - application/octet-stream, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • -
    • separate files in a multipart/form-data request
    • -
    - - The required plug.json json file contains the function metadata, - and must have a runtime attribute that is one of the supported runtimes - (see GET /registry/v2/runtimes?functionType=plugs). - - For each runtime other files will be required or supported. - anyOf: - - title: Multipart file upload. - description: A multi-part upload containing one or more file assets. - type: object - properties: - filename: - type: array - items: - type: string - format: binary - - title: TAR Achive Upload - description: A single file archive containing multiple assets. + title: TAR Archive Upload + description: A single file archive containing multiple assets. + type: string + format: binary application/gzip: schema: - title: Plug Function Assets - description: > - The assets for a plug function can be provided as - either -
      -
    • a single tar archive (optionally compressed), with one of the content types - application/octet-stream, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • -
    • separate files in a multipart/form-data request
    • -
    - - The required plug.json json file contains the function metadata, - and must have a runtime attribute that is one of the supported runtimes - (see GET /registry/v2/runtimes?functionType=plugs). - - For each runtime other files will be required or supported. - anyOf: - - title: Multipart file upload. - description: A multi-part upload containing one or more file assets. - type: object - properties: - filename: - type: array - items: - type: string - format: binary - - title: TAR Achive Upload - description: A single file archive containing multiple assets. + title: TAR Archive Upload + description: A single file archive containing multiple assets. + type: string + format: binary multipart/form-data: schema: - title: Plug Function Assets - description: > - The assets for a plug function can be provided as - either -
      -
    • a single tar archive (optionally compressed), with one of the content types - application/octet-stream, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • -
    • separate files in a multipart/form-data request
    • -
    - - The required plug.json json file contains the function metadata, - and must have a runtime attribute that is one of the supported runtimes - (see GET /registry/v2/runtimes?functionType=plugs). - - For each runtime other files will be required or supported. - anyOf: - - title: Multipart file upload. - description: A multi-part upload containing one or more file assets. - type: object - properties: - filename: - type: array - items: - type: string - format: binary - - title: TAR Achive Upload - description: A single file archive containing multiple assets. + title: Multipart file upload. + description: >- + A multi-part upload containing one or more file assets. + + Each part should specify a filename corresponding to the asset + path. + type: object + properties: + assets: + type: array + items: + type: string + format: binary + application/json: + schema: + title: Empty Upload + description: >- + Empty object request body, only allowed when using the `copy` + query parameter. + type: object + maxProperties: 0 + '*/*+json': + schema: + title: Empty Upload + description: >- + Empty object request body, only allowed when using the `copy` + query parameter. + type: object + maxProperties: 0 description: | - The assets for a plug function can be provided as either + The assets for a plug function can be provided as
      -
    • a single tar archive (optionally compressed), with one of the content types - application/octet-stream, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • -
    • separate files in a multipart/form-data request
    • +
    • A single tar archive (optionally compressed), with one of the content types + application/octet-stream, application/tar, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • +
    • Separate files in a multipart/form-data request
    • +
    • A reference to the assets of another plug in the copy argument
    - + The required plug.json json file contains the function metadata, and must have a runtime attribute that is one of the supported runtimes (see GET /registry/v2/runtimes?functionType=plugs). For each runtime other files will be required or supported. parameters: + - schema: + type: boolean + default: true + in: query + name: deploy + required: false + description: >- + Indicates that a function should be _deployed_ when its assets are + valid. + + + * If `true` (default), jobs to build and deploy the function will be + initiated after it is checked that the assets are valid. Invalid + assets lead to a validation error, and the function and its assets + are not created or updated. + + * If `false`, the uploaded assets are stored and the function is + created/updated in `registered` state. Asset validation errors are + only returned as warning, and stored as `failureReason` on the + function entity. Use an _asset update_ or _rebuild_ to initiate a + build and deploy at a later stage. + x-showExample: true + - schema: + type: string + in: query + name: author + required: false + description: Optionally changes the author metadata when updating a function. + x-showExample: false + - schema: + type: string + in: query + name: comment + required: false + description: An optional user-specified comment corresponding to the operation. + x-showExample: false + - schema: + type: boolean + default: false + in: query + name: scaleToZero + required: false + description: >- + If set to true, after successful deployment, the + deployed function will be scaled to zero. This saves computing + resources when the function is not to be used immediately. + x-showExample: true - schema: $ref: '#/components/schemas/DeprecatePreviousPolicy' default: none @@ -12012,17 +11801,6 @@ paths: Accepted response. If false the request will block until the job actions are completed, or a timeout occurs. x-showExample: true - - schema: - type: boolean - default: false - in: query - name: scaleToZero - required: false - description: >- - If set to true, after successful deployment, the - deployed function will be scaled to zero. Saves computing resources - when the function is not to be used immediately. - x-showExample: true - schema: $ref: '#/components/schemas/SemanticVersionRange' in: query @@ -12054,6 +11832,100 @@ paths: are still mutable. A build and deploy is initiated only in the case when all necessary assets are present and valid. x-showExample: true + - schema: + $ref: '#/components/schemas/NamedVersionRange' + in: query + name: runtime + required: false + description: >- + If set, the created function will use the indicated runtime (latest + version within specified range). + + + This takes precedence over the runtime specified in a function + manifest (copied or from request body). + x-showExample: false + - schema: + anyOf: + - $ref: '#/components/schemas/NamedVersionRange' + - $ref: '#/components/schemas/ExampleReference' + in: query + name: copy + required: false + description: >- + Indicates the _source_ of initial assets for a _new function_. + + + When using this query parameter, the request body does not need to + contain assets, but any assets in the request body will overwrite + the copied assets. + + + #### Selection of _assets_ source + + + * If set as `[@]`, the _new + function_ will be created with copied assets of the selected _source + function_. + + * If set as `!example`, a `runtime` query parameter is required, and + the _new function_ will be initialized with assets of the _runtime + example_. + + + #### Selection of the _source function_ + + + When `` is a range (or is not given), the latest + _published_ version (in that range) is used. + + + If no _published_ version exists, the latest _draft_ is selected. + + + If no versions in the range exist, a `404` _Not Found_ error is + returned. + + + #### The `name` of the _new function_ + + + If a `name` is NOT specified (either as query parameter, or in an + optional manifest asset in the request body), the `name` of the _new + function_ will be that of the _source function_. + + + #### The `version` of the _new function_ + + + When the _target_ and _source_ name are equal, the `version` query + parameters is defaulted to `` + (`~` when it's an exact version) + + + The version of the _new function_ will be: + + * If a `version` is NOT specified (either as query parameter, in an + optional manifest asset, or as `` _default_) + + * a **patch increment** (`..+1`) of the latest **existing version** with the target `name` + + * **`1.0.0`** otherwise + + * If a `version` is specified: + + * the **lowest version** in that range **if no existing version** is in that range. + + * an **increment** of the latest existing version, **at the highest level** (_major_,_minor_,_patch_) allowed by that range. + + * otherwise, if all allowed versions already exist, a **`409` _Duplicate_ error** is raised. + + #### Deployment overrides + + + The new function will use the deployment overrides of the copied + function, unless a _manifest_ was specified in the request body. + x-showExample: false x-version: v2 responses: '201': @@ -12073,13 +11945,13 @@ paths: x-py-method: create x-consumes-multipart: true x-consumes-urlencoded: false - x-consumes-json: false + x-consumes-json: true x-consumes-other: true get: - operationId: list_plug_functions + operationId: list_plugs summary: List Plugs tags: - - Plug Functions + - Plugs description: > List the (latest) versions of available plugs. @@ -12100,11 +11972,15 @@ paths: - As long as no _version filters_ are used, each listed plug - version item will contain a HAL **link to the + As long as no version filters are used, each listed plug + version contains representations of the latest draft + (`entities[]._links.draft`) - latest** _draft_ (`entities[]._links.draft`) or latest _published_ - (`entities[]._links.publisned`) version (if existing and different). + or latest published (`entities[]._links.published`) version (if existing + and different). + + Use the query parameter `showRelated` to include only a link (default + `showRelated=link`) or a full representation (`showRelated=embed`). ### List Latest Plug Versions (with filter) @@ -12363,6 +12239,21 @@ paths: returned. Defaults to `true`, except when specific versions are selected with the `nameVersion` filter. x-showExample: true + - schema: + $ref: '#/components/schemas/ShowRelatedType' + in: query + name: showRelated + required: false + description: >- + Sets the representation of related function versions (like the + _latest_ draft and/or published) in the response. + + - `embed`: as full summary representation (in `_embedded`). + + - `link`: as HAL link in (in `_links`). + + - `none`: omitted. + x-showExample: true x-version: v2 responses: '200': @@ -12380,10 +12271,10 @@ paths: x-consumes-other: false /registry/v2/plugs/{name}: get: - operationId: getLatest_plug_functions + operationId: getLatest_plugs summary: Get Latest Plug Version tags: - - Plug Functions + - Plugs description: |- Fetch the latest version of a plug. @@ -12459,10 +12350,10 @@ paths: x-consumes-json: false x-consumes-other: false delete: - operationId: removeVersions_plug_functions + operationId: removeVersions_plugs summary: Remove Plug tags: - - Plug Functions + - Plugs description: > Deprecate, undeploy and/or remove all versions of this named plug. @@ -12583,10 +12474,10 @@ paths: x-consumes-other: false /registry/v2/plugs/{name}/versions: get: - operationId: listVersions_plug_functions + operationId: listVersions_plugs summary: List Plug Versions tags: - - Plug Functions + - Plugs description: List all versions of a plug, including deprecated versions or not. parameters: - schema: @@ -12760,10 +12651,10 @@ paths: x-consumes-other: false /registry/v2/plugs/{name}/versions/{version}: get: - operationId: get_plug_functions + operationId: get_plugs summary: Get Plug Version tags: - - Plug Functions + - Plugs description: Get a specific version of a plug. parameters: - schema: @@ -12799,10 +12690,10 @@ paths: x-consumes-json: false x-consumes-other: false delete: - operationId: removeVersion_plug_functions + operationId: removeVersion_plugs summary: Remove Plug Version tags: - - Plug Functions + - Plugs description: > Deprecate, undeploy and/or remove a plug version. @@ -12929,12 +12820,22 @@ paths: x-consumes-other: false /registry/v2/plugs/{name}/versions/{version}/rebuild: post: - operationId: rebuild_plug_functions + operationId: rebuild_plugs summary: Rebuild Plug tags: - - Plug Functions + - Plugs description: Rebuild and deploy a plug with the original or updated base image. parameters: + - schema: + type: boolean + in: query + name: scaleToZero + required: false + description: >- + Indicates whether the function needs to be scaled down after + successful verification. If not set, the function is scaled to zero + only if it was not active before this command. + x-showExample: true - schema: type: string in: query @@ -13006,16 +12907,6 @@ paths: * the `dryRun` option x-showExample: true - - schema: - type: boolean - in: query - name: scaleToZero - required: false - description: >- - Indicates whether the function needs to be scaled down after - successful (re-)deployment. If not set, the function is scaled to - zero only if it was not active before this command. - x-showExample: true - schema: type: boolean in: query @@ -13062,10 +12953,10 @@ paths: x-consumes-other: false /registry/v2/plugs/{name}/versions/{version}/content: get: - operationId: getArchive_plug_functions + operationId: getArchive_plugs summary: Get Plug Archive tags: - - Plug Functions + - Plugs description: Get the specification archive of a plug. parameters: - schema: @@ -13104,6 +12995,12 @@ paths: description: Plug archive type: string format: binary + application/tar: + schema: + title: Archive + description: Plug archive + type: string + format: binary application/tar+gzip: schema: title: Archive @@ -13139,17 +13036,17 @@ paths: x-consumes-json: false x-consumes-other: false put: - operationId: updateAssets_plug_functions + operationId: updateAssets_plugs summary: Update Plug Assets tags: - - Plug Functions + - Plugs description: |- Update a draft plug function by updating its assets. The assets for a plug function can be provided as either
    • a single tar archive (optionally compressed), with one of the content types - application/octet-stream, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • + application/octet-stream, application/tar, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • separate files in a multipart/form-data request
    @@ -13166,195 +13063,60 @@ paths: content: application/octet-stream: schema: - title: Plug Function Assets - description: > - The assets for a plug function can be provided as - either -
      -
    • a single tar archive (optionally compressed), with one of the content types - application/octet-stream, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • -
    • separate files in a multipart/form-data request
    • -
    - - The provided assets will be added to the plug function's collection of existing assets, - replacing any existing assets with the same name. - - Please note that it is not allowed to update the plug.json json file with a changed value for any of the - name, version and/or runtime attributes. - - For each runtime other files are supported. - anyOf: - - title: Multipart file upload. - description: A multi-part upload containing one or more file assets. - type: object - properties: - filename: - type: array - items: - type: string - format: binary - - title: TAR Achive Upload - description: A single file archive containing multiple assets. + title: TAR Archive Upload + description: A single file archive containing multiple assets. + type: string + format: binary + application/tar: + schema: + title: TAR Archive Upload + description: A single file archive containing multiple assets. + type: string + format: binary application/tar+gzip: schema: - title: Plug Function Assets - description: > - The assets for a plug function can be provided as - either -
      -
    • a single tar archive (optionally compressed), with one of the content types - application/octet-stream, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • -
    • separate files in a multipart/form-data request
    • -
    - - The provided assets will be added to the plug function's collection of existing assets, - replacing any existing assets with the same name. - - Please note that it is not allowed to update the plug.json json file with a changed value for any of the - name, version and/or runtime attributes. - - For each runtime other files are supported. - anyOf: - - title: Multipart file upload. - description: A multi-part upload containing one or more file assets. - type: object - properties: - filename: - type: array - items: - type: string - format: binary - - title: TAR Achive Upload - description: A single file archive containing multiple assets. + title: TAR Archive Upload + description: A single file archive containing multiple assets. + type: string + format: binary application/x-gzip: schema: - title: Plug Function Assets - description: > - The assets for a plug function can be provided as - either -
      -
    • a single tar archive (optionally compressed), with one of the content types - application/octet-stream, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • -
    • separate files in a multipart/form-data request
    • -
    - - The provided assets will be added to the plug function's collection of existing assets, - replacing any existing assets with the same name. - - Please note that it is not allowed to update the plug.json json file with a changed value for any of the - name, version and/or runtime attributes. - - For each runtime other files are supported. - anyOf: - - title: Multipart file upload. - description: A multi-part upload containing one or more file assets. - type: object - properties: - filename: - type: array - items: - type: string - format: binary - - title: TAR Achive Upload - description: A single file archive containing multiple assets. + title: TAR Archive Upload + description: A single file archive containing multiple assets. + type: string + format: binary application/x-tar: schema: - title: Plug Function Assets - description: > - The assets for a plug function can be provided as - either -
      -
    • a single tar archive (optionally compressed), with one of the content types - application/octet-stream, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • -
    • separate files in a multipart/form-data request
    • -
    - - The provided assets will be added to the plug function's collection of existing assets, - replacing any existing assets with the same name. - - Please note that it is not allowed to update the plug.json json file with a changed value for any of the - name, version and/or runtime attributes. - - For each runtime other files are supported. - anyOf: - - title: Multipart file upload. - description: A multi-part upload containing one or more file assets. - type: object - properties: - filename: - type: array - items: - type: string - format: binary - - title: TAR Achive Upload - description: A single file archive containing multiple assets. + title: TAR Archive Upload + description: A single file archive containing multiple assets. + type: string + format: binary application/gzip: schema: - title: Plug Function Assets - description: > - The assets for a plug function can be provided as - either -
      -
    • a single tar archive (optionally compressed), with one of the content types - application/octet-stream, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • -
    • separate files in a multipart/form-data request
    • -
    - - The provided assets will be added to the plug function's collection of existing assets, - replacing any existing assets with the same name. - - Please note that it is not allowed to update the plug.json json file with a changed value for any of the - name, version and/or runtime attributes. - - For each runtime other files are supported. - anyOf: - - title: Multipart file upload. - description: A multi-part upload containing one or more file assets. - type: object - properties: - filename: - type: array - items: - type: string - format: binary - - title: TAR Achive Upload - description: A single file archive containing multiple assets. + title: TAR Archive Upload + description: A single file archive containing multiple assets. + type: string + format: binary multipart/form-data: schema: - title: Plug Function Assets - description: > - The assets for a plug function can be provided as - either -
      -
    • a single tar archive (optionally compressed), with one of the content types - application/octet-stream, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • -
    • separate files in a multipart/form-data request
    • -
    - - The provided assets will be added to the plug function's collection of existing assets, - replacing any existing assets with the same name. - - Please note that it is not allowed to update the plug.json json file with a changed value for any of the - name, version and/or runtime attributes. - - For each runtime other files are supported. - anyOf: - - title: Multipart file upload. - description: A multi-part upload containing one or more file assets. - type: object - properties: - filename: - type: array - items: - type: string - format: binary - - title: TAR Achive Upload - description: A single file archive containing multiple assets. + title: Multipart file upload. + description: >- + A multi-part upload containing one or more file assets. + + Each part should specify a filename corresponding to the asset + path. + type: object + properties: + assets: + type: array + items: + type: string + format: binary description: | The assets for a plug function can be provided as either
    • a single tar archive (optionally compressed), with one of the content types - application/octet-stream, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • + application/octet-stream, application/tar, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • separate files in a multipart/form-data request
    @@ -13367,34 +13129,74 @@ paths: For each runtime other files are supported. parameters: - schema: - type: string + type: boolean + default: false in: query - name: comment + name: scaleToZero required: false - description: An optional user-specified comment corresponding to the operation. - x-showExample: false + description: >- + If set to true, after successful deployment, the + deployed function will be scaled to zero. This saves computing + resources when the function is not to be used immediately. + x-showExample: true - schema: type: boolean default: true in: query - name: async + name: deploy required: false description: >- - Unless this is set to false, the server will start the - required job actions asynchronously and return a 202 - Accepted response. If false the request will - block until the job actions are completed, or a timeout occurs. + Indicates that a function should be _deployed_ when its assets are + valid. + + + * If `true` (default), jobs to build and deploy the function will be + initiated after it is checked that the assets are valid. Invalid + assets lead to a validation error, and the function and its assets + are not created or updated. + + * If `false`, the uploaded assets are stored and the function is + created/updated in `registered` state. Asset validation errors are + only returned as warning, and stored as `failureReason` on the + function entity. Use an _asset update_ or _rebuild_ to initiate a + build and deploy at a later stage. x-showExample: true - schema: type: boolean default: false in: query name: chown - required: true + required: false description: >- If set, ownership of the draft function is transferred to the current user. x-showExample: true + - schema: + type: string + in: query + name: comment + required: false + description: An optional user-specified comment corresponding to the operation. + x-showExample: false + - schema: + type: string + in: query + name: author + required: false + description: Optionally changes the author metadata when updating a function. + x-showExample: false + - schema: + type: boolean + default: true + in: query + name: async + required: false + description: >- + Unless this is set to false, the server will start the + required job actions asynchronously and return a 202 + Accepted response. If false the request will + block until the job actions are completed, or a timeout occurs. + x-showExample: true - schema: type: string in: path @@ -13423,6 +13225,12 @@ paths: application/json: schema: $ref: '#/components/schemas/PostPlugJobAsyncResponseV2' + '403': + description: Default Response + content: + application/json: + schema: + $ref: '#/components/schemas/RegistryErrorResponse' security: - waylayApiKeySecret: [] x-py-method: update_assets @@ -13432,10 +13240,10 @@ paths: x-consumes-other: true /registry/v2/plugs/{name}/versions/{version}/content/{wildcard}: get: - operationId: getAsset_plug_functions + operationId: getAsset_plugs summary: Get File From Plug Archive tags: - - Plug Functions + - Plugs description: Get a file from the specification archive of a plug. parameters: - schema: @@ -13481,6 +13289,12 @@ paths: description: Plug archive type: string format: binary + application/tar: + schema: + title: Archive + description: Plug archive + type: string + format: binary application/tar+gzip: schema: title: Archive @@ -13516,10 +13330,10 @@ paths: x-consumes-json: false x-consumes-other: false put: - operationId: updateAsset_plug_functions + operationId: updateAsset_plugs summary: Update Plug Asset tags: - - Plug Functions + - Plugs description: >- The provided asset will be added to the plug function's collection of existing assets, @@ -13532,7 +13346,7 @@ paths: requestBody: content: - application/octet-stream: + '*/*': schema: title: File Upload description: A single asset file. @@ -13543,6 +13357,49 @@ paths: format: binary description: A single asset file. parameters: + - schema: + type: boolean + default: false + in: query + name: scaleToZero + required: false + description: >- + If set to true, after successful deployment, the + deployed function will be scaled to zero. This saves computing + resources when the function is not to be used immediately. + x-showExample: true + - schema: + type: boolean + default: true + in: query + name: deploy + required: false + description: >- + Indicates that a function should be _deployed_ when its assets are + valid. + + + * If `true` (default), jobs to build and deploy the function will be + initiated after it is checked that the assets are valid. Invalid + assets lead to a validation error, and the function and its assets + are not created or updated. + + * If `false`, the uploaded assets are stored and the function is + created/updated in `registered` state. Asset validation errors are + only returned as warning, and stored as `failureReason` on the + function entity. Use an _asset update_ or _rebuild_ to initiate a + build and deploy at a later stage. + x-showExample: true + - schema: + type: boolean + default: false + in: query + name: chown + required: false + description: >- + If set, ownership of the draft function is transferred to the + current user. + x-showExample: true - schema: type: string in: query @@ -13550,6 +13407,13 @@ paths: required: false description: An optional user-specified comment corresponding to the operation. x-showExample: false + - schema: + type: string + in: query + name: author + required: false + description: Optionally changes the author metadata when updating a function. + x-showExample: false - schema: type: boolean default: true @@ -13562,16 +13426,6 @@ paths: Accepted response. If false the request will block until the job actions are completed, or a timeout occurs. x-showExample: true - - schema: - type: boolean - default: false - in: query - name: chown - required: true - description: >- - If set, ownership of the draft function is transferred to the - current user. - x-showExample: true - schema: type: string in: path @@ -13607,6 +13461,12 @@ paths: application/json: schema: $ref: '#/components/schemas/PostPlugJobAsyncResponseV2' + '403': + description: Default Response + content: + application/json: + schema: + $ref: '#/components/schemas/RegistryErrorResponse' security: - waylayApiKeySecret: [] x-py-method: update_asset @@ -13615,41 +13475,81 @@ paths: x-consumes-json: false x-consumes-other: true delete: - operationId: deleteAsset_plug_functions + operationId: deleteAsset_plugs summary: Delete Plug Asset tags: - - Plug Functions + - Plugs description: Delete an asset from the plug's collection of existing assets. parameters: - schema: - type: string + type: boolean + default: false in: query - name: comment + name: scaleToZero required: false - description: An optional user-specified comment corresponding to the operation. - x-showExample: false + description: >- + If set to true, after successful deployment, the + deployed function will be scaled to zero. This saves computing + resources when the function is not to be used immediately. + x-showExample: true - schema: type: boolean default: true in: query - name: async + name: deploy required: false description: >- - Unless this is set to false, the server will start the - required job actions asynchronously and return a 202 - Accepted response. If false the request will - block until the job actions are completed, or a timeout occurs. + Indicates that a function should be _deployed_ when its assets are + valid. + + + * If `true` (default), jobs to build and deploy the function will be + initiated after it is checked that the assets are valid. Invalid + assets lead to a validation error, and the function and its assets + are not created or updated. + + * If `false`, the uploaded assets are stored and the function is + created/updated in `registered` state. Asset validation errors are + only returned as warning, and stored as `failureReason` on the + function entity. Use an _asset update_ or _rebuild_ to initiate a + build and deploy at a later stage. x-showExample: true - schema: type: boolean default: false in: query name: chown - required: true + required: false description: >- If set, ownership of the draft function is transferred to the current user. x-showExample: true + - schema: + type: string + in: query + name: comment + required: false + description: An optional user-specified comment corresponding to the operation. + x-showExample: false + - schema: + type: string + in: query + name: author + required: false + description: Optionally changes the author metadata when updating a function. + x-showExample: false + - schema: + type: boolean + default: true + in: query + name: async + required: false + description: >- + Unless this is set to false, the server will start the + required job actions asynchronously and return a 202 + Accepted response. If false the request will + block until the job actions are completed, or a timeout occurs. + x-showExample: true - schema: type: string in: path @@ -13685,6 +13585,12 @@ paths: application/json: schema: $ref: '#/components/schemas/PostPlugJobAsyncResponseV2' + '403': + description: Default Response + content: + application/json: + schema: + $ref: '#/components/schemas/RegistryErrorResponse' security: - waylayApiKeySecret: [] x-py-method: delete_asset @@ -13694,10 +13600,10 @@ paths: x-consumes-other: false /registry/v2/plugs/{name}/versions/{version}/publish: post: - operationId: publish_plug_functions + operationId: publish_plugs summary: Publish Draft Plug tags: - - Plug Functions + - Plugs description: >- Mark the plug to be ready and stable, taking it out of draft mode., @@ -13707,6 +13613,16 @@ paths: In other statuses, plug-registry may need to initiate a new build and deployment procedure. parameters: + - schema: + type: boolean + default: false + in: query + name: chown + required: false + description: >- + If set, ownership of the draft function is transferred to the + current user. + x-showExample: true - schema: type: string in: query @@ -13714,6 +13630,13 @@ paths: required: false description: An optional user-specified comment corresponding to the operation. x-showExample: false + - schema: + type: string + in: query + name: author + required: false + description: Optionally changes the author metadata when updating a function. + x-showExample: false - schema: $ref: '#/components/schemas/DeprecatePreviousPolicy' default: none @@ -13775,10 +13698,10 @@ paths: x-consumes-other: false /registry/v2/plugs/{name}/versions/{version}/interface: patch: - operationId: patchInterface_plug_functions + operationId: patchInterface_plugs summary: Patch Plug Interface tags: - - Plug Functions + - Plugs description: Patch the interface documentation of a plug version. requestBody: content: @@ -13824,10 +13747,10 @@ paths: x-consumes-other: false /registry/v2/plugs/{name}/versions/{version}/metadata: patch: - operationId: patchMetadata_plug_functions + operationId: patchMetadata_plugs summary: Patch Plug Metadata tags: - - Plug Functions + - Plugs description: Patch the metadata of a plug version. requestBody: content: @@ -13873,10 +13796,10 @@ paths: x-consumes-other: false /registry/v2/plugs/{name}/versions/{version}/jobs: get: - operationId: jobs_plug_functions + operationId: jobs_plugs summary: List Plug Jobs tags: - - Plug Functions + - Plugs description: List the ongoing and completed operations on a specific plug. parameters: - schema: @@ -13961,19 +13884,22 @@ paths: x-consumes-other: false /registry/v2/plugs/{name}/versions/{version}/verify: post: - operationId: verify_plug_functions + operationId: verify_plugs summary: Verify Health Of Plug tags: - - Plug Functions + - Plugs description: Verify health of plug deployed on openfaas. parameters: - schema: - type: string + type: boolean in: query - name: comment + name: scaleToZero required: false - description: An optional user-specified comment corresponding to the operation. - x-showExample: false + description: >- + Indicates whether the function needs to be scaled down after + successful verification. If not set, the function is scaled to zero + only if it was not active before this command. + x-showExample: true - schema: type: boolean default: true @@ -13986,16 +13912,6 @@ paths: Accepted response. If false the request will block until the job actions are completed, or a timeout occurs. x-showExample: true - - schema: - type: boolean - in: query - name: scaleToZero - required: false - description: >- - Indicates whether the function needs to be scaled down after - successful verification. If not set, the function is scaled to zero - only if it was not active before this command. - x-showExample: true - schema: type: string in: path @@ -14034,20 +13950,21 @@ paths: x-consumes-other: false /registry/v2/models/: post: - operationId: create_model_functions + operationId: create_models summary: Create Model tags: - - Model Functions + - Models description: |- Creates a new model function by uploading its assets. - The assets for a model function can be provided as either + The assets for a model function can be provided as
      -
    • a single tar archive (optionally compressed), with one of the content types - application/octet-stream, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • -
    • separate files in a multipart/form-data request
    • +
    • A single tar archive (optionally compressed), with one of the content types + application/octet-stream, application/tar, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • +
    • Separate files in a multipart/form-data request
    • +
    • A reference to the assets of another model in the copy argument
    - + The required model.json json file contains the function metadata, and must have a runtime attribute that is one of the supported runtimes (see GET /registry/v2/runtimes?functionType=kfserving). @@ -14059,192 +13976,133 @@ paths: content: application/octet-stream: schema: - title: Model Function Assets - description: > - The assets for a model function can be provided as - either -
      -
    • a single tar archive (optionally compressed), with one of the content types - application/octet-stream, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • -
    • separate files in a multipart/form-data request
    • -
    - - The required model.json json file contains the function metadata, - and must have a runtime attribute that is one of the supported runtimes - (see GET /registry/v2/runtimes?functionType=kfserving). - - For each runtime other files will be required or supported. - anyOf: - - title: Multipart file upload. - description: A multi-part upload containing one or more file assets. - type: object - properties: - filename: - type: array - items: - type: string - format: binary - - title: TAR Achive Upload - description: A single file archive containing multiple assets. + title: TAR Archive Upload + description: A single file archive containing multiple assets. + type: string + format: binary + application/tar: + schema: + title: TAR Archive Upload + description: A single file archive containing multiple assets. + type: string + format: binary application/tar+gzip: schema: - title: Model Function Assets - description: > - The assets for a model function can be provided as - either -
      -
    • a single tar archive (optionally compressed), with one of the content types - application/octet-stream, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • -
    • separate files in a multipart/form-data request
    • -
    - - The required model.json json file contains the function metadata, - and must have a runtime attribute that is one of the supported runtimes - (see GET /registry/v2/runtimes?functionType=kfserving). - - For each runtime other files will be required or supported. - anyOf: - - title: Multipart file upload. - description: A multi-part upload containing one or more file assets. - type: object - properties: - filename: - type: array - items: - type: string - format: binary - - title: TAR Achive Upload - description: A single file archive containing multiple assets. + title: TAR Archive Upload + description: A single file archive containing multiple assets. + type: string + format: binary application/x-gzip: schema: - title: Model Function Assets - description: > - The assets for a model function can be provided as - either -
      -
    • a single tar archive (optionally compressed), with one of the content types - application/octet-stream, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • -
    • separate files in a multipart/form-data request
    • -
    - - The required model.json json file contains the function metadata, - and must have a runtime attribute that is one of the supported runtimes - (see GET /registry/v2/runtimes?functionType=kfserving). - - For each runtime other files will be required or supported. - anyOf: - - title: Multipart file upload. - description: A multi-part upload containing one or more file assets. - type: object - properties: - filename: - type: array - items: - type: string - format: binary - - title: TAR Achive Upload - description: A single file archive containing multiple assets. + title: TAR Archive Upload + description: A single file archive containing multiple assets. + type: string + format: binary application/x-tar: schema: - title: Model Function Assets - description: > - The assets for a model function can be provided as - either -
      -
    • a single tar archive (optionally compressed), with one of the content types - application/octet-stream, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • -
    • separate files in a multipart/form-data request
    • -
    - - The required model.json json file contains the function metadata, - and must have a runtime attribute that is one of the supported runtimes - (see GET /registry/v2/runtimes?functionType=kfserving). - - For each runtime other files will be required or supported. - anyOf: - - title: Multipart file upload. - description: A multi-part upload containing one or more file assets. - type: object - properties: - filename: - type: array - items: - type: string - format: binary - - title: TAR Achive Upload - description: A single file archive containing multiple assets. + title: TAR Archive Upload + description: A single file archive containing multiple assets. + type: string + format: binary application/gzip: schema: - title: Model Function Assets - description: > - The assets for a model function can be provided as - either -
      -
    • a single tar archive (optionally compressed), with one of the content types - application/octet-stream, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • -
    • separate files in a multipart/form-data request
    • -
    - - The required model.json json file contains the function metadata, - and must have a runtime attribute that is one of the supported runtimes - (see GET /registry/v2/runtimes?functionType=kfserving). - - For each runtime other files will be required or supported. - anyOf: - - title: Multipart file upload. - description: A multi-part upload containing one or more file assets. - type: object - properties: - filename: - type: array - items: - type: string - format: binary - - title: TAR Achive Upload - description: A single file archive containing multiple assets. + title: TAR Archive Upload + description: A single file archive containing multiple assets. + type: string + format: binary multipart/form-data: schema: - title: Model Function Assets - description: > - The assets for a model function can be provided as - either -
      -
    • a single tar archive (optionally compressed), with one of the content types - application/octet-stream, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • -
    • separate files in a multipart/form-data request
    • -
    - - The required model.json json file contains the function metadata, - and must have a runtime attribute that is one of the supported runtimes - (see GET /registry/v2/runtimes?functionType=kfserving). - - For each runtime other files will be required or supported. - anyOf: - - title: Multipart file upload. - description: A multi-part upload containing one or more file assets. - type: object - properties: - filename: - type: array - items: - type: string - format: binary - - title: TAR Achive Upload - description: A single file archive containing multiple assets. + title: Multipart file upload. + description: >- + A multi-part upload containing one or more file assets. + + Each part should specify a filename corresponding to the asset + path. + type: object + properties: + assets: + type: array + items: + type: string + format: binary + application/json: + schema: + title: Empty Upload + description: >- + Empty object request body, only allowed when using the `copy` + query parameter. + type: object + maxProperties: 0 + '*/*+json': + schema: + title: Empty Upload + description: >- + Empty object request body, only allowed when using the `copy` + query parameter. + type: object + maxProperties: 0 description: | - The assets for a model function can be provided as either + The assets for a model function can be provided as
      -
    • a single tar archive (optionally compressed), with one of the content types - application/octet-stream, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • -
    • separate files in a multipart/form-data request
    • +
    • A single tar archive (optionally compressed), with one of the content types + application/octet-stream, application/tar, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • +
    • Separate files in a multipart/form-data request
    • +
    • A reference to the assets of another model in the copy argument
    - + The required model.json json file contains the function metadata, and must have a runtime attribute that is one of the supported runtimes (see GET /registry/v2/runtimes?functionType=kfserving). For each runtime other files will be required or supported. parameters: + - schema: + type: boolean + default: true + in: query + name: deploy + required: false + description: >- + Indicates that a function should be _deployed_ when its assets are + valid. + + + * If `true` (default), jobs to build and deploy the function will be + initiated after it is checked that the assets are valid. Invalid + assets lead to a validation error, and the function and its assets + are not created or updated. + + * If `false`, the uploaded assets are stored and the function is + created/updated in `registered` state. Asset validation errors are + only returned as warning, and stored as `failureReason` on the + function entity. Use an _asset update_ or _rebuild_ to initiate a + build and deploy at a later stage. + x-showExample: true + - schema: + type: string + in: query + name: author + required: false + description: Optionally changes the author metadata when updating a function. + x-showExample: false + - schema: + type: string + in: query + name: comment + required: false + description: An optional user-specified comment corresponding to the operation. + x-showExample: false + - schema: + type: boolean + default: false + in: query + name: scaleToZero + required: false + description: >- + If set to true, after successful deployment, the + deployed function will be scaled to zero. This saves computing + resources when the function is not to be used immediately. + x-showExample: true - schema: $ref: '#/components/schemas/DeprecatePreviousPolicy' default: patch @@ -14276,17 +14134,6 @@ paths: Accepted response. If false the request will block until the job actions are completed, or a timeout occurs. x-showExample: true - - schema: - type: boolean - default: false - in: query - name: scaleToZero - required: false - description: >- - If set to true, after successful deployment, the - deployed function will be scaled to zero. Saves computing resources - when the function is not to be used immediately. - x-showExample: true - schema: $ref: '#/components/schemas/SemanticVersionRange' in: query @@ -14318,6 +14165,100 @@ paths: are still mutable. A build and deploy is initiated only in the case when all necessary assets are present and valid. x-showExample: true + - schema: + $ref: '#/components/schemas/NamedVersionRange' + in: query + name: runtime + required: false + description: >- + If set, the created function will use the indicated runtime (latest + version within specified range). + + + This takes precedence over the runtime specified in a function + manifest (copied or from request body). + x-showExample: false + - schema: + anyOf: + - $ref: '#/components/schemas/NamedVersionRange' + - $ref: '#/components/schemas/ExampleReference' + in: query + name: copy + required: false + description: >- + Indicates the _source_ of initial assets for a _new function_. + + + When using this query parameter, the request body does not need to + contain assets, but any assets in the request body will overwrite + the copied assets. + + + #### Selection of _assets_ source + + + * If set as `[@]`, the _new + function_ will be created with copied assets of the selected _source + function_. + + * If set as `!example`, a `runtime` query parameter is required, and + the _new function_ will be initialized with assets of the _runtime + example_. + + + #### Selection of the _source function_ + + + When `` is a range (or is not given), the latest + _published_ version (in that range) is used. + + + If no _published_ version exists, the latest _draft_ is selected. + + + If no versions in the range exist, a `404` _Not Found_ error is + returned. + + + #### The `name` of the _new function_ + + + If a `name` is NOT specified (either as query parameter, or in an + optional manifest asset in the request body), the `name` of the _new + function_ will be that of the _source function_. + + + #### The `version` of the _new function_ + + + When the _target_ and _source_ name are equal, the `version` query + parameters is defaulted to `` + (`~` when it's an exact version) + + + The version of the _new function_ will be: + + * If a `version` is NOT specified (either as query parameter, in an + optional manifest asset, or as `` _default_) + + * a **patch increment** (`..+1`) of the latest **existing version** with the target `name` + + * **`1.0.0`** otherwise + + * If a `version` is specified: + + * the **lowest version** in that range **if no existing version** is in that range. + + * an **increment** of the latest existing version, **at the highest level** (_major_,_minor_,_patch_) allowed by that range. + + * otherwise, if all allowed versions already exist, a **`409` _Duplicate_ error** is raised. + + #### Deployment overrides + + + The new function will use the deployment overrides of the copied + function, unless a _manifest_ was specified in the request body. + x-showExample: false x-version: v2 responses: '201': @@ -14337,13 +14278,13 @@ paths: x-py-method: create x-consumes-multipart: true x-consumes-urlencoded: false - x-consumes-json: false + x-consumes-json: true x-consumes-other: true get: - operationId: list_model_functions + operationId: list_models summary: List Models tags: - - Model Functions + - Models description: > List the (latest) versions of available models. @@ -14364,11 +14305,15 @@ paths: - As long as no _version filters_ are used, each listed model - version item will contain a HAL **link to the + As long as no version filters are used, each listed model + version contains representations of the latest draft + (`entities[]._links.draft`) - latest** _draft_ (`entities[]._links.draft`) or latest _published_ - (`entities[]._links.publisned`) version (if existing and different). + or latest published (`entities[]._links.published`) version (if existing + and different). + + Use the query parameter `showRelated` to include only a link (default + `showRelated=link`) or a full representation (`showRelated=embed`). ### List Latest Model Versions (with filter) @@ -14610,6 +14555,21 @@ paths: returned. Defaults to `true`, except when specific versions are selected with the `nameVersion` filter. x-showExample: true + - schema: + $ref: '#/components/schemas/ShowRelatedType' + in: query + name: showRelated + required: false + description: >- + Sets the representation of related function versions (like the + _latest_ draft and/or published) in the response. + + - `embed`: as full summary representation (in `_embedded`). + + - `link`: as HAL link in (in `_links`). + + - `none`: omitted. + x-showExample: true x-version: v2 responses: '200': @@ -14627,10 +14587,10 @@ paths: x-consumes-other: false /registry/v2/models/{name}: get: - operationId: getLatest_model_functions + operationId: getLatest_models summary: Get Latest Model Version tags: - - Model Functions + - Models description: |- Fetch the latest version of a model. @@ -14696,10 +14656,10 @@ paths: x-consumes-json: false x-consumes-other: false delete: - operationId: removeVersions_model_functions + operationId: removeVersions_models summary: Remove Model tags: - - Model Functions + - Models description: > Deprecate, undeploy and/or remove all versions of this named model. @@ -14809,10 +14769,10 @@ paths: x-consumes-other: false /registry/v2/models/{name}/versions: get: - operationId: listVersions_model_functions + operationId: listVersions_models summary: List Model Versions tags: - - Model Functions + - Models description: List all deployed versions of a model. parameters: - schema: @@ -14976,10 +14936,10 @@ paths: x-consumes-other: false /registry/v2/models/{name}/versions/{version}: get: - operationId: get_model_functions + operationId: get_models summary: Get Model Version tags: - - Model Functions + - Models description: Get a model by name and version. parameters: - schema: @@ -15012,10 +14972,10 @@ paths: x-consumes-json: false x-consumes-other: false delete: - operationId: removeVersion_model_functions + operationId: removeVersion_models summary: Remove Model Version tags: - - Model Functions + - Models description: | Deprecate, undeploy and/or remove a model version. @@ -15131,10 +15091,10 @@ paths: x-consumes-other: false /registry/v2/models/{name}/versions/{version}/content: get: - operationId: getArchive_model_functions + operationId: getArchive_models summary: Get Model Archive tags: - - Model Functions + - Models description: Get the specification archive of a model. parameters: - schema: @@ -15173,6 +15133,12 @@ paths: description: Model archive type: string format: binary + application/tar: + schema: + title: Archive + description: Model archive + type: string + format: binary application/tar+gzip: schema: title: Archive @@ -15208,17 +15174,17 @@ paths: x-consumes-json: false x-consumes-other: false put: - operationId: updateAssets_model_functions + operationId: updateAssets_models summary: Update Model Assets tags: - - Model Functions + - Models description: |- Update a draft model function by updating its assets. The assets for a model function can be provided as either
    • a single tar archive (optionally compressed), with one of the content types - application/octet-stream, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • + application/octet-stream, application/tar, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • separate files in a multipart/form-data request
    @@ -15235,195 +15201,60 @@ paths: content: application/octet-stream: schema: - title: Model Function Assets - description: > - The assets for a model function can be provided as - either -
      -
    • a single tar archive (optionally compressed), with one of the content types - application/octet-stream, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • -
    • separate files in a multipart/form-data request
    • -
    - - The provided assets will be added to the model function's collection of existing assets, - replacing any existing assets with the same name. - - Please note that it is not allowed to update the model.json json file with a changed value for any of the - name, version and/or runtime attributes. - - For each runtime other files are supported. - anyOf: - - title: Multipart file upload. - description: A multi-part upload containing one or more file assets. - type: object - properties: - filename: - type: array - items: - type: string - format: binary - - title: TAR Achive Upload - description: A single file archive containing multiple assets. + title: TAR Archive Upload + description: A single file archive containing multiple assets. + type: string + format: binary + application/tar: + schema: + title: TAR Archive Upload + description: A single file archive containing multiple assets. + type: string + format: binary application/tar+gzip: schema: - title: Model Function Assets - description: > - The assets for a model function can be provided as - either -
      -
    • a single tar archive (optionally compressed), with one of the content types - application/octet-stream, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • -
    • separate files in a multipart/form-data request
    • -
    - - The provided assets will be added to the model function's collection of existing assets, - replacing any existing assets with the same name. - - Please note that it is not allowed to update the model.json json file with a changed value for any of the - name, version and/or runtime attributes. - - For each runtime other files are supported. - anyOf: - - title: Multipart file upload. - description: A multi-part upload containing one or more file assets. - type: object - properties: - filename: - type: array - items: - type: string - format: binary - - title: TAR Achive Upload - description: A single file archive containing multiple assets. + title: TAR Archive Upload + description: A single file archive containing multiple assets. + type: string + format: binary application/x-gzip: schema: - title: Model Function Assets - description: > - The assets for a model function can be provided as - either -
      -
    • a single tar archive (optionally compressed), with one of the content types - application/octet-stream, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • -
    • separate files in a multipart/form-data request
    • -
    - - The provided assets will be added to the model function's collection of existing assets, - replacing any existing assets with the same name. - - Please note that it is not allowed to update the model.json json file with a changed value for any of the - name, version and/or runtime attributes. - - For each runtime other files are supported. - anyOf: - - title: Multipart file upload. - description: A multi-part upload containing one or more file assets. - type: object - properties: - filename: - type: array - items: - type: string - format: binary - - title: TAR Achive Upload - description: A single file archive containing multiple assets. + title: TAR Archive Upload + description: A single file archive containing multiple assets. + type: string + format: binary application/x-tar: schema: - title: Model Function Assets - description: > - The assets for a model function can be provided as - either -
      -
    • a single tar archive (optionally compressed), with one of the content types - application/octet-stream, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • -
    • separate files in a multipart/form-data request
    • -
    - - The provided assets will be added to the model function's collection of existing assets, - replacing any existing assets with the same name. - - Please note that it is not allowed to update the model.json json file with a changed value for any of the - name, version and/or runtime attributes. - - For each runtime other files are supported. - anyOf: - - title: Multipart file upload. - description: A multi-part upload containing one or more file assets. - type: object - properties: - filename: - type: array - items: - type: string - format: binary - - title: TAR Achive Upload - description: A single file archive containing multiple assets. + title: TAR Archive Upload + description: A single file archive containing multiple assets. + type: string + format: binary application/gzip: schema: - title: Model Function Assets - description: > - The assets for a model function can be provided as - either -
      -
    • a single tar archive (optionally compressed), with one of the content types - application/octet-stream, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • -
    • separate files in a multipart/form-data request
    • -
    - - The provided assets will be added to the model function's collection of existing assets, - replacing any existing assets with the same name. - - Please note that it is not allowed to update the model.json json file with a changed value for any of the - name, version and/or runtime attributes. - - For each runtime other files are supported. - anyOf: - - title: Multipart file upload. - description: A multi-part upload containing one or more file assets. - type: object - properties: - filename: - type: array - items: - type: string - format: binary - - title: TAR Achive Upload - description: A single file archive containing multiple assets. + title: TAR Archive Upload + description: A single file archive containing multiple assets. + type: string + format: binary multipart/form-data: schema: - title: Model Function Assets - description: > - The assets for a model function can be provided as - either -
      -
    • a single tar archive (optionally compressed), with one of the content types - application/octet-stream, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • -
    • separate files in a multipart/form-data request
    • -
    - - The provided assets will be added to the model function's collection of existing assets, - replacing any existing assets with the same name. - - Please note that it is not allowed to update the model.json json file with a changed value for any of the - name, version and/or runtime attributes. - - For each runtime other files are supported. - anyOf: - - title: Multipart file upload. - description: A multi-part upload containing one or more file assets. - type: object - properties: - filename: - type: array - items: - type: string - format: binary - - title: TAR Achive Upload - description: A single file archive containing multiple assets. + title: Multipart file upload. + description: >- + A multi-part upload containing one or more file assets. + + Each part should specify a filename corresponding to the asset + path. + type: object + properties: + assets: + type: array + items: + type: string + format: binary description: | The assets for a model function can be provided as either
    • a single tar archive (optionally compressed), with one of the content types - application/octet-stream, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • + application/octet-stream, application/tar, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • separate files in a multipart/form-data request
    @@ -15436,34 +15267,74 @@ paths: For each runtime other files are supported. parameters: - schema: - type: string + type: boolean + default: false in: query - name: comment + name: scaleToZero required: false - description: An optional user-specified comment corresponding to the operation. - x-showExample: false + description: >- + If set to true, after successful deployment, the + deployed function will be scaled to zero. This saves computing + resources when the function is not to be used immediately. + x-showExample: true - schema: type: boolean default: true in: query - name: async + name: deploy required: false description: >- - Unless this is set to false, the server will start the - required job actions asynchronously and return a 202 - Accepted response. If false the request will - block until the job actions are completed, or a timeout occurs. + Indicates that a function should be _deployed_ when its assets are + valid. + + + * If `true` (default), jobs to build and deploy the function will be + initiated after it is checked that the assets are valid. Invalid + assets lead to a validation error, and the function and its assets + are not created or updated. + + * If `false`, the uploaded assets are stored and the function is + created/updated in `registered` state. Asset validation errors are + only returned as warning, and stored as `failureReason` on the + function entity. Use an _asset update_ or _rebuild_ to initiate a + build and deploy at a later stage. x-showExample: true - schema: type: boolean default: false in: query name: chown - required: true + required: false description: >- If set, ownership of the draft function is transferred to the current user. x-showExample: true + - schema: + type: string + in: query + name: comment + required: false + description: An optional user-specified comment corresponding to the operation. + x-showExample: false + - schema: + type: string + in: query + name: author + required: false + description: Optionally changes the author metadata when updating a function. + x-showExample: false + - schema: + type: boolean + default: true + in: query + name: async + required: false + description: >- + Unless this is set to false, the server will start the + required job actions asynchronously and return a 202 + Accepted response. If false the request will + block until the job actions are completed, or a timeout occurs. + x-showExample: true - schema: type: string in: path @@ -15492,6 +15363,12 @@ paths: application/json: schema: $ref: '#/components/schemas/PostModelJobAsyncResponseV2' + '403': + description: Default Response + content: + application/json: + schema: + $ref: '#/components/schemas/RegistryErrorResponse' security: - waylayApiKeySecret: [] x-py-method: update_assets @@ -15501,10 +15378,10 @@ paths: x-consumes-other: true /registry/v2/models/{name}/versions/{version}/content/{wildcard}: get: - operationId: getAsset_model_functions + operationId: getAsset_models summary: Get File From Model Archive tags: - - Model Functions + - Models description: Get a file from the specification archive of a model. parameters: - schema: @@ -15550,6 +15427,12 @@ paths: description: Model archive type: string format: binary + application/tar: + schema: + title: Archive + description: Model archive + type: string + format: binary application/tar+gzip: schema: title: Archive @@ -15585,10 +15468,10 @@ paths: x-consumes-json: false x-consumes-other: false put: - operationId: updateAsset_model_functions + operationId: updateAsset_models summary: Update Model Asset tags: - - Model Functions + - Models description: >- The provided asset will be added to the model function's collection of existing assets, @@ -15601,7 +15484,7 @@ paths: requestBody: content: - application/octet-stream: + '*/*': schema: title: File Upload description: A single asset file. @@ -15613,34 +15496,74 @@ paths: description: A single asset file. parameters: - schema: - type: string + type: boolean + default: false in: query - name: comment + name: scaleToZero required: false - description: An optional user-specified comment corresponding to the operation. - x-showExample: false + description: >- + If set to true, after successful deployment, the + deployed function will be scaled to zero. This saves computing + resources when the function is not to be used immediately. + x-showExample: true - schema: type: boolean default: true in: query - name: async + name: deploy required: false description: >- - Unless this is set to false, the server will start the - required job actions asynchronously and return a 202 - Accepted response. If false the request will - block until the job actions are completed, or a timeout occurs. + Indicates that a function should be _deployed_ when its assets are + valid. + + + * If `true` (default), jobs to build and deploy the function will be + initiated after it is checked that the assets are valid. Invalid + assets lead to a validation error, and the function and its assets + are not created or updated. + + * If `false`, the uploaded assets are stored and the function is + created/updated in `registered` state. Asset validation errors are + only returned as warning, and stored as `failureReason` on the + function entity. Use an _asset update_ or _rebuild_ to initiate a + build and deploy at a later stage. x-showExample: true - schema: type: boolean default: false in: query name: chown - required: true + required: false description: >- If set, ownership of the draft function is transferred to the current user. x-showExample: true + - schema: + type: string + in: query + name: comment + required: false + description: An optional user-specified comment corresponding to the operation. + x-showExample: false + - schema: + type: string + in: query + name: author + required: false + description: Optionally changes the author metadata when updating a function. + x-showExample: false + - schema: + type: boolean + default: true + in: query + name: async + required: false + description: >- + Unless this is set to false, the server will start the + required job actions asynchronously and return a 202 + Accepted response. If false the request will + block until the job actions are completed, or a timeout occurs. + x-showExample: true - schema: type: string in: path @@ -15676,6 +15599,12 @@ paths: application/json: schema: $ref: '#/components/schemas/PostModelJobAsyncResponseV2' + '403': + description: Default Response + content: + application/json: + schema: + $ref: '#/components/schemas/RegistryErrorResponse' security: - waylayApiKeySecret: [] x-py-method: update_asset @@ -15684,41 +15613,81 @@ paths: x-consumes-json: false x-consumes-other: true delete: - operationId: deleteAsset_model_functions + operationId: deleteAsset_models summary: Delete Model Asset tags: - - Model Functions + - Models description: Delete an asset from the model's collection of existing assets. parameters: - schema: - type: string + type: boolean + default: false in: query - name: comment + name: scaleToZero required: false - description: An optional user-specified comment corresponding to the operation. - x-showExample: false + description: >- + If set to true, after successful deployment, the + deployed function will be scaled to zero. This saves computing + resources when the function is not to be used immediately. + x-showExample: true - schema: type: boolean default: true in: query - name: async + name: deploy required: false description: >- - Unless this is set to false, the server will start the - required job actions asynchronously and return a 202 - Accepted response. If false the request will - block until the job actions are completed, or a timeout occurs. + Indicates that a function should be _deployed_ when its assets are + valid. + + + * If `true` (default), jobs to build and deploy the function will be + initiated after it is checked that the assets are valid. Invalid + assets lead to a validation error, and the function and its assets + are not created or updated. + + * If `false`, the uploaded assets are stored and the function is + created/updated in `registered` state. Asset validation errors are + only returned as warning, and stored as `failureReason` on the + function entity. Use an _asset update_ or _rebuild_ to initiate a + build and deploy at a later stage. x-showExample: true - schema: type: boolean default: false in: query name: chown - required: true + required: false description: >- If set, ownership of the draft function is transferred to the current user. x-showExample: true + - schema: + type: string + in: query + name: comment + required: false + description: An optional user-specified comment corresponding to the operation. + x-showExample: false + - schema: + type: string + in: query + name: author + required: false + description: Optionally changes the author metadata when updating a function. + x-showExample: false + - schema: + type: boolean + default: true + in: query + name: async + required: false + description: >- + Unless this is set to false, the server will start the + required job actions asynchronously and return a 202 + Accepted response. If false the request will + block until the job actions are completed, or a timeout occurs. + x-showExample: true - schema: type: string in: path @@ -15754,6 +15723,12 @@ paths: application/json: schema: $ref: '#/components/schemas/PostModelJobAsyncResponseV2' + '403': + description: Default Response + content: + application/json: + schema: + $ref: '#/components/schemas/RegistryErrorResponse' security: - waylayApiKeySecret: [] x-py-method: delete_asset @@ -15763,10 +15738,10 @@ paths: x-consumes-other: false /registry/v2/models/{name}/versions/{version}/publish: post: - operationId: publish_model_functions + operationId: publish_models summary: Publish Draft Model tags: - - Model Functions + - Models description: >- Mark the model to be ready and stable, taking it out of draft mode., @@ -15776,6 +15751,16 @@ paths: In other statuses, plug-registry may need to initiate a new build and deployment procedure. parameters: + - schema: + type: boolean + default: false + in: query + name: chown + required: false + description: >- + If set, ownership of the draft function is transferred to the + current user. + x-showExample: true - schema: type: string in: query @@ -15783,6 +15768,13 @@ paths: required: false description: An optional user-specified comment corresponding to the operation. x-showExample: false + - schema: + type: string + in: query + name: author + required: false + description: Optionally changes the author metadata when updating a function. + x-showExample: false - schema: $ref: '#/components/schemas/DeprecatePreviousPolicy' default: patch @@ -15844,10 +15836,10 @@ paths: x-consumes-other: false /registry/v2/models/{name}/versions/{version}/metadata: patch: - operationId: patchMetadata_model_functions + operationId: patchMetadata_models summary: Patch Model Metadata tags: - - Model Functions + - Models description: Patch the metadata of a model version. requestBody: content: @@ -15893,10 +15885,10 @@ paths: x-consumes-other: false /registry/v2/models/{name}/versions/{version}/jobs: get: - operationId: jobs_model_functions + operationId: jobs_models summary: List Model Jobs tags: - - Model Functions + - Models description: List the ongoing and completed operations on a model. parameters: - schema: @@ -15981,12 +15973,22 @@ paths: x-consumes-other: false /registry/v2/models/{name}/versions/{version}/rebuild: post: - operationId: rebuild_model_functions + operationId: rebuild_models summary: Rebuild Model tags: - - Model Functions + - Models description: Rebuild and deploy a model with the original or updated base image. parameters: + - schema: + type: boolean + in: query + name: scaleToZero + required: false + description: >- + Indicates whether the function needs to be scaled down after + successful verification. If not set, the function is scaled to zero + only if it was not active before this command. + x-showExample: true - schema: type: string in: query @@ -16058,16 +16060,6 @@ paths: * the `dryRun` option x-showExample: true - - schema: - type: boolean - in: query - name: scaleToZero - required: false - description: >- - Indicates whether the function needs to be scaled down after - successful (re-)deployment. If not set, the function is scaled to - zero only if it was not active before this command. - x-showExample: true - schema: type: boolean in: query @@ -16114,19 +16106,22 @@ paths: x-consumes-other: false /registry/v2/models/{name}/versions/{version}/verify: post: - operationId: verify_model_functions + operationId: verify_models summary: Verify Health Of Model tags: - - Model Functions + - Models description: Verify health of model deployed on openfaas. parameters: - schema: - type: string + type: boolean in: query - name: comment + name: scaleToZero required: false - description: An optional user-specified comment corresponding to the operation. - x-showExample: false + description: >- + Indicates whether the function needs to be scaled down after + successful verification. If not set, the function is scaled to zero + only if it was not active before this command. + x-showExample: true - schema: type: boolean default: true @@ -16139,16 +16134,6 @@ paths: Accepted response. If false the request will block until the job actions are completed, or a timeout occurs. x-showExample: true - - schema: - type: boolean - in: query - name: scaleToZero - required: false - description: >- - Indicates whether the function needs to be scaled down after - successful verification. If not set, the function is scaled to zero - only if it was not active before this command. - x-showExample: true - schema: type: string in: path @@ -16186,6 +16171,15 @@ paths: x-consumes-json: false x-consumes-other: false tags: + - name: Models + description: BYOML Models are functions that wrap a machine learning model. + externalDocs: + url: https://docs-staging.waylay.io/#/features/byoml/ + description: Waylay Documentation + - name: Plugs + description: Plugs are functions that can be used in the rule engine. + - name: Webscripts + description: Webscripts are functions that are securely exposed to an http endpoint. - name: Jobs description: >- Jobs represent the ongoing asynchronous operations in the function @@ -16195,9 +16189,13 @@ tags: Runtimes are the available base infrastructure for functions, and define how the plug gets build and deployed. + - name: Schemas + description: Schemas referenced in the API. + - name: About + description: Version and Health information. externalDocs: - url: https://docs.waylay.io/#/api/registry/ + url: https://docs-staging.waylay.io/#/api/registry/ description: Waylay Documentation servers: - - url: https://api.waylay.io - description: Waylay enterprise gateway + - url: https://api-aws-dev.waylay.io + description: Waylay staging gateway diff --git a/test/api/model_functions_api_test.py b/test/api/models_api_test.py similarity index 90% rename from test/api/model_functions_api_test.py rename to test/api/models_api_test.py index 316e3499..300c1936 100644 --- a/test/api/model_functions_api_test.py +++ b/test/api/models_api_test.py @@ -19,9 +19,12 @@ from typeguard import check_type from waylay.sdk import ApiClient, WaylayClient from waylay.sdk.api._models import Model -from waylay.services.registry.api import ModelFunctionsApi +from waylay.services.registry.api import ModelsApi from waylay.services.registry.service import RegistryService +from ..types.create_webscripts_copy_parameter_stub import ( + CreateWebscriptsCopyParameterStub, +) from ..types.function_meta_stub import FunctionMetaStub from ..types.get_model_response_v2_stub import GetModelResponseV2Stub from ..types.jobs_for_model_response_v2_stub import JobsForModelResponseV2Stub @@ -52,7 +55,7 @@ UndeploySubmittedResponseV2, VerifyModelSyncResponseV2, ) - from waylay.services.registry.queries.model_functions_api import ( + from waylay.services.registry.queries.models_api import ( CreateQuery, DeleteAssetQuery, GetArchiveQuery, @@ -77,13 +80,13 @@ @pytest.fixture -def model_functions_api(waylay_api_client: ApiClient) -> ModelFunctionsApi: - return ModelFunctionsApi(waylay_api_client) +def models_api(waylay_api_client: ApiClient) -> ModelsApi: + return ModelsApi(waylay_api_client) def test_registered(waylay_client: WaylayClient): - """Test that ModelFunctionsApi api is registered in the sdk client.""" - assert isinstance(waylay_client.registry.model_functions, ModelFunctionsApi) + """Test that ModelsApi api is registered in the sdk client.""" + assert isinstance(waylay_client.registry.models, ModelsApi) def _create_set_mock_response(httpx_mock: HTTPXMock, gateway_url: str): @@ -109,14 +112,20 @@ async def test_create( kwargs = { # optionally use CreateQuery to validate and reuse parameters "query": CreateQuery( + deploy=True, + author="author_example", + comment="comment_example", + scale_to_zero=False, deprecate_previous="none", dry_run=True, var_async=True, - scale_to_zero=False, version=SemanticVersionRangeStub.create_json(), name="name_example", draft=False, + runtime="runtime_example", + copy_from=CreateWebscriptsCopyParameterStub.create_json(), ), + "json": None, "content": b"some_binary_content", "headers": {"content-type": "application/octet-stream"}, "files": { @@ -125,7 +134,7 @@ async def test_create( }, } _create_set_mock_response(httpx_mock, gateway_url) - resp = await service.model_functions.create(**kwargs) + resp = await service.models.create(**kwargs) check_type( resp, Union[ @@ -146,23 +155,29 @@ async def test_create_without_types( # set path params kwargs = { "query": { + "deploy": True, + "author": "author_example", + "comment": "comment_example", + "scaleToZero": False, "deprecatePrevious": "none", "dryRun": True, "async": True, - "scaleToZero": False, "version": SemanticVersionRangeStub.create_json(), "name": "name_example", "draft": False, + "runtime": "runtime_example", + "copy": CreateWebscriptsCopyParameterStub.create_json(), }, "files": { "myFile1": b"...first file content...", "myFile2": b"...second file content...", }, + "json": None, "content": b"some_binary_content", "headers": {"content-type": "application/octet-stream"}, } _create_set_mock_response(httpx_mock, gateway_url) - resp = await service.model_functions.create(**kwargs) + resp = await service.models.create(**kwargs) check_type(resp, Model) @@ -199,9 +214,12 @@ async def test_delete_asset( kwargs = { # optionally use DeleteAssetQuery to validate and reuse parameters "query": DeleteAssetQuery( + scale_to_zero=False, + deploy=True, + chown=False, comment="comment_example", + author="author_example", var_async=True, - chown=False, ), } _delete_asset_set_mock_response( @@ -211,7 +229,7 @@ async def test_delete_asset( quote(str(version)), quote(str(wildcard)), ) - resp = await service.model_functions.delete_asset(name, version, wildcard, **kwargs) + resp = await service.models.delete_asset(name, version, wildcard, **kwargs) check_type( resp, Union[ @@ -238,9 +256,12 @@ async def test_delete_asset_without_types( kwargs = { "query": { + "scaleToZero": False, + "deploy": True, + "chown": False, "comment": "comment_example", + "author": "author_example", "async": True, - "chown": False, }, } _delete_asset_set_mock_response( @@ -250,7 +271,7 @@ async def test_delete_asset_without_types( quote(str(version)), quote(str(wildcard)), ) - resp = await service.model_functions.delete_asset(name, version, wildcard, **kwargs) + resp = await service.models.delete_asset(name, version, wildcard, **kwargs) check_type(resp, Model) @@ -291,7 +312,7 @@ async def test_get_archive( _get_archive_set_mock_response( httpx_mock, gateway_url, quote(str(name)), quote(str(version)) ) - resp = await service.model_functions.get_archive(name, version, **kwargs) + resp = await service.models.get_archive(name, version, **kwargs) check_type(resp, bytes) @@ -316,7 +337,7 @@ async def test_get_archive_without_types( _get_archive_set_mock_response( httpx_mock, gateway_url, quote(str(name)), quote(str(version)) ) - resp = await service.model_functions.get_archive(name, version, **kwargs) + resp = await service.models.get_archive(name, version, **kwargs) check_type(resp, bytes) @@ -363,7 +384,7 @@ async def test_get_asset( quote(str(version)), quote(str(wildcard)), ) - resp = await service.model_functions.get_asset(name, version, wildcard, **kwargs) + resp = await service.models.get_asset(name, version, wildcard, **kwargs) check_type(resp, bytes) @@ -394,7 +415,7 @@ async def test_get_asset_without_types( quote(str(version)), quote(str(wildcard)), ) - resp = await service.model_functions.get_asset(name, version, wildcard, **kwargs) + resp = await service.models.get_asset(name, version, wildcard, **kwargs) check_type(resp, bytes) @@ -428,7 +449,7 @@ async def test_get_latest( ), } _get_latest_set_mock_response(httpx_mock, gateway_url, quote(str(name))) - resp = await service.model_functions.get_latest(name, **kwargs) + resp = await service.models.get_latest(name, **kwargs) check_type(resp, Union[GetModelResponseV2,]) @@ -450,7 +471,7 @@ async def test_get_latest_without_types( }, } _get_latest_set_mock_response(httpx_mock, gateway_url, quote(str(name))) - resp = await service.model_functions.get_latest(name, **kwargs) + resp = await service.models.get_latest(name, **kwargs) check_type(resp, Model) @@ -484,7 +505,7 @@ async def test_get(service: RegistryService, gateway_url: str, httpx_mock: HTTPX _get_set_mock_response( httpx_mock, gateway_url, quote(str(name)), quote(str(version)) ) - resp = await service.model_functions.get(name, version, **kwargs) + resp = await service.models.get(name, version, **kwargs) check_type(resp, Union[GetModelResponseV2,]) @@ -505,7 +526,7 @@ async def test_get_without_types( _get_set_mock_response( httpx_mock, gateway_url, quote(str(name)), quote(str(version)) ) - resp = await service.model_functions.get(name, version, **kwargs) + resp = await service.models.get(name, version, **kwargs) check_type(resp, Model) @@ -549,7 +570,7 @@ async def test_jobs(service: RegistryService, gateway_url: str, httpx_mock: HTTP _jobs_set_mock_response( httpx_mock, gateway_url, quote(str(name)), quote(str(version)) ) - resp = await service.model_functions.jobs(name, version, **kwargs) + resp = await service.models.jobs(name, version, **kwargs) check_type(resp, Union[JobsForModelResponseV2,]) @@ -579,7 +600,7 @@ async def test_jobs_without_types( _jobs_set_mock_response( httpx_mock, gateway_url, quote(str(name)), quote(str(version)) ) - resp = await service.model_functions.jobs(name, version, **kwargs) + resp = await service.models.jobs(name, version, **kwargs) check_type(resp, Model) @@ -624,10 +645,11 @@ async def test_list(service: RegistryService, gateway_url: str, httpx_mock: HTTP archive_format=[], runtime=[], latest=True, + show_related="embed", ), } _list_set_mock_response(httpx_mock, gateway_url) - resp = await service.model_functions.list(**kwargs) + resp = await service.models.list(**kwargs) check_type(resp, Union[LatestModelsResponseV2,]) @@ -662,10 +684,11 @@ async def test_list_without_types( "archiveFormat": [], "runtime": [], "latest": True, + "showRelated": "embed", }, } _list_set_mock_response(httpx_mock, gateway_url) - resp = await service.model_functions.list(**kwargs) + resp = await service.models.list(**kwargs) check_type(resp, Model) @@ -714,7 +737,7 @@ async def test_list_versions( ), } _list_versions_set_mock_response(httpx_mock, gateway_url, quote(str(name))) - resp = await service.model_functions.list_versions(name, **kwargs) + resp = await service.models.list_versions(name, **kwargs) check_type(resp, Union[ModelVersionsResponseV2,]) @@ -749,7 +772,7 @@ async def test_list_versions_without_types( }, } _list_versions_set_mock_response(httpx_mock, gateway_url, quote(str(name))) - resp = await service.model_functions.list_versions(name, **kwargs) + resp = await service.models.list_versions(name, **kwargs) check_type(resp, Model) @@ -791,7 +814,7 @@ async def test_patch_metadata( _patch_metadata_set_mock_response( httpx_mock, gateway_url, quote(str(name)), quote(str(version)) ) - resp = await service.model_functions.patch_metadata(name, version, **kwargs) + resp = await service.models.patch_metadata(name, version, **kwargs) check_type(resp, Union[GetModelResponseV2,]) @@ -817,7 +840,7 @@ async def test_patch_metadata_without_types( _patch_metadata_set_mock_response( httpx_mock, gateway_url, quote(str(name)), quote(str(version)) ) - resp = await service.model_functions.patch_metadata(name, version, **kwargs) + resp = await service.models.patch_metadata(name, version, **kwargs) check_type(resp, Model) @@ -852,7 +875,9 @@ async def test_publish( kwargs = { # optionally use PublishQuery to validate and reuse parameters "query": PublishQuery( + chown=False, comment="comment_example", + author="author_example", deprecate_previous="none", var_async=True, ), @@ -860,7 +885,7 @@ async def test_publish( _publish_set_mock_response( httpx_mock, gateway_url, quote(str(name)), quote(str(version)) ) - resp = await service.model_functions.publish(name, version, **kwargs) + resp = await service.models.publish(name, version, **kwargs) check_type( resp, Union[ @@ -885,7 +910,9 @@ async def test_publish_without_types( kwargs = { "query": { + "chown": False, "comment": "comment_example", + "author": "author_example", "deprecatePrevious": "none", "async": True, }, @@ -893,7 +920,7 @@ async def test_publish_without_types( _publish_set_mock_response( httpx_mock, gateway_url, quote(str(name)), quote(str(version)) ) - resp = await service.model_functions.publish(name, version, **kwargs) + resp = await service.models.publish(name, version, **kwargs) check_type(resp, Model) @@ -928,20 +955,20 @@ async def test_rebuild( kwargs = { # optionally use RebuildQuery to validate and reuse parameters "query": RebuildQuery( + scale_to_zero=True, comment="comment_example", dry_run=True, var_async=True, upgrade="patch", force_version="force_version_example", ignore_checks=True, - scale_to_zero=True, skip_rebuild=True, ), } _rebuild_set_mock_response( httpx_mock, gateway_url, quote(str(name)), quote(str(version)) ) - resp = await service.model_functions.rebuild(name, version, **kwargs) + resp = await service.models.rebuild(name, version, **kwargs) check_type( resp, Union[ @@ -966,20 +993,20 @@ async def test_rebuild_without_types( kwargs = { "query": { + "scaleToZero": True, "comment": "comment_example", "dryRun": True, "async": True, "upgrade": "patch", "forceVersion": "force_version_example", "ignoreChecks": True, - "scaleToZero": True, "skipRebuild": True, }, } _rebuild_set_mock_response( httpx_mock, gateway_url, quote(str(name)), quote(str(version)) ) - resp = await service.model_functions.rebuild(name, version, **kwargs) + resp = await service.models.rebuild(name, version, **kwargs) check_type(resp, Model) @@ -1023,7 +1050,7 @@ async def test_remove_version( _remove_version_set_mock_response( httpx_mock, gateway_url, quote(str(name)), quote(str(version)) ) - resp = await service.model_functions.remove_version(name, version, **kwargs) + resp = await service.models.remove_version(name, version, **kwargs) check_type( resp, Union[ @@ -1057,7 +1084,7 @@ async def test_remove_version_without_types( _remove_version_set_mock_response( httpx_mock, gateway_url, quote(str(name)), quote(str(version)) ) - resp = await service.model_functions.remove_version(name, version, **kwargs) + resp = await service.models.remove_version(name, version, **kwargs) check_type(resp, Model) @@ -1095,7 +1122,7 @@ async def test_remove_versions( ), } _remove_versions_set_mock_response(httpx_mock, gateway_url, quote(str(name))) - resp = await service.model_functions.remove_versions(name, **kwargs) + resp = await service.models.remove_versions(name, **kwargs) check_type( resp, Union[ @@ -1125,7 +1152,7 @@ async def test_remove_versions_without_types( }, } _remove_versions_set_mock_response(httpx_mock, gateway_url, quote(str(name))) - resp = await service.model_functions.remove_versions(name, **kwargs) + resp = await service.models.remove_versions(name, **kwargs) check_type(resp, Model) @@ -1162,9 +1189,12 @@ async def test_update_asset( kwargs = { # optionally use UpdateAssetQuery to validate and reuse parameters "query": UpdateAssetQuery( + scale_to_zero=False, + deploy=True, + chown=False, comment="comment_example", + author="author_example", var_async=True, - chown=False, ), "content": b"some_binary_content", "headers": {"content-type": "application/octet-stream"}, @@ -1176,7 +1206,7 @@ async def test_update_asset( quote(str(version)), quote(str(wildcard)), ) - resp = await service.model_functions.update_asset(name, version, wildcard, **kwargs) + resp = await service.models.update_asset(name, version, wildcard, **kwargs) check_type( resp, Union[ @@ -1203,9 +1233,12 @@ async def test_update_asset_without_types( kwargs = { "query": { + "scaleToZero": False, + "deploy": True, + "chown": False, "comment": "comment_example", + "author": "author_example", "async": True, - "chown": False, }, "content": b"some_binary_content", "headers": {"content-type": "application/octet-stream"}, @@ -1217,7 +1250,7 @@ async def test_update_asset_without_types( quote(str(version)), quote(str(wildcard)), ) - resp = await service.model_functions.update_asset(name, version, wildcard, **kwargs) + resp = await service.models.update_asset(name, version, wildcard, **kwargs) check_type(resp, Model) @@ -1252,9 +1285,12 @@ async def test_update_assets( kwargs = { # optionally use UpdateAssetsQuery to validate and reuse parameters "query": UpdateAssetsQuery( + scale_to_zero=False, + deploy=True, + chown=False, comment="comment_example", + author="author_example", var_async=True, - chown=False, ), "content": b"some_binary_content", "headers": {"content-type": "application/octet-stream"}, @@ -1266,7 +1302,7 @@ async def test_update_assets( _update_assets_set_mock_response( httpx_mock, gateway_url, quote(str(name)), quote(str(version)) ) - resp = await service.model_functions.update_assets(name, version, **kwargs) + resp = await service.models.update_assets(name, version, **kwargs) check_type( resp, Union[ @@ -1291,9 +1327,12 @@ async def test_update_assets_without_types( kwargs = { "query": { + "scaleToZero": False, + "deploy": True, + "chown": False, "comment": "comment_example", + "author": "author_example", "async": True, - "chown": False, }, "files": { "myFile1": b"...first file content...", @@ -1305,7 +1344,7 @@ async def test_update_assets_without_types( _update_assets_set_mock_response( httpx_mock, gateway_url, quote(str(name)), quote(str(version)) ) - resp = await service.model_functions.update_assets(name, version, **kwargs) + resp = await service.models.update_assets(name, version, **kwargs) check_type(resp, Model) @@ -1340,15 +1379,14 @@ async def test_verify( kwargs = { # optionally use VerifyQuery to validate and reuse parameters "query": VerifyQuery( - comment="comment_example", - var_async=True, scale_to_zero=True, + var_async=True, ), } _verify_set_mock_response( httpx_mock, gateway_url, quote(str(name)), quote(str(version)) ) - resp = await service.model_functions.verify(name, version, **kwargs) + resp = await service.models.verify(name, version, **kwargs) check_type( resp, Union[ @@ -1373,13 +1411,12 @@ async def test_verify_without_types( kwargs = { "query": { - "comment": "comment_example", - "async": True, "scaleToZero": True, + "async": True, }, } _verify_set_mock_response( httpx_mock, gateway_url, quote(str(name)), quote(str(version)) ) - resp = await service.model_functions.verify(name, version, **kwargs) + resp = await service.models.verify(name, version, **kwargs) check_type(resp, Model) diff --git a/test/api/plug_functions_api_test.py b/test/api/plugs_api_test.py similarity index 91% rename from test/api/plug_functions_api_test.py rename to test/api/plugs_api_test.py index b7ed38b3..2e990974 100644 --- a/test/api/plug_functions_api_test.py +++ b/test/api/plugs_api_test.py @@ -19,9 +19,12 @@ from typeguard import check_type from waylay.sdk import ApiClient, WaylayClient from waylay.sdk.api._models import Model -from waylay.services.registry.api import PlugFunctionsApi +from waylay.services.registry.api import PlugsApi from waylay.services.registry.service import RegistryService +from ..types.create_webscripts_copy_parameter_stub import ( + CreateWebscriptsCopyParameterStub, +) from ..types.documentation_stub import DocumentationStub from ..types.get_plug_response_v2_stub import GetPlugResponseV2Stub from ..types.jobs_for_plug_response_v2_stub import JobsForPlugResponseV2Stub @@ -54,7 +57,7 @@ UndeploySubmittedResponseV2, VerifyPlugSyncResponseV2, ) - from waylay.services.registry.queries.plug_functions_api import ( + from waylay.services.registry.queries.plugs_api import ( CreateQuery, DeleteAssetQuery, GetArchiveQuery, @@ -80,13 +83,13 @@ @pytest.fixture -def plug_functions_api(waylay_api_client: ApiClient) -> PlugFunctionsApi: - return PlugFunctionsApi(waylay_api_client) +def plugs_api(waylay_api_client: ApiClient) -> PlugsApi: + return PlugsApi(waylay_api_client) def test_registered(waylay_client: WaylayClient): - """Test that PlugFunctionsApi api is registered in the sdk client.""" - assert isinstance(waylay_client.registry.plug_functions, PlugFunctionsApi) + """Test that PlugsApi api is registered in the sdk client.""" + assert isinstance(waylay_client.registry.plugs, PlugsApi) def _create_set_mock_response(httpx_mock: HTTPXMock, gateway_url: str): @@ -112,14 +115,20 @@ async def test_create( kwargs = { # optionally use CreateQuery to validate and reuse parameters "query": CreateQuery( + deploy=True, + author="author_example", + comment="comment_example", + scale_to_zero=False, deprecate_previous="none", dry_run=True, var_async=True, - scale_to_zero=False, version=SemanticVersionRangeStub.create_json(), name="name_example", draft=False, + runtime="runtime_example", + copy_from=CreateWebscriptsCopyParameterStub.create_json(), ), + "json": None, "content": b"some_binary_content", "headers": {"content-type": "application/octet-stream"}, "files": { @@ -128,7 +137,7 @@ async def test_create( }, } _create_set_mock_response(httpx_mock, gateway_url) - resp = await service.plug_functions.create(**kwargs) + resp = await service.plugs.create(**kwargs) check_type( resp, Union[ @@ -149,23 +158,29 @@ async def test_create_without_types( # set path params kwargs = { "query": { + "deploy": True, + "author": "author_example", + "comment": "comment_example", + "scaleToZero": False, "deprecatePrevious": "none", "dryRun": True, "async": True, - "scaleToZero": False, "version": SemanticVersionRangeStub.create_json(), "name": "name_example", "draft": False, + "runtime": "runtime_example", + "copy": CreateWebscriptsCopyParameterStub.create_json(), }, "files": { "myFile1": b"...first file content...", "myFile2": b"...second file content...", }, + "json": None, "content": b"some_binary_content", "headers": {"content-type": "application/octet-stream"}, } _create_set_mock_response(httpx_mock, gateway_url) - resp = await service.plug_functions.create(**kwargs) + resp = await service.plugs.create(**kwargs) check_type(resp, Model) @@ -202,9 +217,12 @@ async def test_delete_asset( kwargs = { # optionally use DeleteAssetQuery to validate and reuse parameters "query": DeleteAssetQuery( + scale_to_zero=False, + deploy=True, + chown=False, comment="comment_example", + author="author_example", var_async=True, - chown=False, ), } _delete_asset_set_mock_response( @@ -214,7 +232,7 @@ async def test_delete_asset( quote(str(version)), quote(str(wildcard)), ) - resp = await service.plug_functions.delete_asset(name, version, wildcard, **kwargs) + resp = await service.plugs.delete_asset(name, version, wildcard, **kwargs) check_type( resp, Union[ @@ -241,9 +259,12 @@ async def test_delete_asset_without_types( kwargs = { "query": { + "scaleToZero": False, + "deploy": True, + "chown": False, "comment": "comment_example", + "author": "author_example", "async": True, - "chown": False, }, } _delete_asset_set_mock_response( @@ -253,7 +274,7 @@ async def test_delete_asset_without_types( quote(str(version)), quote(str(wildcard)), ) - resp = await service.plug_functions.delete_asset(name, version, wildcard, **kwargs) + resp = await service.plugs.delete_asset(name, version, wildcard, **kwargs) check_type(resp, Model) @@ -294,7 +315,7 @@ async def test_get_archive( _get_archive_set_mock_response( httpx_mock, gateway_url, quote(str(name)), quote(str(version)) ) - resp = await service.plug_functions.get_archive(name, version, **kwargs) + resp = await service.plugs.get_archive(name, version, **kwargs) check_type(resp, bytes) @@ -319,7 +340,7 @@ async def test_get_archive_without_types( _get_archive_set_mock_response( httpx_mock, gateway_url, quote(str(name)), quote(str(version)) ) - resp = await service.plug_functions.get_archive(name, version, **kwargs) + resp = await service.plugs.get_archive(name, version, **kwargs) check_type(resp, bytes) @@ -366,7 +387,7 @@ async def test_get_asset( quote(str(version)), quote(str(wildcard)), ) - resp = await service.plug_functions.get_asset(name, version, wildcard, **kwargs) + resp = await service.plugs.get_asset(name, version, wildcard, **kwargs) check_type(resp, bytes) @@ -397,7 +418,7 @@ async def test_get_asset_without_types( quote(str(version)), quote(str(wildcard)), ) - resp = await service.plug_functions.get_asset(name, version, wildcard, **kwargs) + resp = await service.plugs.get_asset(name, version, wildcard, **kwargs) check_type(resp, bytes) @@ -432,7 +453,7 @@ async def test_get_latest( ), } _get_latest_set_mock_response(httpx_mock, gateway_url, quote(str(name))) - resp = await service.plug_functions.get_latest(name, **kwargs) + resp = await service.plugs.get_latest(name, **kwargs) check_type(resp, Union[GetPlugResponseV2,]) @@ -455,7 +476,7 @@ async def test_get_latest_without_types( }, } _get_latest_set_mock_response(httpx_mock, gateway_url, quote(str(name))) - resp = await service.plug_functions.get_latest(name, **kwargs) + resp = await service.plugs.get_latest(name, **kwargs) check_type(resp, Model) @@ -489,7 +510,7 @@ async def test_get(service: RegistryService, gateway_url: str, httpx_mock: HTTPX _get_set_mock_response( httpx_mock, gateway_url, quote(str(name)), quote(str(version)) ) - resp = await service.plug_functions.get(name, version, **kwargs) + resp = await service.plugs.get(name, version, **kwargs) check_type(resp, Union[GetPlugResponseV2,]) @@ -510,7 +531,7 @@ async def test_get_without_types( _get_set_mock_response( httpx_mock, gateway_url, quote(str(name)), quote(str(version)) ) - resp = await service.plug_functions.get(name, version, **kwargs) + resp = await service.plugs.get(name, version, **kwargs) check_type(resp, Model) @@ -554,7 +575,7 @@ async def test_jobs(service: RegistryService, gateway_url: str, httpx_mock: HTTP _jobs_set_mock_response( httpx_mock, gateway_url, quote(str(name)), quote(str(version)) ) - resp = await service.plug_functions.jobs(name, version, **kwargs) + resp = await service.plugs.jobs(name, version, **kwargs) check_type(resp, Union[JobsForPlugResponseV2,]) @@ -584,7 +605,7 @@ async def test_jobs_without_types( _jobs_set_mock_response( httpx_mock, gateway_url, quote(str(name)), quote(str(version)) ) - resp = await service.plug_functions.jobs(name, version, **kwargs) + resp = await service.plugs.jobs(name, version, **kwargs) check_type(resp, Model) @@ -631,10 +652,11 @@ async def test_list(service: RegistryService, gateway_url: str, httpx_mock: HTTP archive_format=[], runtime=[], latest=True, + show_related="embed", ), } _list_set_mock_response(httpx_mock, gateway_url) - resp = await service.plug_functions.list(**kwargs) + resp = await service.plugs.list(**kwargs) check_type(resp, Union[LatestPlugsResponseV2,]) @@ -671,10 +693,11 @@ async def test_list_without_types( "archiveFormat": [], "runtime": [], "latest": True, + "showRelated": "embed", }, } _list_set_mock_response(httpx_mock, gateway_url) - resp = await service.plug_functions.list(**kwargs) + resp = await service.plugs.list(**kwargs) check_type(resp, Model) @@ -724,7 +747,7 @@ async def test_list_versions( ), } _list_versions_set_mock_response(httpx_mock, gateway_url, quote(str(name))) - resp = await service.plug_functions.list_versions(name, **kwargs) + resp = await service.plugs.list_versions(name, **kwargs) check_type(resp, Union[PlugVersionsResponseV2,]) @@ -760,7 +783,7 @@ async def test_list_versions_without_types( }, } _list_versions_set_mock_response(httpx_mock, gateway_url, quote(str(name))) - resp = await service.plug_functions.list_versions(name, **kwargs) + resp = await service.plugs.list_versions(name, **kwargs) check_type(resp, Model) @@ -802,7 +825,7 @@ async def test_patch_interface( _patch_interface_set_mock_response( httpx_mock, gateway_url, quote(str(name)), quote(str(version)) ) - resp = await service.plug_functions.patch_interface(name, version, **kwargs) + resp = await service.plugs.patch_interface(name, version, **kwargs) check_type(resp, Union[GetPlugResponseV2,]) @@ -828,7 +851,7 @@ async def test_patch_interface_without_types( _patch_interface_set_mock_response( httpx_mock, gateway_url, quote(str(name)), quote(str(version)) ) - resp = await service.plug_functions.patch_interface(name, version, **kwargs) + resp = await service.plugs.patch_interface(name, version, **kwargs) check_type(resp, Model) @@ -870,7 +893,7 @@ async def test_patch_metadata( _patch_metadata_set_mock_response( httpx_mock, gateway_url, quote(str(name)), quote(str(version)) ) - resp = await service.plug_functions.patch_metadata(name, version, **kwargs) + resp = await service.plugs.patch_metadata(name, version, **kwargs) check_type(resp, Union[GetPlugResponseV2,]) @@ -896,7 +919,7 @@ async def test_patch_metadata_without_types( _patch_metadata_set_mock_response( httpx_mock, gateway_url, quote(str(name)), quote(str(version)) ) - resp = await service.plug_functions.patch_metadata(name, version, **kwargs) + resp = await service.plugs.patch_metadata(name, version, **kwargs) check_type(resp, Model) @@ -931,7 +954,9 @@ async def test_publish( kwargs = { # optionally use PublishQuery to validate and reuse parameters "query": PublishQuery( + chown=False, comment="comment_example", + author="author_example", deprecate_previous="none", var_async=True, ), @@ -939,7 +964,7 @@ async def test_publish( _publish_set_mock_response( httpx_mock, gateway_url, quote(str(name)), quote(str(version)) ) - resp = await service.plug_functions.publish(name, version, **kwargs) + resp = await service.plugs.publish(name, version, **kwargs) check_type( resp, Union[ @@ -964,7 +989,9 @@ async def test_publish_without_types( kwargs = { "query": { + "chown": False, "comment": "comment_example", + "author": "author_example", "deprecatePrevious": "none", "async": True, }, @@ -972,7 +999,7 @@ async def test_publish_without_types( _publish_set_mock_response( httpx_mock, gateway_url, quote(str(name)), quote(str(version)) ) - resp = await service.plug_functions.publish(name, version, **kwargs) + resp = await service.plugs.publish(name, version, **kwargs) check_type(resp, Model) @@ -1007,20 +1034,20 @@ async def test_rebuild( kwargs = { # optionally use RebuildQuery to validate and reuse parameters "query": RebuildQuery( + scale_to_zero=True, comment="comment_example", dry_run=True, var_async=True, upgrade="patch", force_version="force_version_example", ignore_checks=True, - scale_to_zero=True, skip_rebuild=True, ), } _rebuild_set_mock_response( httpx_mock, gateway_url, quote(str(name)), quote(str(version)) ) - resp = await service.plug_functions.rebuild(name, version, **kwargs) + resp = await service.plugs.rebuild(name, version, **kwargs) check_type( resp, Union[ @@ -1045,20 +1072,20 @@ async def test_rebuild_without_types( kwargs = { "query": { + "scaleToZero": True, "comment": "comment_example", "dryRun": True, "async": True, "upgrade": "patch", "forceVersion": "force_version_example", "ignoreChecks": True, - "scaleToZero": True, "skipRebuild": True, }, } _rebuild_set_mock_response( httpx_mock, gateway_url, quote(str(name)), quote(str(version)) ) - resp = await service.plug_functions.rebuild(name, version, **kwargs) + resp = await service.plugs.rebuild(name, version, **kwargs) check_type(resp, Model) @@ -1102,7 +1129,7 @@ async def test_remove_version( _remove_version_set_mock_response( httpx_mock, gateway_url, quote(str(name)), quote(str(version)) ) - resp = await service.plug_functions.remove_version(name, version, **kwargs) + resp = await service.plugs.remove_version(name, version, **kwargs) check_type( resp, Union[ @@ -1136,7 +1163,7 @@ async def test_remove_version_without_types( _remove_version_set_mock_response( httpx_mock, gateway_url, quote(str(name)), quote(str(version)) ) - resp = await service.plug_functions.remove_version(name, version, **kwargs) + resp = await service.plugs.remove_version(name, version, **kwargs) check_type(resp, Model) @@ -1174,7 +1201,7 @@ async def test_remove_versions( ), } _remove_versions_set_mock_response(httpx_mock, gateway_url, quote(str(name))) - resp = await service.plug_functions.remove_versions(name, **kwargs) + resp = await service.plugs.remove_versions(name, **kwargs) check_type( resp, Union[ @@ -1204,7 +1231,7 @@ async def test_remove_versions_without_types( }, } _remove_versions_set_mock_response(httpx_mock, gateway_url, quote(str(name))) - resp = await service.plug_functions.remove_versions(name, **kwargs) + resp = await service.plugs.remove_versions(name, **kwargs) check_type(resp, Model) @@ -1241,9 +1268,12 @@ async def test_update_asset( kwargs = { # optionally use UpdateAssetQuery to validate and reuse parameters "query": UpdateAssetQuery( + scale_to_zero=False, + deploy=True, + chown=False, comment="comment_example", + author="author_example", var_async=True, - chown=False, ), "content": b"some_binary_content", "headers": {"content-type": "application/octet-stream"}, @@ -1255,7 +1285,7 @@ async def test_update_asset( quote(str(version)), quote(str(wildcard)), ) - resp = await service.plug_functions.update_asset(name, version, wildcard, **kwargs) + resp = await service.plugs.update_asset(name, version, wildcard, **kwargs) check_type( resp, Union[ @@ -1282,9 +1312,12 @@ async def test_update_asset_without_types( kwargs = { "query": { + "scaleToZero": False, + "deploy": True, + "chown": False, "comment": "comment_example", + "author": "author_example", "async": True, - "chown": False, }, "content": b"some_binary_content", "headers": {"content-type": "application/octet-stream"}, @@ -1296,7 +1329,7 @@ async def test_update_asset_without_types( quote(str(version)), quote(str(wildcard)), ) - resp = await service.plug_functions.update_asset(name, version, wildcard, **kwargs) + resp = await service.plugs.update_asset(name, version, wildcard, **kwargs) check_type(resp, Model) @@ -1331,9 +1364,12 @@ async def test_update_assets( kwargs = { # optionally use UpdateAssetsQuery to validate and reuse parameters "query": UpdateAssetsQuery( + scale_to_zero=False, + deploy=True, + chown=False, comment="comment_example", + author="author_example", var_async=True, - chown=False, ), "content": b"some_binary_content", "headers": {"content-type": "application/octet-stream"}, @@ -1345,7 +1381,7 @@ async def test_update_assets( _update_assets_set_mock_response( httpx_mock, gateway_url, quote(str(name)), quote(str(version)) ) - resp = await service.plug_functions.update_assets(name, version, **kwargs) + resp = await service.plugs.update_assets(name, version, **kwargs) check_type( resp, Union[ @@ -1370,9 +1406,12 @@ async def test_update_assets_without_types( kwargs = { "query": { + "scaleToZero": False, + "deploy": True, + "chown": False, "comment": "comment_example", + "author": "author_example", "async": True, - "chown": False, }, "files": { "myFile1": b"...first file content...", @@ -1384,7 +1423,7 @@ async def test_update_assets_without_types( _update_assets_set_mock_response( httpx_mock, gateway_url, quote(str(name)), quote(str(version)) ) - resp = await service.plug_functions.update_assets(name, version, **kwargs) + resp = await service.plugs.update_assets(name, version, **kwargs) check_type(resp, Model) @@ -1419,15 +1458,14 @@ async def test_verify( kwargs = { # optionally use VerifyQuery to validate and reuse parameters "query": VerifyQuery( - comment="comment_example", - var_async=True, scale_to_zero=True, + var_async=True, ), } _verify_set_mock_response( httpx_mock, gateway_url, quote(str(name)), quote(str(version)) ) - resp = await service.plug_functions.verify(name, version, **kwargs) + resp = await service.plugs.verify(name, version, **kwargs) check_type( resp, Union[ @@ -1452,13 +1490,12 @@ async def test_verify_without_types( kwargs = { "query": { - "comment": "comment_example", - "async": True, "scaleToZero": True, + "async": True, }, } _verify_set_mock_response( httpx_mock, gateway_url, quote(str(name)), quote(str(version)) ) - resp = await service.plug_functions.verify(name, version, **kwargs) + resp = await service.plugs.verify(name, version, **kwargs) check_type(resp, Model) diff --git a/test/api/webscript_functions_api_test.py b/test/api/webscripts_api_test.py similarity index 90% rename from test/api/webscript_functions_api_test.py rename to test/api/webscripts_api_test.py index 0db6296f..58f473a9 100644 --- a/test/api/webscript_functions_api_test.py +++ b/test/api/webscripts_api_test.py @@ -19,9 +19,12 @@ from typeguard import check_type from waylay.sdk import ApiClient, WaylayClient from waylay.sdk.api._models import Model -from waylay.services.registry.api import WebscriptFunctionsApi +from waylay.services.registry.api import WebscriptsApi from waylay.services.registry.service import RegistryService +from ..types.create_webscripts_copy_parameter_stub import ( + CreateWebscriptsCopyParameterStub, +) from ..types.function_meta_stub import FunctionMetaStub from ..types.get_webscript_response_v2_stub import GetWebscriptResponseV2Stub from ..types.jobs_for_webscript_response_v2_stub import JobsForWebscriptResponseV2Stub @@ -58,7 +61,7 @@ VerifyWebscriptSyncResponseV2, WebscriptVersionsResponseV2, ) - from waylay.services.registry.queries.webscript_functions_api import ( + from waylay.services.registry.queries.webscripts_api import ( CreateQuery, DeleteAssetQuery, GetArchiveQuery, @@ -83,13 +86,13 @@ @pytest.fixture -def webscript_functions_api(waylay_api_client: ApiClient) -> WebscriptFunctionsApi: - return WebscriptFunctionsApi(waylay_api_client) +def webscripts_api(waylay_api_client: ApiClient) -> WebscriptsApi: + return WebscriptsApi(waylay_api_client) def test_registered(waylay_client: WaylayClient): - """Test that WebscriptFunctionsApi api is registered in the sdk client.""" - assert isinstance(waylay_client.registry.webscript_functions, WebscriptFunctionsApi) + """Test that WebscriptsApi api is registered in the sdk client.""" + assert isinstance(waylay_client.registry.webscripts, WebscriptsApi) def _create_set_mock_response(httpx_mock: HTTPXMock, gateway_url: str): @@ -115,14 +118,20 @@ async def test_create( kwargs = { # optionally use CreateQuery to validate and reuse parameters "query": CreateQuery( + deploy=True, + author="author_example", + comment="comment_example", + scale_to_zero=False, deprecate_previous="none", dry_run=True, var_async=True, - scale_to_zero=False, version=SemanticVersionRangeStub.create_json(), name="name_example", draft=False, + runtime="runtime_example", + copy_from=CreateWebscriptsCopyParameterStub.create_json(), ), + "json": None, "content": b"some_binary_content", "headers": {"content-type": "application/octet-stream"}, "files": { @@ -131,7 +140,7 @@ async def test_create( }, } _create_set_mock_response(httpx_mock, gateway_url) - resp = await service.webscript_functions.create(**kwargs) + resp = await service.webscripts.create(**kwargs) check_type( resp, Union[ @@ -152,23 +161,29 @@ async def test_create_without_types( # set path params kwargs = { "query": { + "deploy": True, + "author": "author_example", + "comment": "comment_example", + "scaleToZero": False, "deprecatePrevious": "none", "dryRun": True, "async": True, - "scaleToZero": False, "version": SemanticVersionRangeStub.create_json(), "name": "name_example", "draft": False, + "runtime": "runtime_example", + "copy": CreateWebscriptsCopyParameterStub.create_json(), }, "files": { "myFile1": b"...first file content...", "myFile2": b"...second file content...", }, + "json": None, "content": b"some_binary_content", "headers": {"content-type": "application/octet-stream"}, } _create_set_mock_response(httpx_mock, gateway_url) - resp = await service.webscript_functions.create(**kwargs) + resp = await service.webscripts.create(**kwargs) check_type(resp, Model) @@ -205,9 +220,12 @@ async def test_delete_asset( kwargs = { # optionally use DeleteAssetQuery to validate and reuse parameters "query": DeleteAssetQuery( + scale_to_zero=False, + deploy=True, + chown=False, comment="comment_example", + author="author_example", var_async=True, - chown=False, ), } _delete_asset_set_mock_response( @@ -217,9 +235,7 @@ async def test_delete_asset( quote(str(version)), quote(str(wildcard)), ) - resp = await service.webscript_functions.delete_asset( - name, version, wildcard, **kwargs - ) + resp = await service.webscripts.delete_asset(name, version, wildcard, **kwargs) check_type( resp, Union[ @@ -246,9 +262,12 @@ async def test_delete_asset_without_types( kwargs = { "query": { + "scaleToZero": False, + "deploy": True, + "chown": False, "comment": "comment_example", + "author": "author_example", "async": True, - "chown": False, }, } _delete_asset_set_mock_response( @@ -258,9 +277,7 @@ async def test_delete_asset_without_types( quote(str(version)), quote(str(wildcard)), ) - resp = await service.webscript_functions.delete_asset( - name, version, wildcard, **kwargs - ) + resp = await service.webscripts.delete_asset(name, version, wildcard, **kwargs) check_type(resp, Model) @@ -301,7 +318,7 @@ async def test_get_archive( _get_archive_set_mock_response( httpx_mock, gateway_url, quote(str(name)), quote(str(version)) ) - resp = await service.webscript_functions.get_archive(name, version, **kwargs) + resp = await service.webscripts.get_archive(name, version, **kwargs) check_type(resp, bytes) @@ -326,7 +343,7 @@ async def test_get_archive_without_types( _get_archive_set_mock_response( httpx_mock, gateway_url, quote(str(name)), quote(str(version)) ) - resp = await service.webscript_functions.get_archive(name, version, **kwargs) + resp = await service.webscripts.get_archive(name, version, **kwargs) check_type(resp, bytes) @@ -373,9 +390,7 @@ async def test_get_asset( quote(str(version)), quote(str(wildcard)), ) - resp = await service.webscript_functions.get_asset( - name, version, wildcard, **kwargs - ) + resp = await service.webscripts.get_asset(name, version, wildcard, **kwargs) check_type(resp, bytes) @@ -406,9 +421,7 @@ async def test_get_asset_without_types( quote(str(version)), quote(str(wildcard)), ) - resp = await service.webscript_functions.get_asset( - name, version, wildcard, **kwargs - ) + resp = await service.webscripts.get_asset(name, version, wildcard, **kwargs) check_type(resp, bytes) @@ -442,7 +455,7 @@ async def test_get_latest( ), } _get_latest_set_mock_response(httpx_mock, gateway_url, quote(str(name))) - resp = await service.webscript_functions.get_latest(name, **kwargs) + resp = await service.webscripts.get_latest(name, **kwargs) check_type(resp, Union[GetWebscriptResponseV2,]) @@ -464,7 +477,7 @@ async def test_get_latest_without_types( }, } _get_latest_set_mock_response(httpx_mock, gateway_url, quote(str(name))) - resp = await service.webscript_functions.get_latest(name, **kwargs) + resp = await service.webscripts.get_latest(name, **kwargs) check_type(resp, Model) @@ -498,7 +511,7 @@ async def test_get(service: RegistryService, gateway_url: str, httpx_mock: HTTPX _get_set_mock_response( httpx_mock, gateway_url, quote(str(name)), quote(str(version)) ) - resp = await service.webscript_functions.get(name, version, **kwargs) + resp = await service.webscripts.get(name, version, **kwargs) check_type(resp, Union[GetWebscriptResponseV2,]) @@ -519,7 +532,7 @@ async def test_get_without_types( _get_set_mock_response( httpx_mock, gateway_url, quote(str(name)), quote(str(version)) ) - resp = await service.webscript_functions.get(name, version, **kwargs) + resp = await service.webscripts.get(name, version, **kwargs) check_type(resp, Model) @@ -563,7 +576,7 @@ async def test_jobs(service: RegistryService, gateway_url: str, httpx_mock: HTTP _jobs_set_mock_response( httpx_mock, gateway_url, quote(str(name)), quote(str(version)) ) - resp = await service.webscript_functions.jobs(name, version, **kwargs) + resp = await service.webscripts.jobs(name, version, **kwargs) check_type(resp, Union[JobsForWebscriptResponseV2,]) @@ -593,7 +606,7 @@ async def test_jobs_without_types( _jobs_set_mock_response( httpx_mock, gateway_url, quote(str(name)), quote(str(version)) ) - resp = await service.webscript_functions.jobs(name, version, **kwargs) + resp = await service.webscripts.jobs(name, version, **kwargs) check_type(resp, Model) @@ -644,7 +657,7 @@ async def test_list_versions( ), } _list_versions_set_mock_response(httpx_mock, gateway_url, quote(str(name))) - resp = await service.webscript_functions.list_versions(name, **kwargs) + resp = await service.webscripts.list_versions(name, **kwargs) check_type(resp, Union[WebscriptVersionsResponseV2,]) @@ -679,7 +692,7 @@ async def test_list_versions_without_types( }, } _list_versions_set_mock_response(httpx_mock, gateway_url, quote(str(name))) - resp = await service.webscript_functions.list_versions(name, **kwargs) + resp = await service.webscripts.list_versions(name, **kwargs) check_type(resp, Model) @@ -724,10 +737,11 @@ async def test_list(service: RegistryService, gateway_url: str, httpx_mock: HTTP archive_format=[], runtime=[], latest=True, + show_related="embed", ), } _list_set_mock_response(httpx_mock, gateway_url) - resp = await service.webscript_functions.list(**kwargs) + resp = await service.webscripts.list(**kwargs) check_type(resp, Union[LatestWebscriptsResponseV2,]) @@ -762,10 +776,11 @@ async def test_list_without_types( "archiveFormat": [], "runtime": [], "latest": True, + "showRelated": "embed", }, } _list_set_mock_response(httpx_mock, gateway_url) - resp = await service.webscript_functions.list(**kwargs) + resp = await service.webscripts.list(**kwargs) check_type(resp, Model) @@ -807,7 +822,7 @@ async def test_patch_metadata( _patch_metadata_set_mock_response( httpx_mock, gateway_url, quote(str(name)), quote(str(version)) ) - resp = await service.webscript_functions.patch_metadata(name, version, **kwargs) + resp = await service.webscripts.patch_metadata(name, version, **kwargs) check_type(resp, Union[GetWebscriptResponseV2,]) @@ -833,7 +848,7 @@ async def test_patch_metadata_without_types( _patch_metadata_set_mock_response( httpx_mock, gateway_url, quote(str(name)), quote(str(version)) ) - resp = await service.webscript_functions.patch_metadata(name, version, **kwargs) + resp = await service.webscripts.patch_metadata(name, version, **kwargs) check_type(resp, Model) @@ -868,7 +883,9 @@ async def test_publish( kwargs = { # optionally use PublishQuery to validate and reuse parameters "query": PublishQuery( + chown=False, comment="comment_example", + author="author_example", deprecate_previous="none", var_async=True, ), @@ -876,7 +893,7 @@ async def test_publish( _publish_set_mock_response( httpx_mock, gateway_url, quote(str(name)), quote(str(version)) ) - resp = await service.webscript_functions.publish(name, version, **kwargs) + resp = await service.webscripts.publish(name, version, **kwargs) check_type( resp, Union[ @@ -901,7 +918,9 @@ async def test_publish_without_types( kwargs = { "query": { + "chown": False, "comment": "comment_example", + "author": "author_example", "deprecatePrevious": "none", "async": True, }, @@ -909,7 +928,7 @@ async def test_publish_without_types( _publish_set_mock_response( httpx_mock, gateway_url, quote(str(name)), quote(str(version)) ) - resp = await service.webscript_functions.publish(name, version, **kwargs) + resp = await service.webscripts.publish(name, version, **kwargs) check_type(resp, Model) @@ -944,20 +963,20 @@ async def test_rebuild( kwargs = { # optionally use RebuildQuery to validate and reuse parameters "query": RebuildQuery( + scale_to_zero=True, comment="comment_example", dry_run=True, var_async=True, upgrade="patch", force_version="force_version_example", ignore_checks=True, - scale_to_zero=True, skip_rebuild=True, ), } _rebuild_set_mock_response( httpx_mock, gateway_url, quote(str(name)), quote(str(version)) ) - resp = await service.webscript_functions.rebuild(name, version, **kwargs) + resp = await service.webscripts.rebuild(name, version, **kwargs) check_type( resp, Union[ @@ -982,20 +1001,20 @@ async def test_rebuild_without_types( kwargs = { "query": { + "scaleToZero": True, "comment": "comment_example", "dryRun": True, "async": True, "upgrade": "patch", "forceVersion": "force_version_example", "ignoreChecks": True, - "scaleToZero": True, "skipRebuild": True, }, } _rebuild_set_mock_response( httpx_mock, gateway_url, quote(str(name)), quote(str(version)) ) - resp = await service.webscript_functions.rebuild(name, version, **kwargs) + resp = await service.webscripts.rebuild(name, version, **kwargs) check_type(resp, Model) @@ -1039,7 +1058,7 @@ async def test_remove_version( _remove_version_set_mock_response( httpx_mock, gateway_url, quote(str(name)), quote(str(version)) ) - resp = await service.webscript_functions.remove_version(name, version, **kwargs) + resp = await service.webscripts.remove_version(name, version, **kwargs) check_type( resp, Union[ @@ -1073,7 +1092,7 @@ async def test_remove_version_without_types( _remove_version_set_mock_response( httpx_mock, gateway_url, quote(str(name)), quote(str(version)) ) - resp = await service.webscript_functions.remove_version(name, version, **kwargs) + resp = await service.webscripts.remove_version(name, version, **kwargs) check_type(resp, Model) @@ -1111,7 +1130,7 @@ async def test_remove_versions( ), } _remove_versions_set_mock_response(httpx_mock, gateway_url, quote(str(name))) - resp = await service.webscript_functions.remove_versions(name, **kwargs) + resp = await service.webscripts.remove_versions(name, **kwargs) check_type( resp, Union[ @@ -1141,7 +1160,7 @@ async def test_remove_versions_without_types( }, } _remove_versions_set_mock_response(httpx_mock, gateway_url, quote(str(name))) - resp = await service.webscript_functions.remove_versions(name, **kwargs) + resp = await service.webscripts.remove_versions(name, **kwargs) check_type(resp, Model) @@ -1178,9 +1197,12 @@ async def test_update_asset( kwargs = { # optionally use UpdateAssetQuery to validate and reuse parameters "query": UpdateAssetQuery( + scale_to_zero=False, + deploy=True, + chown=False, comment="comment_example", + author="author_example", var_async=True, - chown=False, ), "content": b"some_binary_content", "headers": {"content-type": "application/octet-stream"}, @@ -1192,9 +1214,7 @@ async def test_update_asset( quote(str(version)), quote(str(wildcard)), ) - resp = await service.webscript_functions.update_asset( - name, version, wildcard, **kwargs - ) + resp = await service.webscripts.update_asset(name, version, wildcard, **kwargs) check_type( resp, Union[ @@ -1221,9 +1241,12 @@ async def test_update_asset_without_types( kwargs = { "query": { + "scaleToZero": False, + "deploy": True, + "chown": False, "comment": "comment_example", + "author": "author_example", "async": True, - "chown": False, }, "content": b"some_binary_content", "headers": {"content-type": "application/octet-stream"}, @@ -1235,9 +1258,7 @@ async def test_update_asset_without_types( quote(str(version)), quote(str(wildcard)), ) - resp = await service.webscript_functions.update_asset( - name, version, wildcard, **kwargs - ) + resp = await service.webscripts.update_asset(name, version, wildcard, **kwargs) check_type(resp, Model) @@ -1272,9 +1293,12 @@ async def test_update_assets( kwargs = { # optionally use UpdateAssetsQuery to validate and reuse parameters "query": UpdateAssetsQuery( + scale_to_zero=False, + deploy=True, + chown=False, comment="comment_example", + author="author_example", var_async=True, - chown=False, ), "content": b"some_binary_content", "headers": {"content-type": "application/octet-stream"}, @@ -1286,7 +1310,7 @@ async def test_update_assets( _update_assets_set_mock_response( httpx_mock, gateway_url, quote(str(name)), quote(str(version)) ) - resp = await service.webscript_functions.update_assets(name, version, **kwargs) + resp = await service.webscripts.update_assets(name, version, **kwargs) check_type( resp, Union[ @@ -1311,9 +1335,12 @@ async def test_update_assets_without_types( kwargs = { "query": { + "scaleToZero": False, + "deploy": True, + "chown": False, "comment": "comment_example", + "author": "author_example", "async": True, - "chown": False, }, "files": { "myFile1": b"...first file content...", @@ -1325,7 +1352,7 @@ async def test_update_assets_without_types( _update_assets_set_mock_response( httpx_mock, gateway_url, quote(str(name)), quote(str(version)) ) - resp = await service.webscript_functions.update_assets(name, version, **kwargs) + resp = await service.webscripts.update_assets(name, version, **kwargs) check_type(resp, Model) @@ -1360,15 +1387,14 @@ async def test_verify( kwargs = { # optionally use VerifyQuery to validate and reuse parameters "query": VerifyQuery( - comment="comment_example", - var_async=True, scale_to_zero=True, + var_async=True, ), } _verify_set_mock_response( httpx_mock, gateway_url, quote(str(name)), quote(str(version)) ) - resp = await service.webscript_functions.verify(name, version, **kwargs) + resp = await service.webscripts.verify(name, version, **kwargs) check_type( resp, Union[ @@ -1393,13 +1419,12 @@ async def test_verify_without_types( kwargs = { "query": { - "comment": "comment_example", - "async": True, "scaleToZero": True, + "async": True, }, } _verify_set_mock_response( httpx_mock, gateway_url, quote(str(name)), quote(str(version)) ) - resp = await service.webscript_functions.verify(name, version, **kwargs) + resp = await service.webscripts.verify(name, version, **kwargs) check_type(resp, Model) diff --git a/test/openapi.py b/test/openapi.py index 7dd97240..818b7977 100644 --- a/test/openapi.py +++ b/test/openapi.py @@ -75,6 +75,71 @@ def with_example_provider(dct): ) MODEL_DEFINITIONS.update({"ActiveEventSSE_event": _active_event_sse_event_model_schema}) +_alt_embedded_version_i_kfserving_response_v2__model_schema = json.loads( + r"""{ + "title" : "AltEmbeddedVersion_IKfservingResponseV2_", + "type" : "object", + "properties" : { + "draft" : { + "$ref" : "#/components/schemas/KfservingResponseV2" + }, + "published" : { + "$ref" : "#/components/schemas/KfservingResponseV2" + } + }, + "description" : "Embedded representations of the _latest_ draft/published versions." +} +""", + object_hook=with_example_provider, +) +MODEL_DEFINITIONS.update({ + "AltEmbeddedVersion_IKfservingResponseV2_": _alt_embedded_version_i_kfserving_response_v2__model_schema +}) + +_alt_embedded_version_i_plug_response_v2__model_schema = json.loads( + r"""{ + "title" : "AltEmbeddedVersion_IPlugResponseV2_", + "type" : "object", + "properties" : { + "draft" : { + "$ref" : "#/components/schemas/PlugResponseV2" + }, + "published" : { + "$ref" : "#/components/schemas/PlugResponseV2" + } + }, + "description" : "Embedded representations of the _latest_ draft/published versions." +} +""", + object_hook=with_example_provider, +) +MODEL_DEFINITIONS.update({ + "AltEmbeddedVersion_IPlugResponseV2_": _alt_embedded_version_i_plug_response_v2__model_schema +}) + +_alt_embedded_version_i_webscript_response_with_invoke_link_v2__model_schema = ( + json.loads( + r"""{ + "title" : "AltEmbeddedVersion_IWebscriptResponseWithInvokeLinkV2_", + "type" : "object", + "properties" : { + "draft" : { + "$ref" : "#/components/schemas/WebscriptResponseWithInvokeLinkV2" + }, + "published" : { + "$ref" : "#/components/schemas/WebscriptResponseWithInvokeLinkV2" + } + }, + "description" : "Embedded representations of the _latest_ draft/published versions." +} +""", + object_hook=with_example_provider, + ) +) +MODEL_DEFINITIONS.update({ + "AltEmbeddedVersion_IWebscriptResponseWithInvokeLinkV2_": _alt_embedded_version_i_webscript_response_with_invoke_link_v2__model_schema +}) + _alt_version_hal_link_model_schema = json.loads( r"""{ "type" : "object", @@ -144,6 +209,8 @@ def with_example_provider(dct): "$ref" : "#/components/schemas/BatchResult" }, { "$ref" : "#/components/schemas/CleanupResult" + }, { + "$ref" : "#/components/schemas/NotifyResult" } ] } """, @@ -429,44 +496,10 @@ def with_example_provider(dct): ) MODEL_DEFINITIONS.update({"AssetsConditions": _assets_conditions_model_schema}) -_async_deploy_query_model_schema = json.loads( - r"""{ - "type" : "object", - "properties" : { - "deprecatePrevious" : { - "$ref" : "#/components/schemas/DeprecatePreviousPolicy" - }, - "dryRun" : { - "type" : "boolean", - "description" : "If set to true, validates the deployment conditions, but does not change anything." - }, - "async" : { - "type" : "boolean", - "description" : "Unless this is set to false, the server will start the required job actions asynchronously and return a 202 Accepted response. If false the request will block until the job actions are completed, or a timeout occurs.", - "default" : true - }, - "scaleToZero" : { - "type" : "boolean", - "description" : "If set to true, after successful deployment, the deployed function will be scaled to zero. Saves computing resources when the function is not to be used immediately.", - "default" : false - } - }, - "additionalProperties" : false -} -""", - object_hook=with_example_provider, -) -MODEL_DEFINITIONS.update({"AsyncDeployQuery": _async_deploy_query_model_schema}) - _async_deploy_query_v1_model_schema = json.loads( r"""{ "type" : "object", "properties" : { - "scaleToZero" : { - "type" : "boolean", - "description" : "If set to true, after successful deployment, the deployed function will be scaled to zero. Saves computing resources when the function is not to be used immediately.", - "default" : false - }, "async" : { "type" : "boolean", "description" : "Unless this is set to false, the server will start the required job actions asynchronously and return a 202 Accepted response. If false the request will block until the job actions are completed, or a timeout occurs.", @@ -475,6 +508,11 @@ def with_example_provider(dct): "dryRun" : { "type" : "boolean", "description" : "If set to true, validates the deployment conditions, but does not change anything." + }, + "scaleToZero" : { + "type" : "boolean", + "description" : "If set to true, after successful deployment, the deployed function will be scaled to zero. This saves computing resources when the function is not to be used immediately.", + "default" : false } }, "additionalProperties" : false @@ -503,41 +541,18 @@ def with_example_provider(dct): "AsyncQueryDefaultFalse": _async_query_default_false_model_schema }) -_async_query_default_true_model_schema = json.loads( - r"""{ - "type" : "object", - "properties" : { - "async" : { - "type" : "boolean", - "description" : "Unless this is set to false, the server will start the required job actions asynchronously and return a 202 Accepted response. If false the request will block until the job actions are completed, or a timeout occurs.", - "default" : true - } - }, - "additionalProperties" : false -} -""", - object_hook=with_example_provider, -) -MODEL_DEFINITIONS.update({ - "AsyncQueryDefaultTrue": _async_query_default_true_model_schema -}) - _async_verify_query_model_schema = json.loads( r"""{ "type" : "object", "properties" : { - "comment" : { - "type" : "string", - "description" : "An optional user-specified comment corresponding to the operation." + "scaleToZero" : { + "type" : "boolean", + "description" : "Indicates whether the function needs to be scaled down after successful verification. If not set, the function is scaled to zero only if it was not active before this command." }, "async" : { "type" : "boolean", "description" : "Unless this is set to false, the server will start the required job actions asynchronously and return a 202 Accepted response. If false the request will block until the job actions are completed, or a timeout occurs.", "default" : true - }, - "scaleToZero" : { - "type" : "boolean", - "description" : "Indicates whether the function needs to be scaled down after successful verification. If not set, the function is scaled to zero only if it was not active before this command." } }, "additionalProperties" : false @@ -790,7 +805,7 @@ def with_example_provider(dct): _build_args_model_schema = json.loads( r"""{ "title" : "BuildArgs", - "required" : [ "args", "imageName", "runtimeName", "runtimeVersion", "storageLocation" ], + "required" : [ "args", "imageName", "revision", "runtimeName", "runtimeVersion", "storageLocation" ], "type" : "object", "properties" : { "runtimeName" : { @@ -1026,13 +1041,13 @@ def with_example_provider(dct): _completed_event_data_model_schema = json.loads( r"""{ "title" : "CompletedEventData", - "required" : [ "returnValue" ], + "required" : [ "returnvalue" ], "type" : "object", "properties" : { "prev" : { "$ref" : "#/components/schemas/QueueEvents" }, - "returnValue" : { + "returnvalue" : { "$ref" : "#/components/schemas/AnyJobResult" } } @@ -1117,6 +1132,24 @@ def with_example_provider(dct): r"""{ "type" : "object", "properties" : { + "deploy" : { + "type" : "boolean", + "description" : "Indicates that a function should be _deployed_ when its assets are valid.\n\n* If `true` (default), jobs to build and deploy the function will be initiated after it is checked that the assets are valid. Invalid assets lead to a validation error, and the function and its assets are not created or updated.\n* If `false`, the uploaded assets are stored and the function is created/updated in `registered` state. Asset validation errors are only returned as warning, and stored as `failureReason` on the function entity. Use an _asset update_ or _rebuild_ to initiate a build and deploy at a later stage.", + "default" : true + }, + "author" : { + "type" : "string", + "description" : "Optionally changes the author metadata when updating a function." + }, + "comment" : { + "type" : "string", + "description" : "An optional user-specified comment corresponding to the operation." + }, + "scaleToZero" : { + "type" : "boolean", + "description" : "If set to true, after successful deployment, the deployed function will be scaled to zero. This saves computing resources when the function is not to be used immediately.", + "default" : false + }, "deprecatePrevious" : { "$ref" : "#/components/schemas/DeprecatePreviousPolicy" }, @@ -1129,11 +1162,6 @@ def with_example_provider(dct): "description" : "Unless this is set to false, the server will start the required job actions asynchronously and return a 202 Accepted response. If false the request will block until the job actions are completed, or a timeout occurs.", "default" : true }, - "scaleToZero" : { - "type" : "boolean", - "description" : "If set to true, after successful deployment, the deployed function will be scaled to zero. Saves computing resources when the function is not to be used immediately.", - "default" : false - }, "version" : { "$ref" : "#/components/schemas/SemanticVersionRange" }, @@ -1145,6 +1173,12 @@ def with_example_provider(dct): "type" : "boolean", "description" : "If set, the created function will be a draft function and its assets are still mutable. A build and deploy is initiated only in the case when all necessary assets are present and valid.", "default" : false + }, + "runtime" : { + "$ref" : "#/components/schemas/NamedVersionRange" + }, + "copy" : { + "$ref" : "#/components/schemas/CreateFunctionQueryV2_copy" } }, "additionalProperties" : false @@ -1156,6 +1190,23 @@ def with_example_provider(dct): "CreateFunctionQueryV2": _create_function_query_v2_model_schema }) +_create_function_query_v2_copy_model_schema = json.loads( + r"""{ + "title" : "CreateFunctionQueryV2_copy", + "description" : "Indicates the _source_ of initial assets for a _new function_.\n\nWhen using this query parameter, the request body does not need to contain assets, but any assets in the request body will overwrite the copied assets.\n\n#### Selection of _assets_ source\n\n* If set as `[@]`, the _new function_ will be created with copied assets of the selected _source function_.\n* If set as `!example`, a `runtime` query parameter is required, and the _new function_ will be initialized with assets of the _runtime example_.\n\n#### Selection of the _source function_\n\nWhen `` is a range (or is not given), the latest _published_ version (in that range) is used.\n\nIf no _published_ version exists, the latest _draft_ is selected.\n\nIf no versions in the range exist, a `404` _Not Found_ error is returned.\n\n#### The `name` of the _new function_\n\nIf a `name` is NOT specified (either as query parameter, or in an optional manifest asset in the request body), the `name` of the _new function_ will be that of the _source function_.\n\n#### The `version` of the _new function_\n\nWhen the _target_ and _source_ name are equal, the `version` query parameters is defaulted to `` (`~` when it's an exact version)\n\nThe version of the _new function_ will be:\n* If a `version` is NOT specified (either as query parameter, in an optional manifest asset, or as `` _default_)\n\n * a **patch increment** (`..+1`) of the latest **existing version** with the target `name`\n\n * **`1.0.0`** otherwise\n\n* If a `version` is specified:\n\n * the **lowest version** in that range **if no existing version** is in that range.\n\n * an **increment** of the latest existing version, **at the highest level** (_major_,_minor_,_patch_) allowed by that range.\n\n * otherwise, if all allowed versions already exist, a **`409` _Duplicate_ error** is raised.\n\n#### Deployment overrides\n\nThe new function will use the deployment overrides of the copied function, unless a _manifest_ was specified in the request body.", + "anyOf" : [ { + "$ref" : "#/components/schemas/NamedVersionRange" + }, { + "$ref" : "#/components/schemas/ExampleReference" + } ] +} +""", + object_hook=with_example_provider, +) +MODEL_DEFINITIONS.update({ + "CreateFunctionQueryV2_copy": _create_function_query_v2_copy_model_schema +}) + _create_kf_serving_async_response_model_schema = json.loads( r"""{ "required" : [ "_links", "entity", "message" ], @@ -1228,6 +1279,21 @@ def with_example_provider(dct): "CreateWebscriptAsyncResponse": _create_webscript_async_response_model_schema }) +_create_webscripts_copy_parameter_model_schema = json.loads( + r"""{ + "anyOf" : [ { + "$ref" : "#/components/schemas/NamedVersionRange" + }, { + "$ref" : "#/components/schemas/ExampleReference" + } ] +} +""", + object_hook=with_example_provider, +) +MODEL_DEFINITIONS.update({ + "create_webscripts_copy_parameter": _create_webscripts_copy_parameter_model_schema +}) + _delayed_event_data_model_schema = json.loads( r"""{ "title" : "DelayedEventData", @@ -1380,7 +1446,7 @@ def with_example_provider(dct): _deploy_args_model_schema = json.loads( r"""{ "title" : "DeployArgs", - "required" : [ "deploySpecOverrides", "endpoint", "imageName", "namespace", "runtimeName", "runtimeVersion" ], + "required" : [ "deploySpecOverrides", "endpoint", "imageName", "namespace", "revision", "runtimeName", "runtimeVersion" ], "type" : "object", "properties" : { "namespace" : { @@ -1504,32 +1570,6 @@ def with_example_provider(dct): "DeployArgs_deploySpecOverrides": _deploy_args_deploy_spec_overrides_model_schema }) -_deploy_attributes_filter_model_schema = json.loads( - r"""{ - "type" : "object", - "properties" : { - "endpoint" : { - "type" : "string", - "description" : "Filter on the openfaas endpoint. This is case-insensitive and supports wild-cards `?` (any one character) and `*` (any sequence of characters)." - }, - "imageName" : { - "type" : "string", - "description" : "Filter on the container image name. This is case-insensitive and supports wild-cards `?` (any one character) and `*` (any sequence of characters)." - }, - "storageLocation" : { - "type" : "string", - "description" : "Filter on the storageLocation. This is case-insensitive and supports wild-cards `?` (any one character) and `*` (any sequence of characters)." - } - }, - "additionalProperties" : false -} -""", - object_hook=with_example_provider, -) -MODEL_DEFINITIONS.update({ - "DeployAttributesFilter": _deploy_attributes_filter_model_schema -}) - _deploy_job_status_model_schema = json.loads( r"""{ "required" : [ "createdAt", "createdBy", "job", "operation", "request", "state", "type" ], @@ -1714,45 +1754,6 @@ def with_example_provider(dct): "DeprecatePreviousPolicy": _deprecate_previous_policy_model_schema }) -_deprecate_previous_query_model_schema = json.loads( - r"""{ - "type" : "object", - "properties" : { - "deprecatePrevious" : { - "$ref" : "#/components/schemas/DeprecatePreviousPolicy" - } - }, - "additionalProperties" : false -} -""", - object_hook=with_example_provider, -) -MODEL_DEFINITIONS.update({ - "DeprecatePreviousQuery": _deprecate_previous_query_model_schema -}) - -_deprecated_draft_filter_model_schema = json.loads( - r"""{ - "type" : "object", - "properties" : { - "deprecated" : { - "type" : "boolean", - "description" : "Filter on the deprecation status of the function." - }, - "draft" : { - "type" : "boolean", - "description" : "Filter on the draft status of the function." - } - }, - "additionalProperties" : false -} -""", - object_hook=with_example_provider, -) -MODEL_DEFINITIONS.update({ - "DeprecatedDraftFilter": _deprecated_draft_filter_model_schema -}) - _documentation_model_schema = json.loads( r"""{ "type" : "object", @@ -1810,22 +1811,6 @@ def with_example_provider(dct): "DocumentationProperty": _documentation_property_model_schema }) -_dry_run_query_model_schema = json.loads( - r"""{ - "type" : "object", - "properties" : { - "dryRun" : { - "type" : "boolean", - "description" : "If set to true, validates the deployment conditions, but does not change anything." - } - }, - "additionalProperties" : false -} -""", - object_hook=with_example_provider, -) -MODEL_DEFINITIONS.update({"DryRunQuery": _dry_run_query_model_schema}) - _entity_response_model_schema = json.loads( r"""{ "required" : [ "createdAt", "createdBy", "metadata", "name", "runtime", "status", "updatedAt", "updatedBy", "version" ], @@ -1888,39 +1873,263 @@ def with_example_provider(dct): ) MODEL_DEFINITIONS.update({"EntityResponse": _entity_response_model_schema}) -_error_and_status_response_model_schema = json.loads( +_entity_with_links_i_kfserving_response_v2__model_schema = json.loads( r"""{ - "required" : [ "error", "statusCode" ], + "title" : "EntityWithLinks_IKfservingResponseV2_", + "required" : [ "createdAt", "createdBy", "deprecated", "draft", "model", "runtime", "status", "updatedAt", "updatedBy", "updates" ], "type" : "object", "properties" : { - "error" : { - "type" : "string" + "_embedded" : { + "$ref" : "#/components/schemas/AltEmbeddedVersion_IKfservingResponseV2_" }, - "statusCode" : { - "type" : "number" - } - } -} -""", - object_hook=with_example_provider, -) -MODEL_DEFINITIONS.update({ - "ErrorAndStatusResponse": _error_and_status_response_model_schema -}) - -_error_response_model_schema = json.loads( - r"""{ - "required" : [ "error" ], - "type" : "object", - "properties" : { - "error" : { - "type" : "string" - } - } -} -""", - object_hook=with_example_provider, -) + "_links" : { + "$ref" : "#/components/schemas/AltVersionHALLink" + }, + "createdBy" : { + "title" : "createdBy", + "type" : "string", + "description" : "The user that created this entity." + }, + "createdAt" : { + "title" : "createdAt", + "type" : "string", + "description" : "The timestamp at which this entity was created.", + "format" : "date-time" + }, + "updatedBy" : { + "title" : "updatedBy", + "type" : "string", + "description" : "The user that last updated this entity." + }, + "updatedAt" : { + "title" : "updatedAt", + "type" : "string", + "description" : "The timestamp at which this entity was last updated.", + "format" : "date-time" + }, + "updates" : { + "title" : "updates", + "type" : "array", + "description" : "The audit logs corresponding to the latest modifying operations on this entity.", + "items" : { + "$ref" : "#/components/schemas/UpdateRecord" + } + }, + "status" : { + "$ref" : "#/components/schemas/Status" + }, + "failureReason" : { + "$ref" : "#/components/schemas/FailureReason" + }, + "runtime" : { + "$ref" : "#/components/schemas/RuntimeAttributes" + }, + "deprecated" : { + "title" : "deprecated", + "type" : "boolean", + "description" : "If true this function is deprecated and removed from regular listings." + }, + "draft" : { + "title" : "draft", + "type" : "boolean", + "description" : "If true this function is a draft function and it's assets are still mutable." + }, + "model" : { + "$ref" : "#/components/schemas/KFServingManifest" + } + } +} +""", + object_hook=with_example_provider, +) +MODEL_DEFINITIONS.update({ + "EntityWithLinks_IKfservingResponseV2_": _entity_with_links_i_kfserving_response_v2__model_schema +}) + +_entity_with_links_i_plug_response_v2__model_schema = json.loads( + r"""{ + "title" : "EntityWithLinks_IPlugResponseV2_", + "required" : [ "createdAt", "createdBy", "deprecated", "draft", "plug", "runtime", "status", "updatedAt", "updatedBy", "updates" ], + "type" : "object", + "properties" : { + "_embedded" : { + "$ref" : "#/components/schemas/AltEmbeddedVersion_IPlugResponseV2_" + }, + "_links" : { + "$ref" : "#/components/schemas/AltVersionHALLink" + }, + "createdBy" : { + "title" : "createdBy", + "type" : "string", + "description" : "The user that created this entity." + }, + "createdAt" : { + "title" : "createdAt", + "type" : "string", + "description" : "The timestamp at which this entity was created.", + "format" : "date-time" + }, + "updatedBy" : { + "title" : "updatedBy", + "type" : "string", + "description" : "The user that last updated this entity." + }, + "updatedAt" : { + "title" : "updatedAt", + "type" : "string", + "description" : "The timestamp at which this entity was last updated.", + "format" : "date-time" + }, + "updates" : { + "title" : "updates", + "type" : "array", + "description" : "The audit logs corresponding to the latest modifying operations on this entity.", + "items" : { + "$ref" : "#/components/schemas/UpdateRecord" + } + }, + "status" : { + "$ref" : "#/components/schemas/Status" + }, + "failureReason" : { + "$ref" : "#/components/schemas/FailureReason" + }, + "runtime" : { + "$ref" : "#/components/schemas/RuntimeAttributes" + }, + "deprecated" : { + "title" : "deprecated", + "type" : "boolean", + "description" : "If true this plug is removed from regular listings, as a result of a DELETE with force=false." + }, + "draft" : { + "title" : "draft", + "type" : "boolean", + "description" : "If true this function is a draft function and it's assets are still mutable." + }, + "plug" : { + "$ref" : "#/components/schemas/PlugManifest" + } + } +} +""", + object_hook=with_example_provider, +) +MODEL_DEFINITIONS.update({ + "EntityWithLinks_IPlugResponseV2_": _entity_with_links_i_plug_response_v2__model_schema +}) + +_entity_with_links_i_webscript_response_with_invoke_link_v2__model_schema = json.loads( + r"""{ + "title" : "EntityWithLinks_IWebscriptResponseWithInvokeLinkV2_", + "required" : [ "createdAt", "createdBy", "deprecated", "draft", "runtime", "status", "updatedAt", "updatedBy", "updates", "webscript" ], + "type" : "object", + "properties" : { + "_embedded" : { + "$ref" : "#/components/schemas/AltEmbeddedVersion_IWebscriptResponseWithInvokeLinkV2_" + }, + "_links" : { + "$ref" : "#/components/schemas/InvokeHALLink" + }, + "createdBy" : { + "title" : "createdBy", + "type" : "string", + "description" : "The user that created this entity." + }, + "createdAt" : { + "title" : "createdAt", + "type" : "string", + "description" : "The timestamp at which this entity was created.", + "format" : "date-time" + }, + "updatedBy" : { + "title" : "updatedBy", + "type" : "string", + "description" : "The user that last updated this entity." + }, + "updatedAt" : { + "title" : "updatedAt", + "type" : "string", + "description" : "The timestamp at which this entity was last updated.", + "format" : "date-time" + }, + "updates" : { + "title" : "updates", + "type" : "array", + "description" : "The audit logs corresponding to the latest modifying operations on this entity.", + "items" : { + "$ref" : "#/components/schemas/UpdateRecord" + } + }, + "status" : { + "$ref" : "#/components/schemas/Status" + }, + "failureReason" : { + "$ref" : "#/components/schemas/FailureReason" + }, + "runtime" : { + "$ref" : "#/components/schemas/RuntimeAttributes" + }, + "deprecated" : { + "title" : "deprecated", + "type" : "boolean", + "description" : "If true this function is deprecated and removed from regular listings." + }, + "draft" : { + "title" : "draft", + "type" : "boolean", + "description" : "If true this function is a draft function and it's assets are still mutable." + }, + "webscript" : { + "$ref" : "#/components/schemas/WebscriptManifest" + }, + "secret" : { + "title" : "secret", + "type" : "string", + "description" : "The secret for this webscript deployment. This is null when allowHmac=false in the webscript specificaton." + } + } +} +""", + object_hook=with_example_provider, +) +MODEL_DEFINITIONS.update({ + "EntityWithLinks_IWebscriptResponseWithInvokeLinkV2_": _entity_with_links_i_webscript_response_with_invoke_link_v2__model_schema +}) + +_error_and_status_response_model_schema = json.loads( + r"""{ + "required" : [ "error", "statusCode" ], + "type" : "object", + "properties" : { + "error" : { + "type" : "string" + }, + "statusCode" : { + "type" : "number" + } + } +} +""", + object_hook=with_example_provider, +) +MODEL_DEFINITIONS.update({ + "ErrorAndStatusResponse": _error_and_status_response_model_schema +}) + +_error_response_model_schema = json.loads( + r"""{ + "required" : [ "error" ], + "type" : "object", + "properties" : { + "error" : { + "type" : "string" + } + } +} +""", + object_hook=with_example_provider, +) MODEL_DEFINITIONS.update({"ErrorResponse": _error_response_model_schema}) _event_ack_model_schema = json.loads( @@ -2004,6 +2213,17 @@ def with_example_provider(dct): ) MODEL_DEFINITIONS.update({"EventWithCloseSSE": _event_with_close_sse_model_schema}) +_example_reference_model_schema = json.loads( + r"""{ + "type" : "string", + "description" : "Example reference.\n\nReferences the example assets from the selected runtime.", + "enum" : [ "!example" ] +} +""", + object_hook=with_example_provider, +) +MODEL_DEFINITIONS.update({"ExampleReference": _example_reference_model_schema}) + _exposed_openfaas_deploy_spec_model_schema = json.loads( r"""{ "title" : "ExposedOpenfaasDeploySpec", @@ -2175,26 +2395,6 @@ def with_example_provider(dct): ) MODEL_DEFINITIONS.update({"ForceDeleteQueryV1": _force_delete_query_v1_model_schema}) -_function_delete_query_model_schema = json.loads( - r"""{ - "type" : "object", - "properties" : { - "force" : { - "type" : "boolean", - "description" : "If true, the function version will be immediately undeployed and removed.\n\nOtherwise, the removal will be delayed to allow current invocations to end. During that period, the function is marked _deprecated_." - }, - "undeploy" : { - "type" : "boolean", - "description" : "If `true`, the `DELETE` operation\n* undeploys the (openfaas) function: it becomes no longer available for invocation.\n* does NOT remove the function from registry: it stays in an `undeployed` status. All assets and definitions are retained, so the version can be restored later with a _rebuild_ action.\n\nIf `false`, the `DELETE` operation\n* _only_ marks the plug function as _deprecated_, the function remains active but is removed from the default listings. This also applies to _draft_ versions.\n\nThis parameter is incompatible with `force=true`.\n\nIf not set the default behaviour applies:\n* _draft_ versions are _undeployed_ and _removed_ from registry.\n* non-_draft_ versions are marked _deprecated_ only." - } - }, - "additionalProperties" : false -} -""", - object_hook=with_example_provider, -) -MODEL_DEFINITIONS.update({"FunctionDeleteQuery": _function_delete_query_model_schema}) - _function_deploy_overrides_model_schema = json.loads( r"""{ "type" : "object", @@ -2252,40 +2452,9 @@ def with_example_provider(dct): "FunctionDeployOverridesType": _function_deploy_overrides_type_model_schema }) -_function_entity_query_model_schema = json.loads( - r"""{ - "type" : "object", - "properties" : { - "name" : { - "type" : "string", - "description" : "Filter on the name of the function. This is case-insensitive and supports wild-cards `?` (any one character) and `*` (any sequence of characters)." - }, - "archiveFormat" : { - "type" : "array", - "description" : "Filter on the archive format of the function.", - "items" : { - "$ref" : "#/components/schemas/ArchiveFormat" - } - }, - "runtime" : { - "type" : "array", - "description" : "Filter on the runtime of the function.", - "items" : { - "$ref" : "#/components/schemas/Runtime" - } - } - }, - "additionalProperties" : false, - "description" : "Filter on function attributes that do not change across function versions." -} -""", - object_hook=with_example_provider, -) -MODEL_DEFINITIONS.update({"FunctionEntityQuery": _function_entity_query_model_schema}) - _function_job_args_model_schema = json.loads( r"""{ - "required" : [ "runtimeName", "runtimeVersion" ], + "required" : [ "revision", "runtimeName", "runtimeVersion" ], "type" : "object", "properties" : { "runtimeName" : { @@ -2420,83 +2589,34 @@ def with_example_provider(dct): r"""{ "required" : [ "name", "runtime", "version" ], "type" : "object", - "properties" : { - "name" : { - "type" : "string", - "description" : "The logical name for the function." - }, - "version" : { - "$ref" : "#/components/schemas/SemanticVersion" - }, - "runtime" : { - "$ref" : "#/components/schemas/Runtime" - } - } -} -""", - object_hook=with_example_provider, -) -MODEL_DEFINITIONS.update({"FunctionSpec": _function_spec_model_schema}) - -_function_type_model_schema = json.loads( - r"""{ - "type" : "string", - "description" : "Type of functions supported by the registry service.", - "enum" : [ "plugs", "webscripts", "kfserving" ] -} -""", - object_hook=with_example_provider, -) -MODEL_DEFINITIONS.update({"FunctionType": _function_type_model_schema}) - -_function_version_query_model_schema = json.loads( - r"""{ - "type" : "object", - "properties" : { - "version" : { - "type" : "string", - "description" : "Filter on the version of the function (case-sensitive, supports wildcards)." - }, - "status" : { - "type" : "array", - "description" : "Filter on the status of the plug. Filter values with a `-` postfix exclude the status. Use the `any` filter value to include all states. When not specified, a default `undeployed-` filter excludes _undeployed_ functions.", - "items" : { - "$ref" : "#/components/schemas/StatusFilter" - } - }, - "runtimeVersion" : { - "$ref" : "#/components/schemas/SemanticVersionRange" - }, - "createdBy" : { - "type" : "string", - "description" : "Filter on the user that create the plug. You can use the `@me` token to indicate your own plugs.", - "example" : "@me" - }, - "updatedBy" : { - "type" : "string", - "description" : "Filter on the user that last updated the plug. You can use the `@me` token to indicate your own plugs.", - "example" : "@me" - }, - "createdBefore" : { - "$ref" : "#/components/schemas/TimestampSpec" - }, - "createdAfter" : { - "$ref" : "#/components/schemas/TimestampSpec" + "properties" : { + "name" : { + "type" : "string", + "description" : "The logical name for the function." }, - "updatedBefore" : { - "$ref" : "#/components/schemas/TimestampSpec" + "version" : { + "$ref" : "#/components/schemas/SemanticVersion" }, - "updatedAfter" : { - "$ref" : "#/components/schemas/TimestampSpec" + "runtime" : { + "$ref" : "#/components/schemas/Runtime" } - }, - "additionalProperties" : false, - "description" : "Filter on function attributes that can change across function versions. When these query parameters are used, the query is considered a _function version_ listing and no HAL links to latest (_draft_, _published_) versions are included." + } +} +""", + object_hook=with_example_provider, +) +MODEL_DEFINITIONS.update({"FunctionSpec": _function_spec_model_schema}) + +_function_type_model_schema = json.loads( + r"""{ + "type" : "string", + "description" : "Type of functions supported by the registry service.", + "enum" : [ "plugs", "webscripts", "kfserving" ] } """, object_hook=with_example_provider, ) -MODEL_DEFINITIONS.update({"FunctionVersionQuery": _function_version_query_model_schema}) +MODEL_DEFINITIONS.update({"FunctionType": _function_type_model_schema}) _get_content_params_v2_model_schema = json.loads( r"""{ @@ -3881,7 +4001,7 @@ def with_example_provider(dct): r"""{ "title" : "JobType", "type" : "string", - "enum" : [ "build", "deploy", "verify", "undeploy", "batch", "scale", "cleanup", "other" ] + "enum" : [ "build", "deploy", "verify", "undeploy", "batch", "scale", "cleanup", "notify" ] } """, object_hook=with_example_provider, @@ -3924,6 +4044,18 @@ def with_example_provider(dct): ) MODEL_DEFINITIONS.update({"JobTypeDeploy": _job_type_deploy_model_schema}) +_job_type_notify_model_schema = json.loads( + r"""{ + "title" : "JobTypeNotify", + "type" : "string", + "description" : "A job to notify that an function version has changed.", + "enum" : [ "notify" ] +} +""", + object_hook=with_example_provider, +) +MODEL_DEFINITIONS.update({"JobTypeNotify": _job_type_notify_model_schema}) + _job_type_scale_model_schema = json.loads( r"""{ "title" : "JobTypeScale", @@ -3951,6 +4083,8 @@ def with_example_provider(dct): "$ref" : "#/components/schemas/JobTypeScale" }, { "$ref" : "#/components/schemas/JobTypeBatch" + }, { + "$ref" : "#/components/schemas/JobTypeNotify" } ] } """, @@ -4916,6 +5050,9 @@ def with_example_provider(dct): "latest" : { "type" : "boolean", "description" : "When `true`, only the latest version per function name is returned. If set to `false`, multiple versions per named function can be returned. Defaults to `true`, except when specific versions are selected with the `nameVersion` filter." + }, + "showRelated" : { + "$ref" : "#/components/schemas/LatestFunctionVersionsQuery_showRelated" } }, "additionalProperties" : false, @@ -4928,10 +5065,26 @@ def with_example_provider(dct): "LatestFunctionVersionsQuery": _latest_function_versions_query_model_schema }) +_latest_function_versions_query_show_related_model_schema = json.loads( + r"""{ + "title" : "LatestFunctionVersionsQuery_showRelated", + "type" : "string", + "enum" : [ "none" ] +} +""", + object_hook=with_example_provider, +) +MODEL_DEFINITIONS.update({ + "LatestFunctionVersionsQuery_showRelated": _latest_function_versions_query_show_related_model_schema +}) + _latest_functions_query_model_schema = json.loads( r"""{ "type" : "object", "properties" : { + "showRelated" : { + "$ref" : "#/components/schemas/ShowRelatedType" + }, "limit" : { "minimum" : 0, "type" : "number", @@ -4998,7 +5151,7 @@ def with_example_provider(dct): "type" : "array", "description" : "The specification and deployment status of the queried functions", "items" : { - "$ref" : "#/components/schemas/LatestModelsResponseV2_entities_inner" + "$ref" : "#/components/schemas/EntityWithLinks_IKfservingResponseV2_" } } }, @@ -5011,76 +5164,6 @@ def with_example_provider(dct): "LatestModelsResponseV2": _latest_models_response_v2_model_schema }) -_latest_models_response_v2_entities_inner_model_schema = json.loads( - r"""{ - "title" : "LatestModelsResponseV2_entities_inner", - "required" : [ "_links", "createdAt", "createdBy", "deprecated", "draft", "model", "runtime", "status", "updatedAt", "updatedBy", "updates" ], - "type" : "object", - "properties" : { - "_links" : { - "$ref" : "#/components/schemas/AltVersionHALLink" - }, - "createdBy" : { - "title" : "createdBy", - "type" : "string", - "description" : "The user that created this entity." - }, - "createdAt" : { - "title" : "createdAt", - "type" : "string", - "description" : "The timestamp at which this entity was created.", - "format" : "date-time" - }, - "updatedBy" : { - "title" : "updatedBy", - "type" : "string", - "description" : "The user that last updated this entity." - }, - "updatedAt" : { - "title" : "updatedAt", - "type" : "string", - "description" : "The timestamp at which this entity was last updated.", - "format" : "date-time" - }, - "updates" : { - "title" : "updates", - "type" : "array", - "description" : "The audit logs corresponding to the latest modifying operations on this entity.", - "items" : { - "$ref" : "#/components/schemas/UpdateRecord" - } - }, - "status" : { - "$ref" : "#/components/schemas/Status" - }, - "failureReason" : { - "$ref" : "#/components/schemas/FailureReason" - }, - "runtime" : { - "$ref" : "#/components/schemas/RuntimeAttributes" - }, - "deprecated" : { - "title" : "deprecated", - "type" : "boolean", - "description" : "If true this function is deprecated and removed from regular listings." - }, - "draft" : { - "title" : "draft", - "type" : "boolean", - "description" : "If true this function is a draft function and it's assets are still mutable." - }, - "model" : { - "$ref" : "#/components/schemas/KFServingManifest" - } - } -} -""", - object_hook=with_example_provider, -) -MODEL_DEFINITIONS.update({ - "LatestModelsResponseV2_entities_inner": _latest_models_response_v2_entities_inner_model_schema -}) - _latest_plug_query_model_schema = json.loads( r"""{ "required" : [ "type" ], @@ -5298,6 +5381,9 @@ def with_example_provider(dct): "latest" : { "type" : "boolean", "description" : "When `true`, only the latest version per function name is returned. If set to `false`, multiple versions per named function can be returned. Defaults to `true`, except when specific versions are selected with the `nameVersion` filter." + }, + "showRelated" : { + "$ref" : "#/components/schemas/LatestFunctionVersionsQuery_showRelated" } }, "additionalProperties" : false, @@ -5333,6 +5419,9 @@ def with_example_provider(dct): "type" : { "$ref" : "#/components/schemas/PlugType" }, + "showRelated" : { + "$ref" : "#/components/schemas/ShowRelatedType" + }, "limit" : { "minimum" : 0, "type" : "number", @@ -5399,7 +5488,7 @@ def with_example_provider(dct): "type" : "array", "description" : "The specification and deployment status of the queried functions", "items" : { - "$ref" : "#/components/schemas/LatestPlugsResponseV2_entities_inner" + "$ref" : "#/components/schemas/EntityWithLinks_IPlugResponseV2_" } } }, @@ -5412,76 +5501,6 @@ def with_example_provider(dct): "LatestPlugsResponseV2": _latest_plugs_response_v2_model_schema }) -_latest_plugs_response_v2_entities_inner_model_schema = json.loads( - r"""{ - "title" : "LatestPlugsResponseV2_entities_inner", - "required" : [ "_links", "createdAt", "createdBy", "deprecated", "draft", "plug", "runtime", "status", "updatedAt", "updatedBy", "updates" ], - "type" : "object", - "properties" : { - "_links" : { - "$ref" : "#/components/schemas/AltVersionHALLink" - }, - "createdBy" : { - "title" : "createdBy", - "type" : "string", - "description" : "The user that created this entity." - }, - "createdAt" : { - "title" : "createdAt", - "type" : "string", - "description" : "The timestamp at which this entity was created.", - "format" : "date-time" - }, - "updatedBy" : { - "title" : "updatedBy", - "type" : "string", - "description" : "The user that last updated this entity." - }, - "updatedAt" : { - "title" : "updatedAt", - "type" : "string", - "description" : "The timestamp at which this entity was last updated.", - "format" : "date-time" - }, - "updates" : { - "title" : "updates", - "type" : "array", - "description" : "The audit logs corresponding to the latest modifying operations on this entity.", - "items" : { - "$ref" : "#/components/schemas/UpdateRecord" - } - }, - "status" : { - "$ref" : "#/components/schemas/Status" - }, - "failureReason" : { - "$ref" : "#/components/schemas/FailureReason" - }, - "runtime" : { - "$ref" : "#/components/schemas/RuntimeAttributes" - }, - "deprecated" : { - "title" : "deprecated", - "type" : "boolean", - "description" : "If true this plug is removed from regular listings, as a result of a DELETE with force=false." - }, - "draft" : { - "title" : "draft", - "type" : "boolean", - "description" : "If true this function is a draft function and it's assets are still mutable." - }, - "plug" : { - "$ref" : "#/components/schemas/PlugManifest" - } - } -} -""", - object_hook=with_example_provider, -) -MODEL_DEFINITIONS.update({ - "LatestPlugsResponseV2_entities_inner": _latest_plugs_response_v2_entities_inner_model_schema -}) - _latest_version_level_model_schema = json.loads( r"""{ "title" : "LatestVersionLevel", @@ -5508,99 +5527,24 @@ def with_example_provider(dct): "description" : "The total count of matching items, from which this result is one page." }, "page" : { - "type" : "number", - "description" : "The page number of a paged query result." - }, - "entities" : { - "type" : "array", - "description" : "The specification and deployment status of the queried functions", - "items" : { - "$ref" : "#/components/schemas/LatestWebscriptsResponseV2_entities_inner" - } - } - }, - "description" : "Webscripts Found" -} -""", - object_hook=with_example_provider, -) -MODEL_DEFINITIONS.update({ - "LatestWebscriptsResponseV2": _latest_webscripts_response_v2_model_schema -}) - -_latest_webscripts_response_v2_entities_inner_model_schema = json.loads( - r"""{ - "title" : "LatestWebscriptsResponseV2_entities_inner", - "required" : [ "_links", "createdAt", "createdBy", "deprecated", "draft", "runtime", "status", "updatedAt", "updatedBy", "updates", "webscript" ], - "type" : "object", - "properties" : { - "_links" : { - "$ref" : "#/components/schemas/InvokeHALLink" - }, - "createdBy" : { - "title" : "createdBy", - "type" : "string", - "description" : "The user that created this entity." - }, - "createdAt" : { - "title" : "createdAt", - "type" : "string", - "description" : "The timestamp at which this entity was created.", - "format" : "date-time" - }, - "updatedBy" : { - "title" : "updatedBy", - "type" : "string", - "description" : "The user that last updated this entity." - }, - "updatedAt" : { - "title" : "updatedAt", - "type" : "string", - "description" : "The timestamp at which this entity was last updated.", - "format" : "date-time" - }, - "updates" : { - "title" : "updates", - "type" : "array", - "description" : "The audit logs corresponding to the latest modifying operations on this entity.", - "items" : { - "$ref" : "#/components/schemas/UpdateRecord" - } - }, - "status" : { - "$ref" : "#/components/schemas/Status" - }, - "failureReason" : { - "$ref" : "#/components/schemas/FailureReason" - }, - "runtime" : { - "$ref" : "#/components/schemas/RuntimeAttributes" - }, - "deprecated" : { - "title" : "deprecated", - "type" : "boolean", - "description" : "If true this function is deprecated and removed from regular listings." - }, - "draft" : { - "title" : "draft", - "type" : "boolean", - "description" : "If true this function is a draft function and it's assets are still mutable." - }, - "webscript" : { - "$ref" : "#/components/schemas/WebscriptManifest" + "type" : "number", + "description" : "The page number of a paged query result." }, - "secret" : { - "title" : "secret", - "type" : "string", - "description" : "The secret for this webscript deployment. This is null when allowHmac=false in the webscript specificaton." + "entities" : { + "type" : "array", + "description" : "The specification and deployment status of the queried functions", + "items" : { + "$ref" : "#/components/schemas/EntityWithLinks_IWebscriptResponseWithInvokeLinkV2_" + } } - } + }, + "description" : "Webscripts Found" } """, object_hook=with_example_provider, ) MODEL_DEFINITIONS.update({ - "LatestWebscriptsResponseV2_entities_inner": _latest_webscripts_response_v2_entities_inner_model_schema + "LatestWebscriptsResponseV2": _latest_webscripts_response_v2_model_schema }) _legacy_configuration_object_model_schema = json.loads( @@ -6538,23 +6482,6 @@ def with_example_provider(dct): "LegacyRequiredPropertyObject": _legacy_required_property_object_model_schema }) -_limit_query_model_schema = json.loads( - r"""{ - "type" : "object", - "properties" : { - "limit" : { - "minimum" : 0, - "type" : "number", - "description" : "The maximum number of items to be return from this query. Has a deployment-defined default and maximum value." - } - }, - "additionalProperties" : false -} -""", - object_hook=with_example_provider, -) -MODEL_DEFINITIONS.update({"LimitQuery": _limit_query_model_schema}) - _media_type_model_schema = json.loads( r"""{ "title" : "MediaType", @@ -6695,29 +6622,6 @@ def with_example_provider(dct): "ModelVersionsResponseV2": _model_versions_response_v2_model_schema }) -_multipart_file_upload__model_schema = json.loads( - r"""{ - "title" : "Multipart file upload.", - "type" : "object", - "properties" : { - "filename" : { - "type" : "array", - "items" : { - "type" : "string", - "format" : "binary" - } - } - }, - "description" : "A multi-part upload containing one or more file assets.", - "nullable" : true -} -""", - object_hook=with_example_provider, -) -MODEL_DEFINITIONS.update({ - "Multipart_file_upload_": _multipart_file_upload__model_schema -}) - _name_model_schema = json.loads( r"""{ "required" : [ "name" ], @@ -6753,89 +6657,6 @@ def with_example_provider(dct): ) MODEL_DEFINITIONS.update({"NameAndVersion": _name_and_version_model_schema}) -_named_function_versions_query_model_schema = json.loads( - r"""{ - "type" : "object", - "properties" : { - "limit" : { - "minimum" : 0, - "type" : "number", - "description" : "The maximum number of items to be return from this query. Has a deployment-defined default and maximum value." - }, - "page" : { - "minimum" : 0, - "type" : "number", - "description" : "The number of pages to skip when returning result to this query." - }, - "deprecated" : { - "type" : "boolean", - "description" : "Filter on the deprecation status of the function." - }, - "draft" : { - "type" : "boolean", - "description" : "Filter on the draft status of the function." - }, - "version" : { - "type" : "string", - "description" : "Filter on the version of the function (case-sensitive, supports wildcards)." - }, - "status" : { - "type" : "array", - "description" : "Filter on the status of the plug. Filter values with a `-` postfix exclude the status. Use the `any` filter value to include all states. When not specified, a default `undeployed-` filter excludes _undeployed_ functions.", - "items" : { - "$ref" : "#/components/schemas/StatusFilter" - } - }, - "runtimeVersion" : { - "$ref" : "#/components/schemas/SemanticVersionRange" - }, - "createdBy" : { - "type" : "string", - "description" : "Filter on the user that create the plug. You can use the `@me` token to indicate your own plugs.", - "example" : "@me" - }, - "updatedBy" : { - "type" : "string", - "description" : "Filter on the user that last updated the plug. You can use the `@me` token to indicate your own plugs.", - "example" : "@me" - }, - "createdBefore" : { - "$ref" : "#/components/schemas/TimestampSpec" - }, - "createdAfter" : { - "$ref" : "#/components/schemas/TimestampSpec" - }, - "updatedBefore" : { - "$ref" : "#/components/schemas/TimestampSpec" - }, - "updatedAfter" : { - "$ref" : "#/components/schemas/TimestampSpec" - }, - "archiveFormat" : { - "type" : "array", - "description" : "Filter on the archive format of the function.", - "items" : { - "$ref" : "#/components/schemas/ArchiveFormat" - } - }, - "runtime" : { - "type" : "array", - "description" : "Filter on the runtime of the function.", - "items" : { - "$ref" : "#/components/schemas/Runtime" - } - } - }, - "additionalProperties" : false, - "description" : "Named function versions listing query." -} -""", - object_hook=with_example_provider, -) -MODEL_DEFINITIONS.update({ - "NamedFunctionVersionsQuery": _named_function_versions_query_model_schema -}) - _named_kf_serving_versions_query_v2_model_schema = json.loads( r"""{ "type" : "object", @@ -7139,25 +6960,6 @@ def with_example_provider(dct): "NamedPlugVersionsQueryV2": _named_plug_versions_query_v2_model_schema }) -_named_versions_filter_model_schema = json.loads( - r"""{ - "type" : "object", - "properties" : { - "nameVersion" : { - "type" : "array", - "description" : "Filter on exact `{name}@{version}` functions. Using this filter implies a `latest=false` default, returning multiple versions of the same named versions if they are filtered.", - "items" : { - "$ref" : "#/components/schemas/NamedVersion" - } - } - }, - "additionalProperties" : false -} -""", - object_hook=with_example_provider, -) -MODEL_DEFINITIONS.update({"NamedVersionsFilter": _named_versions_filter_model_schema}) - _named_webscript_versions_query_v2_model_schema = json.loads( r"""{ "type" : "object", @@ -7241,6 +7043,23 @@ def with_example_provider(dct): "NamedWebscriptVersionsQueryV2": _named_webscript_versions_query_v2_model_schema }) +_notify_result_model_schema = json.loads( + r"""{ + "title" : "NotifyResult", + "required" : [ "operation" ], + "type" : "object", + "properties" : { + "operation" : { + "$ref" : "#/components/schemas/RequestOperation" + } + }, + "description" : "The result data for a change notification." +} +""", + object_hook=with_example_provider, +) +MODEL_DEFINITIONS.update({"NotifyResult": _notify_result_model_schema}) + _openfaas_deploy_args_model_schema = json.loads( r"""{ "required" : [ "endpoint", "imageName", "namespace" ], @@ -7372,28 +7191,6 @@ def with_example_provider(dct): "OperationStatus_error": _operation_status_error_model_schema }) -_paging_query_model_schema = json.loads( - r"""{ - "type" : "object", - "properties" : { - "limit" : { - "minimum" : 0, - "type" : "number", - "description" : "The maximum number of items to be return from this query. Has a deployment-defined default and maximum value." - }, - "page" : { - "minimum" : 0, - "type" : "number", - "description" : "The number of pages to skip when returning result to this query." - } - }, - "additionalProperties" : false -} -""", - object_hook=with_example_provider, -) -MODEL_DEFINITIONS.update({"PagingQuery": _paging_query_model_schema}) - _paging_response_model_schema = json.loads( r"""{ "type" : "object", @@ -7560,26 +7357,6 @@ def with_example_provider(dct): "PlugDeleteForceQuery": _plug_delete_force_query_model_schema }) -_plug_delete_query_model_schema = json.loads( - r"""{ - "type" : "object", - "properties" : { - "force" : { - "type" : "boolean", - "description" : "If true, the plug version(s) will be undeployed and removed. Otherwise, the plug version(s) will only be deprecated, i.e removed from regular listings." - }, - "undeploy" : { - "type" : "boolean", - "description" : "If `true`, the `DELETE` operation\n* undeploys the (openfaas) function for the plug: it becomes no longer available for invocation.\n* does NOT remove the plug from registry: it stays in an `undeployed` status. All assets and definitions are retained, so the plug can be restored later with a _rebuild_ action.\n\nIf `false`, the `DELETE` operation\n* _only_ marks the plug version(s) as _deprecated_: the plug remains active but is removed from the default listings. This also applies to _draft_ versions.\n\nThis parameter is incompatible with `force=true`.\n\nIf not set the default behaviour applies:\n* _draft_ versions are _undeployed_ and _removed_ from registry.\n* non-_draft_ versions are marked _deprecated_ only." - } - }, - "additionalProperties" : false -} -""", - object_hook=with_example_provider, -) -MODEL_DEFINITIONS.update({"PlugDeleteQuery": _plug_delete_query_model_schema}) - _plug_interface_model_schema = json.loads( r"""{ "title" : "PlugInterface", @@ -7987,21 +7764,6 @@ def with_example_provider(dct): ) MODEL_DEFINITIONS.update({"PlugType": _plug_type_model_schema}) -_plug_type_query_model_schema = json.loads( - r"""{ - "type" : "object", - "properties" : { - "type" : { - "$ref" : "#/components/schemas/PlugType" - } - }, - "additionalProperties" : false -} -""", - object_hook=with_example_provider, -) -MODEL_DEFINITIONS.update({"PlugTypeQuery": _plug_type_query_model_schema}) - _plug_versions_response_v2_model_schema = json.loads( r"""{ "required" : [ "count", "entities" ], @@ -8234,10 +7996,19 @@ def with_example_provider(dct): r"""{ "type" : "object", "properties" : { + "chown" : { + "type" : "boolean", + "description" : "If set, ownership of the draft function is transferred to the current user.", + "default" : false + }, "comment" : { "type" : "string", "description" : "An optional user-specified comment corresponding to the operation." }, + "author" : { + "type" : "string", + "description" : "Optionally changes the author metadata when updating a function." + }, "deprecatePrevious" : { "$ref" : "#/components/schemas/DeprecatePreviousPolicy" }, @@ -8382,61 +8153,31 @@ def with_example_provider(dct): "description" : "Plug Rebuild Ignored" } """, - object_hook=with_example_provider, -) -MODEL_DEFINITIONS.update({ - "RebuildPlugSyncResponseV2": _rebuild_plug_sync_response_v2_model_schema -}) - -_rebuild_policy_model_schema = json.loads( - r"""{ - "type" : "string", - "description" : "The policy to select a new runtime version when a rebuild is issued.", - "enum" : [ "patch", "minor", "major", "same" ] -} -""", - object_hook=with_example_provider, -) -MODEL_DEFINITIONS.update({"RebuildPolicy": _rebuild_policy_model_schema}) - -_rebuild_query_params_model_schema = json.loads( - r"""{ - "type" : "object", - "properties" : { - "upgrade" : { - "$ref" : "#/components/schemas/RebuildPolicy" - }, - "dryRun" : { - "type" : "boolean", - "description" : "If set to true, checks whether rebuild jobs are needed, but do not start any jobs." - }, - "forceVersion" : { - "$ref" : "#/components/schemas/SemanticVersion" - }, - "ignoreChecks" : { - "type" : "boolean", - "description" : "If set to true, checks that normally prevent a rebuild are overriden. These checks include:\n* function state in `pending`, `running`, `failed` or `undeployed`\n* backoff period due to recent failures\n* usage of deprecated dependencies\n* running jobs on entity\n* the `dryRun` option" - }, - "scaleToZero" : { - "type" : "boolean", - "description" : "Indicates whether the function needs to be scaled down after successful (re-)deployment. If not set, the function is scaled to zero only if it was not active before this command." - }, - "skipRebuild" : { - "type" : "boolean", - "description" : "If set, the function will not be rebuild. Always uses the current runtime version when re-deploying/re-verifying the function." - } - }, - "additionalProperties" : false + object_hook=with_example_provider, +) +MODEL_DEFINITIONS.update({ + "RebuildPlugSyncResponseV2": _rebuild_plug_sync_response_v2_model_schema +}) + +_rebuild_policy_model_schema = json.loads( + r"""{ + "type" : "string", + "description" : "The policy to select a new runtime version when a rebuild is issued.", + "enum" : [ "patch", "minor", "major", "same" ] } """, object_hook=with_example_provider, ) -MODEL_DEFINITIONS.update({"RebuildQueryParams": _rebuild_query_params_model_schema}) +MODEL_DEFINITIONS.update({"RebuildPolicy": _rebuild_policy_model_schema}) _rebuild_query_v2_model_schema = json.loads( r"""{ "type" : "object", "properties" : { + "scaleToZero" : { + "type" : "boolean", + "description" : "Indicates whether the function needs to be scaled down after successful verification. If not set, the function is scaled to zero only if it was not active before this command." + }, "comment" : { "type" : "string", "description" : "An optional user-specified comment corresponding to the operation." @@ -8460,10 +8201,6 @@ def with_example_provider(dct): "type" : "boolean", "description" : "If set to true, checks that normally prevent a rebuild are overriden. These checks include:\n* function state in `pending`, `running`, `failed` or `undeployed`\n* backoff period due to recent failures\n* usage of deprecated dependencies\n* running jobs on entity\n* the `dryRun` option" }, - "scaleToZero" : { - "type" : "boolean", - "description" : "Indicates whether the function needs to be scaled down after successful (re-)deployment. If not set, the function is scaled to zero only if it was not active before this command." - }, "skipRebuild" : { "type" : "boolean", "description" : "If set, the function will not be rebuild. Always uses the current runtime version when re-deploying/re-verifying the function." @@ -8551,6 +8288,35 @@ def with_example_provider(dct): "RebuildWebscriptSyncResponseV2": _rebuild_webscript_sync_response_v2_model_schema }) +_registry_error_response_model_schema = json.loads( + r"""{ + "required" : [ "code", "error", "statusCode" ], + "type" : "object", + "properties" : { + "error" : { + "type" : "string" + }, + "code" : { + "type" : "string" + }, + "statusCode" : { + "type" : "number" + }, + "data" : { + "type" : "object", + "additionalProperties" : { + "type" : "string" + } + } + } +} +""", + object_hook=with_example_provider, +) +MODEL_DEFINITIONS.update({ + "RegistryErrorResponse": _registry_error_response_model_schema +}) + _remove_function_query_v2_model_schema = json.loads( r"""{ "type" : "object", @@ -8611,6 +8377,23 @@ def with_example_provider(dct): ) MODEL_DEFINITIONS.update({"RemovePlugQueryV2": _remove_plug_query_v2_model_schema}) +_request_deploy_query_model_schema = json.loads( + r"""{ + "type" : "object", + "properties" : { + "deploy" : { + "type" : "boolean", + "description" : "Indicates that a function should be _deployed_ when its assets are valid.\n\n* If `true` (default), jobs to build and deploy the function will be initiated after it is checked that the assets are valid. Invalid assets lead to a validation error, and the function and its assets are not created or updated.\n* If `false`, the uploaded assets are stored and the function is created/updated in `registered` state. Asset validation errors are only returned as warning, and stored as `failureReason` on the function entity. Use an _asset update_ or _rebuild_ to initiate a build and deploy at a later stage.", + "default" : true + } + }, + "additionalProperties" : false +} +""", + object_hook=with_example_provider, +) +MODEL_DEFINITIONS.update({"RequestDeployQuery": _request_deploy_query_model_schema}) + _request_operation_model_schema = json.loads( r"""{ "title" : "RequestOperation", @@ -9280,7 +9063,7 @@ def with_example_provider(dct): _scale_args_model_schema = json.loads( r"""{ "title" : "ScaleArgs", - "required" : [ "endpoint", "namespace", "replicas", "runtimeName", "runtimeVersion" ], + "required" : [ "endpoint", "namespace", "replicas", "revision", "runtimeName", "runtimeVersion" ], "type" : "object", "properties" : { "namespace" : { @@ -9423,6 +9206,16 @@ def with_example_provider(dct): ) MODEL_DEFINITIONS.update({"SemanticVersionRange": _semantic_version_range_model_schema}) +_show_related_type_model_schema = json.loads( + r"""{ + "type" : "string", + "enum" : [ "embed", "link", "none" ] +} +""", + object_hook=with_example_provider, +) +MODEL_DEFINITIONS.update({"ShowRelatedType": _show_related_type_model_schema}) + _status_model_schema = json.loads( r"""{ "title" : "Status", @@ -9446,6 +9239,19 @@ def with_example_provider(dct): ) MODEL_DEFINITIONS.update({"StatusAny": _status_any_model_schema}) +_status_exclude_model_schema = json.loads( + r"""{ + "pattern" : "^(registered|pending|deployed|unhealthy|failed|running|undeploying|undeployed)-$", + "type" : "string", + "description" : "Any status value with a `-` postfix appended, excludes that status as a filter.", + "example" : "running-", + "enum" : [ "registered-", "running-", "pending-", "deployed-", "unhealthy-", "failed-", "undeploying-", "undeployed-" ] +} +""", + object_hook=with_example_provider, +) +MODEL_DEFINITIONS.update({"StatusExclude": _status_exclude_model_schema}) + _status_filter_model_schema = json.loads( r"""{ "description" : "Inclusion or exclusion filter on the `status` property.", @@ -9607,21 +9413,6 @@ def with_example_provider(dct): ) MODEL_DEFINITIONS.update({"TagsFilter": _tags_filter_model_schema}) -_tags_query_model_schema = json.loads( - r"""{ - "type" : "object", - "properties" : { - "tags" : { - "$ref" : "#/components/schemas/TagsFilter" - } - }, - "additionalProperties" : false -} -""", - object_hook=with_example_provider, -) -MODEL_DEFINITIONS.update({"TagsQuery": _tags_query_model_schema}) - _timestamp_absolute_model_schema = json.loads( r"""{ "title" : "TimestampAbsolute", @@ -9769,7 +9560,7 @@ def with_example_provider(dct): _undeploy_args_model_schema = json.loads( r"""{ "title" : "UndeployArgs", - "required" : [ "deleteEntity", "endpoint", "isNativePlug", "namespace", "runtimeName", "runtimeVersion" ], + "required" : [ "deleteEntity", "endpoint", "isNativePlug", "namespace", "revision", "runtimeName", "runtimeVersion" ], "type" : "object", "properties" : { "namespace" : { @@ -9969,39 +9760,37 @@ def with_example_provider(dct): "UnhealthyInvokableWebscriptError": _unhealthy_invokable_webscript_error_model_schema }) -_update_comment_model_schema = json.loads( - r"""{ - "type" : "object", - "properties" : { - "comment" : { - "type" : "string", - "description" : "An optional user-specified comment corresponding to the operation." - } - } -} -""", - object_hook=with_example_provider, -) -MODEL_DEFINITIONS.update({"UpdateComment": _update_comment_model_schema}) - _update_draft_query_model_schema = json.loads( r"""{ - "required" : [ "chown" ], "type" : "object", "properties" : { - "comment" : { - "type" : "string", - "description" : "An optional user-specified comment corresponding to the operation." + "scaleToZero" : { + "type" : "boolean", + "description" : "If set to true, after successful deployment, the deployed function will be scaled to zero. This saves computing resources when the function is not to be used immediately.", + "default" : false }, - "async" : { + "deploy" : { "type" : "boolean", - "description" : "Unless this is set to false, the server will start the required job actions asynchronously and return a 202 Accepted response. If false the request will block until the job actions are completed, or a timeout occurs.", + "description" : "Indicates that a function should be _deployed_ when its assets are valid.\n\n* If `true` (default), jobs to build and deploy the function will be initiated after it is checked that the assets are valid. Invalid assets lead to a validation error, and the function and its assets are not created or updated.\n* If `false`, the uploaded assets are stored and the function is created/updated in `registered` state. Asset validation errors are only returned as warning, and stored as `failureReason` on the function entity. Use an _asset update_ or _rebuild_ to initiate a build and deploy at a later stage.", "default" : true }, "chown" : { "type" : "boolean", "description" : "If set, ownership of the draft function is transferred to the current user.", "default" : false + }, + "comment" : { + "type" : "string", + "description" : "An optional user-specified comment corresponding to the operation." + }, + "author" : { + "type" : "string", + "description" : "Optionally changes the author metadata when updating a function." + }, + "async" : { + "type" : "boolean", + "description" : "Unless this is set to false, the server will start the required job actions asynchronously and return a 202 Accepted response. If false the request will block until the job actions are completed, or a timeout occurs.", + "default" : true } }, "additionalProperties" : false @@ -10310,7 +10099,7 @@ def with_example_provider(dct): _verify_args_model_schema = json.loads( r"""{ "title" : "VerifyArgs", - "required" : [ "endpoint", "namespace", "runtimeName", "runtimeVersion" ], + "required" : [ "endpoint", "namespace", "revision", "runtimeName", "runtimeVersion" ], "type" : "object", "properties" : { "namespace" : { @@ -10529,110 +10318,6 @@ def with_example_provider(dct): ) MODEL_DEFINITIONS.update({"VersionIncludes": _version_includes_model_schema}) -_versions_query_model_schema = json.loads( - r"""{ - "type" : "object", - "properties" : { - "limit" : { - "minimum" : 0, - "type" : "number", - "description" : "The maximum number of items to be return from this query. Has a deployment-defined default and maximum value." - }, - "page" : { - "minimum" : 0, - "type" : "number", - "description" : "The number of pages to skip when returning result to this query." - }, - "endpoint" : { - "type" : "string", - "description" : "Filter on the openfaas endpoint. This is case-insensitive and supports wild-cards `?` (any one character) and `*` (any sequence of characters)." - }, - "imageName" : { - "type" : "string", - "description" : "Filter on the container image name. This is case-insensitive and supports wild-cards `?` (any one character) and `*` (any sequence of characters)." - }, - "storageLocation" : { - "type" : "string", - "description" : "Filter on the storageLocation. This is case-insensitive and supports wild-cards `?` (any one character) and `*` (any sequence of characters)." - }, - "deprecated" : { - "type" : "boolean", - "description" : "Filter on the deprecation status of the function." - }, - "draft" : { - "type" : "boolean", - "description" : "Filter on the draft status of the function." - }, - "nameVersion" : { - "type" : "array", - "description" : "Filter on exact `{name}@{version}` functions. Using this filter implies a `latest=false` default, returning multiple versions of the same named versions if they are filtered.", - "items" : { - "$ref" : "#/components/schemas/NamedVersion" - } - }, - "version" : { - "type" : "string", - "description" : "Filter on the version of the function (case-sensitive, supports wildcards)." - }, - "status" : { - "type" : "array", - "description" : "Filter on the status of the plug. Filter values with a `-` postfix exclude the status. Use the `any` filter value to include all states. When not specified, a default `undeployed-` filter excludes _undeployed_ functions.", - "items" : { - "$ref" : "#/components/schemas/StatusFilter" - } - }, - "runtimeVersion" : { - "$ref" : "#/components/schemas/SemanticVersionRange" - }, - "createdBy" : { - "type" : "string", - "description" : "Filter on the user that create the plug. You can use the `@me` token to indicate your own plugs.", - "example" : "@me" - }, - "updatedBy" : { - "type" : "string", - "description" : "Filter on the user that last updated the plug. You can use the `@me` token to indicate your own plugs.", - "example" : "@me" - }, - "createdBefore" : { - "$ref" : "#/components/schemas/TimestampSpec" - }, - "createdAfter" : { - "$ref" : "#/components/schemas/TimestampSpec" - }, - "updatedBefore" : { - "$ref" : "#/components/schemas/TimestampSpec" - }, - "updatedAfter" : { - "$ref" : "#/components/schemas/TimestampSpec" - }, - "name" : { - "type" : "string", - "description" : "Filter on the name of the function. This is case-insensitive and supports wild-cards `?` (any one character) and `*` (any sequence of characters)." - }, - "archiveFormat" : { - "type" : "array", - "description" : "Filter on the archive format of the function.", - "items" : { - "$ref" : "#/components/schemas/ArchiveFormat" - } - }, - "runtime" : { - "type" : "array", - "description" : "Filter on the runtime of the function.", - "items" : { - "$ref" : "#/components/schemas/Runtime" - } - } - }, - "additionalProperties" : false, - "description" : "Function versions paged query" -} -""", - object_hook=with_example_provider, -) -MODEL_DEFINITIONS.update({"VersionsQuery": _versions_query_model_schema}) - _versions_query_v2_model_schema = json.loads( r"""{ "type" : "object", @@ -11324,6 +11009,56 @@ def with_example_provider(dct): ) MODEL_DEFINITIONS.update({"WithAssetHALLink": _with_asset_hal_link_model_schema}) +_with_embedded_alt_versions_i_kfserving_response_v2__model_schema = json.loads( + r"""{ + "type" : "object", + "properties" : { + "_embedded" : { + "$ref" : "#/components/schemas/AltEmbeddedVersion_IKfservingResponseV2_" + } + } +} +""", + object_hook=with_example_provider, +) +MODEL_DEFINITIONS.update({ + "WithEmbeddedAltVersions_IKfservingResponseV2_": _with_embedded_alt_versions_i_kfserving_response_v2__model_schema +}) + +_with_embedded_alt_versions_i_plug_response_v2__model_schema = json.loads( + r"""{ + "type" : "object", + "properties" : { + "_embedded" : { + "$ref" : "#/components/schemas/AltEmbeddedVersion_IPlugResponseV2_" + } + } +} +""", + object_hook=with_example_provider, +) +MODEL_DEFINITIONS.update({ + "WithEmbeddedAltVersions_IPlugResponseV2_": _with_embedded_alt_versions_i_plug_response_v2__model_schema +}) + +_with_embedded_alt_versions_i_webscript_response_with_invoke_link_v2__model_schema = ( + json.loads( + r"""{ + "type" : "object", + "properties" : { + "_embedded" : { + "$ref" : "#/components/schemas/AltEmbeddedVersion_IWebscriptResponseWithInvokeLinkV2_" + } + } +} +""", + object_hook=with_example_provider, + ) +) +MODEL_DEFINITIONS.update({ + "WithEmbeddedAltVersions_IWebscriptResponseWithInvokeLinkV2_": _with_embedded_alt_versions_i_webscript_response_with_invoke_link_v2__model_schema +}) + _with_entity_attributes_model_schema = json.loads( r"""{ "required" : [ "createdAt", "createdBy", "deprecated", "draft", "runtime", "status", "updatedAt", "updatedBy", "updates" ], diff --git a/test/types/alt_embedded_version_i_kfserving_response_v2_stub.py b/test/types/alt_embedded_version_i_kfserving_response_v2_stub.py new file mode 100644 index 00000000..ffec8260 --- /dev/null +++ b/test/types/alt_embedded_version_i_kfserving_response_v2_stub.py @@ -0,0 +1,71 @@ +# coding: utf-8 +"""Waylay Function Registry model tests. + +This code was generated from the OpenAPI documentation of 'Waylay Function Registry' + +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +import json + +from jsf import JSF +from pydantic import TypeAdapter + +from ..openapi import MODEL_DEFINITIONS, with_example_provider + +try: + from waylay.services.registry.models.alt_embedded_version_i_kfserving_response_v2 import ( + AltEmbeddedVersionIKfservingResponseV2, + ) + + AltEmbeddedVersionIKfservingResponseV2Adapter = TypeAdapter( + AltEmbeddedVersionIKfservingResponseV2 + ) + MODELS_AVAILABLE = True +except ImportError as exc: + MODELS_AVAILABLE = False + +alt_embedded_version_i_kfserving_response_v2__model_schema = json.loads( + r"""{ + "title" : "AltEmbeddedVersion_IKfservingResponseV2_", + "type" : "object", + "properties" : { + "draft" : { + "$ref" : "#/components/schemas/KfservingResponseV2" + }, + "published" : { + "$ref" : "#/components/schemas/KfservingResponseV2" + } + }, + "description" : "Embedded representations of the _latest_ draft/published versions." +} +""", + object_hook=with_example_provider, +) +alt_embedded_version_i_kfserving_response_v2__model_schema.update({ + "definitions": MODEL_DEFINITIONS +}) + +alt_embedded_version_i_kfserving_response_v2__faker = JSF( + alt_embedded_version_i_kfserving_response_v2__model_schema, allow_none_optionals=1 +) + + +class AltEmbeddedVersionIKfservingResponseV2Stub: + """AltEmbeddedVersionIKfservingResponseV2 unit test stubs.""" + + @classmethod + def create_json(cls): + """Create a dict stub instance.""" + return alt_embedded_version_i_kfserving_response_v2__faker.generate() + + @classmethod + def create_instance(cls) -> "AltEmbeddedVersionIKfservingResponseV2": + """Create AltEmbeddedVersionIKfservingResponseV2 stub instance.""" + if not MODELS_AVAILABLE: + raise ImportError("Models must be installed to create class stubs") + return AltEmbeddedVersionIKfservingResponseV2Adapter.validate_python( + cls.create_json() + ) diff --git a/test/types/alt_embedded_version_i_plug_response_v2_stub.py b/test/types/alt_embedded_version_i_plug_response_v2_stub.py new file mode 100644 index 00000000..a259bca8 --- /dev/null +++ b/test/types/alt_embedded_version_i_plug_response_v2_stub.py @@ -0,0 +1,71 @@ +# coding: utf-8 +"""Waylay Function Registry model tests. + +This code was generated from the OpenAPI documentation of 'Waylay Function Registry' + +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +import json + +from jsf import JSF +from pydantic import TypeAdapter + +from ..openapi import MODEL_DEFINITIONS, with_example_provider + +try: + from waylay.services.registry.models.alt_embedded_version_i_plug_response_v2 import ( + AltEmbeddedVersionIPlugResponseV2, + ) + + AltEmbeddedVersionIPlugResponseV2Adapter = TypeAdapter( + AltEmbeddedVersionIPlugResponseV2 + ) + MODELS_AVAILABLE = True +except ImportError as exc: + MODELS_AVAILABLE = False + +alt_embedded_version_i_plug_response_v2__model_schema = json.loads( + r"""{ + "title" : "AltEmbeddedVersion_IPlugResponseV2_", + "type" : "object", + "properties" : { + "draft" : { + "$ref" : "#/components/schemas/PlugResponseV2" + }, + "published" : { + "$ref" : "#/components/schemas/PlugResponseV2" + } + }, + "description" : "Embedded representations of the _latest_ draft/published versions." +} +""", + object_hook=with_example_provider, +) +alt_embedded_version_i_plug_response_v2__model_schema.update({ + "definitions": MODEL_DEFINITIONS +}) + +alt_embedded_version_i_plug_response_v2__faker = JSF( + alt_embedded_version_i_plug_response_v2__model_schema, allow_none_optionals=1 +) + + +class AltEmbeddedVersionIPlugResponseV2Stub: + """AltEmbeddedVersionIPlugResponseV2 unit test stubs.""" + + @classmethod + def create_json(cls): + """Create a dict stub instance.""" + return alt_embedded_version_i_plug_response_v2__faker.generate() + + @classmethod + def create_instance(cls) -> "AltEmbeddedVersionIPlugResponseV2": + """Create AltEmbeddedVersionIPlugResponseV2 stub instance.""" + if not MODELS_AVAILABLE: + raise ImportError("Models must be installed to create class stubs") + return AltEmbeddedVersionIPlugResponseV2Adapter.validate_python( + cls.create_json() + ) diff --git a/test/types/alt_embedded_version_i_webscript_response_with_invoke_link_v2_stub.py b/test/types/alt_embedded_version_i_webscript_response_with_invoke_link_v2_stub.py new file mode 100644 index 00000000..ff19e43b --- /dev/null +++ b/test/types/alt_embedded_version_i_webscript_response_with_invoke_link_v2_stub.py @@ -0,0 +1,76 @@ +# coding: utf-8 +"""Waylay Function Registry model tests. + +This code was generated from the OpenAPI documentation of 'Waylay Function Registry' + +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +import json + +from jsf import JSF +from pydantic import TypeAdapter + +from ..openapi import MODEL_DEFINITIONS, with_example_provider + +try: + from waylay.services.registry.models.alt_embedded_version_i_webscript_response_with_invoke_link_v2 import ( + AltEmbeddedVersionIWebscriptResponseWithInvokeLinkV2, + ) + + AltEmbeddedVersionIWebscriptResponseWithInvokeLinkV2Adapter = TypeAdapter( + AltEmbeddedVersionIWebscriptResponseWithInvokeLinkV2 + ) + MODELS_AVAILABLE = True +except ImportError as exc: + MODELS_AVAILABLE = False + +alt_embedded_version_i_webscript_response_with_invoke_link_v2__model_schema = ( + json.loads( + r"""{ + "title" : "AltEmbeddedVersion_IWebscriptResponseWithInvokeLinkV2_", + "type" : "object", + "properties" : { + "draft" : { + "$ref" : "#/components/schemas/WebscriptResponseWithInvokeLinkV2" + }, + "published" : { + "$ref" : "#/components/schemas/WebscriptResponseWithInvokeLinkV2" + } + }, + "description" : "Embedded representations of the _latest_ draft/published versions." +} +""", + object_hook=with_example_provider, + ) +) +alt_embedded_version_i_webscript_response_with_invoke_link_v2__model_schema.update({ + "definitions": MODEL_DEFINITIONS +}) + +alt_embedded_version_i_webscript_response_with_invoke_link_v2__faker = JSF( + alt_embedded_version_i_webscript_response_with_invoke_link_v2__model_schema, + allow_none_optionals=1, +) + + +class AltEmbeddedVersionIWebscriptResponseWithInvokeLinkV2Stub: + """AltEmbeddedVersionIWebscriptResponseWithInvokeLinkV2 unit test stubs.""" + + @classmethod + def create_json(cls): + """Create a dict stub instance.""" + return alt_embedded_version_i_webscript_response_with_invoke_link_v2__faker.generate() + + @classmethod + def create_instance(cls) -> "AltEmbeddedVersionIWebscriptResponseWithInvokeLinkV2": + """Create AltEmbeddedVersionIWebscriptResponseWithInvokeLinkV2 stub instance.""" + if not MODELS_AVAILABLE: + raise ImportError("Models must be installed to create class stubs") + return ( + AltEmbeddedVersionIWebscriptResponseWithInvokeLinkV2Adapter.validate_python( + cls.create_json() + ) + ) diff --git a/test/types/any_job_result_stub.py b/test/types/any_job_result_stub.py index 68f97a77..837e41bc 100644 --- a/test/types/any_job_result_stub.py +++ b/test/types/any_job_result_stub.py @@ -40,6 +40,8 @@ "$ref" : "#/components/schemas/BatchResult" }, { "$ref" : "#/components/schemas/CleanupResult" + }, { + "$ref" : "#/components/schemas/NotifyResult" } ] } """, diff --git a/test/types/async_deploy_query_stub.py b/test/types/async_deploy_query_stub.py deleted file mode 100644 index b3b63a48..00000000 --- a/test/types/async_deploy_query_stub.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding: utf-8 -"""Waylay Function Registry model tests. - -This code was generated from the OpenAPI documentation of 'Waylay Function Registry' - -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. -""" - -import json - -from jsf import JSF -from pydantic import TypeAdapter - -from ..openapi import MODEL_DEFINITIONS, with_example_provider - -try: - from waylay.services.registry.models.async_deploy_query import AsyncDeployQuery - - AsyncDeployQueryAdapter = TypeAdapter(AsyncDeployQuery) - MODELS_AVAILABLE = True -except ImportError as exc: - MODELS_AVAILABLE = False - -async_deploy_query_model_schema = json.loads( - r"""{ - "type" : "object", - "properties" : { - "deprecatePrevious" : { - "$ref" : "#/components/schemas/DeprecatePreviousPolicy" - }, - "dryRun" : { - "type" : "boolean", - "description" : "If set to true, validates the deployment conditions, but does not change anything." - }, - "async" : { - "type" : "boolean", - "description" : "Unless this is set to false, the server will start the required job actions asynchronously and return a 202 Accepted response. If false the request will block until the job actions are completed, or a timeout occurs.", - "default" : true - }, - "scaleToZero" : { - "type" : "boolean", - "description" : "If set to true, after successful deployment, the deployed function will be scaled to zero. Saves computing resources when the function is not to be used immediately.", - "default" : false - } - }, - "additionalProperties" : false -} -""", - object_hook=with_example_provider, -) -async_deploy_query_model_schema.update({"definitions": MODEL_DEFINITIONS}) - -async_deploy_query_faker = JSF(async_deploy_query_model_schema, allow_none_optionals=1) - - -class AsyncDeployQueryStub: - """AsyncDeployQuery unit test stubs.""" - - @classmethod - def create_json(cls): - """Create a dict stub instance.""" - return async_deploy_query_faker.generate() - - @classmethod - def create_instance(cls) -> "AsyncDeployQuery": - """Create AsyncDeployQuery stub instance.""" - if not MODELS_AVAILABLE: - raise ImportError("Models must be installed to create class stubs") - return AsyncDeployQueryAdapter.validate_python(cls.create_json()) diff --git a/test/types/async_deploy_query_v1_stub.py b/test/types/async_deploy_query_v1_stub.py index 4b332374..24e5631b 100644 --- a/test/types/async_deploy_query_v1_stub.py +++ b/test/types/async_deploy_query_v1_stub.py @@ -27,11 +27,6 @@ r"""{ "type" : "object", "properties" : { - "scaleToZero" : { - "type" : "boolean", - "description" : "If set to true, after successful deployment, the deployed function will be scaled to zero. Saves computing resources when the function is not to be used immediately.", - "default" : false - }, "async" : { "type" : "boolean", "description" : "Unless this is set to false, the server will start the required job actions asynchronously and return a 202 Accepted response. If false the request will block until the job actions are completed, or a timeout occurs.", @@ -40,6 +35,11 @@ "dryRun" : { "type" : "boolean", "description" : "If set to true, validates the deployment conditions, but does not change anything." + }, + "scaleToZero" : { + "type" : "boolean", + "description" : "If set to true, after successful deployment, the deployed function will be scaled to zero. This saves computing resources when the function is not to be used immediately.", + "default" : false } }, "additionalProperties" : false diff --git a/test/types/async_query_default_true_stub.py b/test/types/async_query_default_true_stub.py deleted file mode 100644 index 4f7dd2e6..00000000 --- a/test/types/async_query_default_true_stub.py +++ /dev/null @@ -1,63 +0,0 @@ -# coding: utf-8 -"""Waylay Function Registry model tests. - -This code was generated from the OpenAPI documentation of 'Waylay Function Registry' - -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. -""" - -import json - -from jsf import JSF -from pydantic import TypeAdapter - -from ..openapi import MODEL_DEFINITIONS, with_example_provider - -try: - from waylay.services.registry.models.async_query_default_true import ( - AsyncQueryDefaultTrue, - ) - - AsyncQueryDefaultTrueAdapter = TypeAdapter(AsyncQueryDefaultTrue) - MODELS_AVAILABLE = True -except ImportError as exc: - MODELS_AVAILABLE = False - -async_query_default_true_model_schema = json.loads( - r"""{ - "type" : "object", - "properties" : { - "async" : { - "type" : "boolean", - "description" : "Unless this is set to false, the server will start the required job actions asynchronously and return a 202 Accepted response. If false the request will block until the job actions are completed, or a timeout occurs.", - "default" : true - } - }, - "additionalProperties" : false -} -""", - object_hook=with_example_provider, -) -async_query_default_true_model_schema.update({"definitions": MODEL_DEFINITIONS}) - -async_query_default_true_faker = JSF( - async_query_default_true_model_schema, allow_none_optionals=1 -) - - -class AsyncQueryDefaultTrueStub: - """AsyncQueryDefaultTrue unit test stubs.""" - - @classmethod - def create_json(cls): - """Create a dict stub instance.""" - return async_query_default_true_faker.generate() - - @classmethod - def create_instance(cls) -> "AsyncQueryDefaultTrue": - """Create AsyncQueryDefaultTrue stub instance.""" - if not MODELS_AVAILABLE: - raise ImportError("Models must be installed to create class stubs") - return AsyncQueryDefaultTrueAdapter.validate_python(cls.create_json()) diff --git a/test/types/async_verify_query_stub.py b/test/types/async_verify_query_stub.py index c61eb244..6ddbd8c9 100644 --- a/test/types/async_verify_query_stub.py +++ b/test/types/async_verify_query_stub.py @@ -27,18 +27,14 @@ r"""{ "type" : "object", "properties" : { - "comment" : { - "type" : "string", - "description" : "An optional user-specified comment corresponding to the operation." + "scaleToZero" : { + "type" : "boolean", + "description" : "Indicates whether the function needs to be scaled down after successful verification. If not set, the function is scaled to zero only if it was not active before this command." }, "async" : { "type" : "boolean", "description" : "Unless this is set to false, the server will start the required job actions asynchronously and return a 202 Accepted response. If false the request will block until the job actions are completed, or a timeout occurs.", "default" : true - }, - "scaleToZero" : { - "type" : "boolean", - "description" : "Indicates whether the function needs to be scaled down after successful verification. If not set, the function is scaled to zero only if it was not active before this command." } }, "additionalProperties" : false diff --git a/test/types/build_args_stub.py b/test/types/build_args_stub.py index 153a8d6c..3ce35453 100644 --- a/test/types/build_args_stub.py +++ b/test/types/build_args_stub.py @@ -26,7 +26,7 @@ build_args_model_schema = json.loads( r"""{ "title" : "BuildArgs", - "required" : [ "args", "imageName", "runtimeName", "runtimeVersion", "storageLocation" ], + "required" : [ "args", "imageName", "revision", "runtimeName", "runtimeVersion", "storageLocation" ], "type" : "object", "properties" : { "runtimeName" : { diff --git a/test/types/completed_event_data_stub.py b/test/types/completed_event_data_stub.py index 70c8cc7f..4106e9aa 100644 --- a/test/types/completed_event_data_stub.py +++ b/test/types/completed_event_data_stub.py @@ -26,13 +26,13 @@ completed_event_data_model_schema = json.loads( r"""{ "title" : "CompletedEventData", - "required" : [ "returnValue" ], + "required" : [ "returnvalue" ], "type" : "object", "properties" : { "prev" : { "$ref" : "#/components/schemas/QueueEvents" }, - "returnValue" : { + "returnvalue" : { "$ref" : "#/components/schemas/AnyJobResult" } } diff --git a/test/types/create_function_query_v2_copy_stub.py b/test/types/create_function_query_v2_copy_stub.py new file mode 100644 index 00000000..cbd0b4b7 --- /dev/null +++ b/test/types/create_function_query_v2_copy_stub.py @@ -0,0 +1,61 @@ +# coding: utf-8 +"""Waylay Function Registry model tests. + +This code was generated from the OpenAPI documentation of 'Waylay Function Registry' + +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +import json + +from jsf import JSF +from pydantic import TypeAdapter + +from ..openapi import MODEL_DEFINITIONS, with_example_provider + +try: + from waylay.services.registry.models.create_function_query_v2_copy import ( + CreateFunctionQueryV2Copy, + ) + + CreateFunctionQueryV2CopyAdapter = TypeAdapter(CreateFunctionQueryV2Copy) + MODELS_AVAILABLE = True +except ImportError as exc: + MODELS_AVAILABLE = False + +create_function_query_v2_copy_model_schema = json.loads( + r"""{ + "title" : "CreateFunctionQueryV2_copy", + "description" : "Indicates the _source_ of initial assets for a _new function_.\n\nWhen using this query parameter, the request body does not need to contain assets, but any assets in the request body will overwrite the copied assets.\n\n#### Selection of _assets_ source\n\n* If set as `[@]`, the _new function_ will be created with copied assets of the selected _source function_.\n* If set as `!example`, a `runtime` query parameter is required, and the _new function_ will be initialized with assets of the _runtime example_.\n\n#### Selection of the _source function_\n\nWhen `` is a range (or is not given), the latest _published_ version (in that range) is used.\n\nIf no _published_ version exists, the latest _draft_ is selected.\n\nIf no versions in the range exist, a `404` _Not Found_ error is returned.\n\n#### The `name` of the _new function_\n\nIf a `name` is NOT specified (either as query parameter, or in an optional manifest asset in the request body), the `name` of the _new function_ will be that of the _source function_.\n\n#### The `version` of the _new function_\n\nWhen the _target_ and _source_ name are equal, the `version` query parameters is defaulted to `` (`~` when it's an exact version)\n\nThe version of the _new function_ will be:\n* If a `version` is NOT specified (either as query parameter, in an optional manifest asset, or as `` _default_)\n\n * a **patch increment** (`..+1`) of the latest **existing version** with the target `name`\n\n * **`1.0.0`** otherwise\n\n* If a `version` is specified:\n\n * the **lowest version** in that range **if no existing version** is in that range.\n\n * an **increment** of the latest existing version, **at the highest level** (_major_,_minor_,_patch_) allowed by that range.\n\n * otherwise, if all allowed versions already exist, a **`409` _Duplicate_ error** is raised.\n\n#### Deployment overrides\n\nThe new function will use the deployment overrides of the copied function, unless a _manifest_ was specified in the request body.", + "anyOf" : [ { + "$ref" : "#/components/schemas/NamedVersionRange" + }, { + "$ref" : "#/components/schemas/ExampleReference" + } ] +} +""", + object_hook=with_example_provider, +) +create_function_query_v2_copy_model_schema.update({"definitions": MODEL_DEFINITIONS}) + +create_function_query_v2_copy_faker = JSF( + create_function_query_v2_copy_model_schema, allow_none_optionals=1 +) + + +class CreateFunctionQueryV2CopyStub: + """CreateFunctionQueryV2Copy unit test stubs.""" + + @classmethod + def create_json(cls): + """Create a dict stub instance.""" + return create_function_query_v2_copy_faker.generate() + + @classmethod + def create_instance(cls) -> "CreateFunctionQueryV2Copy": + """Create CreateFunctionQueryV2Copy stub instance.""" + if not MODELS_AVAILABLE: + raise ImportError("Models must be installed to create class stubs") + return CreateFunctionQueryV2CopyAdapter.validate_python(cls.create_json()) diff --git a/test/types/create_function_query_v2_stub.py b/test/types/create_function_query_v2_stub.py index fc348283..e09e5b14 100644 --- a/test/types/create_function_query_v2_stub.py +++ b/test/types/create_function_query_v2_stub.py @@ -29,6 +29,24 @@ r"""{ "type" : "object", "properties" : { + "deploy" : { + "type" : "boolean", + "description" : "Indicates that a function should be _deployed_ when its assets are valid.\n\n* If `true` (default), jobs to build and deploy the function will be initiated after it is checked that the assets are valid. Invalid assets lead to a validation error, and the function and its assets are not created or updated.\n* If `false`, the uploaded assets are stored and the function is created/updated in `registered` state. Asset validation errors are only returned as warning, and stored as `failureReason` on the function entity. Use an _asset update_ or _rebuild_ to initiate a build and deploy at a later stage.", + "default" : true + }, + "author" : { + "type" : "string", + "description" : "Optionally changes the author metadata when updating a function." + }, + "comment" : { + "type" : "string", + "description" : "An optional user-specified comment corresponding to the operation." + }, + "scaleToZero" : { + "type" : "boolean", + "description" : "If set to true, after successful deployment, the deployed function will be scaled to zero. This saves computing resources when the function is not to be used immediately.", + "default" : false + }, "deprecatePrevious" : { "$ref" : "#/components/schemas/DeprecatePreviousPolicy" }, @@ -41,11 +59,6 @@ "description" : "Unless this is set to false, the server will start the required job actions asynchronously and return a 202 Accepted response. If false the request will block until the job actions are completed, or a timeout occurs.", "default" : true }, - "scaleToZero" : { - "type" : "boolean", - "description" : "If set to true, after successful deployment, the deployed function will be scaled to zero. Saves computing resources when the function is not to be used immediately.", - "default" : false - }, "version" : { "$ref" : "#/components/schemas/SemanticVersionRange" }, @@ -57,6 +70,12 @@ "type" : "boolean", "description" : "If set, the created function will be a draft function and its assets are still mutable. A build and deploy is initiated only in the case when all necessary assets are present and valid.", "default" : false + }, + "runtime" : { + "$ref" : "#/components/schemas/NamedVersionRange" + }, + "copy" : { + "$ref" : "#/components/schemas/CreateFunctionQueryV2_copy" } }, "additionalProperties" : false diff --git a/test/types/create_webscripts_copy_parameter_stub.py b/test/types/create_webscripts_copy_parameter_stub.py new file mode 100644 index 00000000..c5e1a478 --- /dev/null +++ b/test/types/create_webscripts_copy_parameter_stub.py @@ -0,0 +1,59 @@ +# coding: utf-8 +"""Waylay Function Registry model tests. + +This code was generated from the OpenAPI documentation of 'Waylay Function Registry' + +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +import json + +from jsf import JSF +from pydantic import TypeAdapter + +from ..openapi import MODEL_DEFINITIONS, with_example_provider + +try: + from waylay.services.registry.models.create_webscripts_copy_parameter import ( + CreateWebscriptsCopyParameter, + ) + + CreateWebscriptsCopyParameterAdapter = TypeAdapter(CreateWebscriptsCopyParameter) + MODELS_AVAILABLE = True +except ImportError as exc: + MODELS_AVAILABLE = False + +create_webscripts_copy_parameter_model_schema = json.loads( + r"""{ + "anyOf" : [ { + "$ref" : "#/components/schemas/NamedVersionRange" + }, { + "$ref" : "#/components/schemas/ExampleReference" + } ] +} +""", + object_hook=with_example_provider, +) +create_webscripts_copy_parameter_model_schema.update({"definitions": MODEL_DEFINITIONS}) + +create_webscripts_copy_parameter_faker = JSF( + create_webscripts_copy_parameter_model_schema, allow_none_optionals=1 +) + + +class CreateWebscriptsCopyParameterStub: + """CreateWebscriptsCopyParameter unit test stubs.""" + + @classmethod + def create_json(cls): + """Create a dict stub instance.""" + return create_webscripts_copy_parameter_faker.generate() + + @classmethod + def create_instance(cls) -> "CreateWebscriptsCopyParameter": + """Create CreateWebscriptsCopyParameter stub instance.""" + if not MODELS_AVAILABLE: + raise ImportError("Models must be installed to create class stubs") + return CreateWebscriptsCopyParameterAdapter.validate_python(cls.create_json()) diff --git a/test/types/deploy_args_stub.py b/test/types/deploy_args_stub.py index 4d48d73b..4fb49cc4 100644 --- a/test/types/deploy_args_stub.py +++ b/test/types/deploy_args_stub.py @@ -26,7 +26,7 @@ deploy_args_model_schema = json.loads( r"""{ "title" : "DeployArgs", - "required" : [ "deploySpecOverrides", "endpoint", "imageName", "namespace", "runtimeName", "runtimeVersion" ], + "required" : [ "deploySpecOverrides", "endpoint", "imageName", "namespace", "revision", "runtimeName", "runtimeVersion" ], "type" : "object", "properties" : { "namespace" : { diff --git a/test/types/deploy_attributes_filter_stub.py b/test/types/deploy_attributes_filter_stub.py deleted file mode 100644 index 9dc22861..00000000 --- a/test/types/deploy_attributes_filter_stub.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding: utf-8 -"""Waylay Function Registry model tests. - -This code was generated from the OpenAPI documentation of 'Waylay Function Registry' - -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. -""" - -import json - -from jsf import JSF -from pydantic import TypeAdapter - -from ..openapi import MODEL_DEFINITIONS, with_example_provider - -try: - from waylay.services.registry.models.deploy_attributes_filter import ( - DeployAttributesFilter, - ) - - DeployAttributesFilterAdapter = TypeAdapter(DeployAttributesFilter) - MODELS_AVAILABLE = True -except ImportError as exc: - MODELS_AVAILABLE = False - -deploy_attributes_filter_model_schema = json.loads( - r"""{ - "type" : "object", - "properties" : { - "endpoint" : { - "type" : "string", - "description" : "Filter on the openfaas endpoint. This is case-insensitive and supports wild-cards `?` (any one character) and `*` (any sequence of characters)." - }, - "imageName" : { - "type" : "string", - "description" : "Filter on the container image name. This is case-insensitive and supports wild-cards `?` (any one character) and `*` (any sequence of characters)." - }, - "storageLocation" : { - "type" : "string", - "description" : "Filter on the storageLocation. This is case-insensitive and supports wild-cards `?` (any one character) and `*` (any sequence of characters)." - } - }, - "additionalProperties" : false -} -""", - object_hook=with_example_provider, -) -deploy_attributes_filter_model_schema.update({"definitions": MODEL_DEFINITIONS}) - -deploy_attributes_filter_faker = JSF( - deploy_attributes_filter_model_schema, allow_none_optionals=1 -) - - -class DeployAttributesFilterStub: - """DeployAttributesFilter unit test stubs.""" - - @classmethod - def create_json(cls): - """Create a dict stub instance.""" - return deploy_attributes_filter_faker.generate() - - @classmethod - def create_instance(cls) -> "DeployAttributesFilter": - """Create DeployAttributesFilter stub instance.""" - if not MODELS_AVAILABLE: - raise ImportError("Models must be installed to create class stubs") - return DeployAttributesFilterAdapter.validate_python(cls.create_json()) diff --git a/test/types/deprecate_previous_query_stub.py b/test/types/deprecate_previous_query_stub.py deleted file mode 100644 index cb62c3f5..00000000 --- a/test/types/deprecate_previous_query_stub.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding: utf-8 -"""Waylay Function Registry model tests. - -This code was generated from the OpenAPI documentation of 'Waylay Function Registry' - -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. -""" - -import json - -from jsf import JSF -from pydantic import TypeAdapter - -from ..openapi import MODEL_DEFINITIONS, with_example_provider - -try: - from waylay.services.registry.models.deprecate_previous_query import ( - DeprecatePreviousQuery, - ) - - DeprecatePreviousQueryAdapter = TypeAdapter(DeprecatePreviousQuery) - MODELS_AVAILABLE = True -except ImportError as exc: - MODELS_AVAILABLE = False - -deprecate_previous_query_model_schema = json.loads( - r"""{ - "type" : "object", - "properties" : { - "deprecatePrevious" : { - "$ref" : "#/components/schemas/DeprecatePreviousPolicy" - } - }, - "additionalProperties" : false -} -""", - object_hook=with_example_provider, -) -deprecate_previous_query_model_schema.update({"definitions": MODEL_DEFINITIONS}) - -deprecate_previous_query_faker = JSF( - deprecate_previous_query_model_schema, allow_none_optionals=1 -) - - -class DeprecatePreviousQueryStub: - """DeprecatePreviousQuery unit test stubs.""" - - @classmethod - def create_json(cls): - """Create a dict stub instance.""" - return deprecate_previous_query_faker.generate() - - @classmethod - def create_instance(cls) -> "DeprecatePreviousQuery": - """Create DeprecatePreviousQuery stub instance.""" - if not MODELS_AVAILABLE: - raise ImportError("Models must be installed to create class stubs") - return DeprecatePreviousQueryAdapter.validate_python(cls.create_json()) diff --git a/test/types/deprecated_draft_filter_stub.py b/test/types/deprecated_draft_filter_stub.py deleted file mode 100644 index fb440430..00000000 --- a/test/types/deprecated_draft_filter_stub.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding: utf-8 -"""Waylay Function Registry model tests. - -This code was generated from the OpenAPI documentation of 'Waylay Function Registry' - -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. -""" - -import json - -from jsf import JSF -from pydantic import TypeAdapter - -from ..openapi import MODEL_DEFINITIONS, with_example_provider - -try: - from waylay.services.registry.models.deprecated_draft_filter import ( - DeprecatedDraftFilter, - ) - - DeprecatedDraftFilterAdapter = TypeAdapter(DeprecatedDraftFilter) - MODELS_AVAILABLE = True -except ImportError as exc: - MODELS_AVAILABLE = False - -deprecated_draft_filter_model_schema = json.loads( - r"""{ - "type" : "object", - "properties" : { - "deprecated" : { - "type" : "boolean", - "description" : "Filter on the deprecation status of the function." - }, - "draft" : { - "type" : "boolean", - "description" : "Filter on the draft status of the function." - } - }, - "additionalProperties" : false -} -""", - object_hook=with_example_provider, -) -deprecated_draft_filter_model_schema.update({"definitions": MODEL_DEFINITIONS}) - -deprecated_draft_filter_faker = JSF( - deprecated_draft_filter_model_schema, allow_none_optionals=1 -) - - -class DeprecatedDraftFilterStub: - """DeprecatedDraftFilter unit test stubs.""" - - @classmethod - def create_json(cls): - """Create a dict stub instance.""" - return deprecated_draft_filter_faker.generate() - - @classmethod - def create_instance(cls) -> "DeprecatedDraftFilter": - """Create DeprecatedDraftFilter stub instance.""" - if not MODELS_AVAILABLE: - raise ImportError("Models must be installed to create class stubs") - return DeprecatedDraftFilterAdapter.validate_python(cls.create_json()) diff --git a/test/types/latest_models_response_v2_entities_inner_stub.py b/test/types/entity_with_links_i_kfserving_response_v2_stub.py similarity index 68% rename from test/types/latest_models_response_v2_entities_inner_stub.py rename to test/types/entity_with_links_i_kfserving_response_v2_stub.py index e3134b4e..ab118347 100644 --- a/test/types/latest_models_response_v2_entities_inner_stub.py +++ b/test/types/entity_with_links_i_kfserving_response_v2_stub.py @@ -16,23 +16,26 @@ from ..openapi import MODEL_DEFINITIONS, with_example_provider try: - from waylay.services.registry.models.latest_models_response_v2_entities_inner import ( - LatestModelsResponseV2EntitiesInner, + from waylay.services.registry.models.entity_with_links_i_kfserving_response_v2 import ( + EntityWithLinksIKfservingResponseV2, ) - LatestModelsResponseV2EntitiesInnerAdapter = TypeAdapter( - LatestModelsResponseV2EntitiesInner + EntityWithLinksIKfservingResponseV2Adapter = TypeAdapter( + EntityWithLinksIKfservingResponseV2 ) MODELS_AVAILABLE = True except ImportError as exc: MODELS_AVAILABLE = False -latest_models_response_v2_entities_inner_model_schema = json.loads( +entity_with_links_i_kfserving_response_v2__model_schema = json.loads( r"""{ - "title" : "LatestModelsResponseV2_entities_inner", - "required" : [ "_links", "createdAt", "createdBy", "deprecated", "draft", "model", "runtime", "status", "updatedAt", "updatedBy", "updates" ], + "title" : "EntityWithLinks_IKfservingResponseV2_", + "required" : [ "createdAt", "createdBy", "deprecated", "draft", "model", "runtime", "status", "updatedAt", "updatedBy", "updates" ], "type" : "object", "properties" : { + "_embedded" : { + "$ref" : "#/components/schemas/AltEmbeddedVersion_IKfservingResponseV2_" + }, "_links" : { "$ref" : "#/components/schemas/AltVersionHALLink" }, @@ -93,28 +96,28 @@ """, object_hook=with_example_provider, ) -latest_models_response_v2_entities_inner_model_schema.update({ +entity_with_links_i_kfserving_response_v2__model_schema.update({ "definitions": MODEL_DEFINITIONS }) -latest_models_response_v2_entities_inner_faker = JSF( - latest_models_response_v2_entities_inner_model_schema, allow_none_optionals=1 +entity_with_links_i_kfserving_response_v2__faker = JSF( + entity_with_links_i_kfserving_response_v2__model_schema, allow_none_optionals=1 ) -class LatestModelsResponseV2EntitiesInnerStub: - """LatestModelsResponseV2EntitiesInner unit test stubs.""" +class EntityWithLinksIKfservingResponseV2Stub: + """EntityWithLinksIKfservingResponseV2 unit test stubs.""" @classmethod def create_json(cls): """Create a dict stub instance.""" - return latest_models_response_v2_entities_inner_faker.generate() + return entity_with_links_i_kfserving_response_v2__faker.generate() @classmethod - def create_instance(cls) -> "LatestModelsResponseV2EntitiesInner": - """Create LatestModelsResponseV2EntitiesInner stub instance.""" + def create_instance(cls) -> "EntityWithLinksIKfservingResponseV2": + """Create EntityWithLinksIKfservingResponseV2 stub instance.""" if not MODELS_AVAILABLE: raise ImportError("Models must be installed to create class stubs") - return LatestModelsResponseV2EntitiesInnerAdapter.validate_python( + return EntityWithLinksIKfservingResponseV2Adapter.validate_python( cls.create_json() ) diff --git a/test/types/latest_plugs_response_v2_entities_inner_stub.py b/test/types/entity_with_links_i_plug_response_v2_stub.py similarity index 69% rename from test/types/latest_plugs_response_v2_entities_inner_stub.py rename to test/types/entity_with_links_i_plug_response_v2_stub.py index 0bdd6800..acb8738d 100644 --- a/test/types/latest_plugs_response_v2_entities_inner_stub.py +++ b/test/types/entity_with_links_i_plug_response_v2_stub.py @@ -16,23 +16,24 @@ from ..openapi import MODEL_DEFINITIONS, with_example_provider try: - from waylay.services.registry.models.latest_plugs_response_v2_entities_inner import ( - LatestPlugsResponseV2EntitiesInner, + from waylay.services.registry.models.entity_with_links_i_plug_response_v2 import ( + EntityWithLinksIPlugResponseV2, ) - LatestPlugsResponseV2EntitiesInnerAdapter = TypeAdapter( - LatestPlugsResponseV2EntitiesInner - ) + EntityWithLinksIPlugResponseV2Adapter = TypeAdapter(EntityWithLinksIPlugResponseV2) MODELS_AVAILABLE = True except ImportError as exc: MODELS_AVAILABLE = False -latest_plugs_response_v2_entities_inner_model_schema = json.loads( +entity_with_links_i_plug_response_v2__model_schema = json.loads( r"""{ - "title" : "LatestPlugsResponseV2_entities_inner", - "required" : [ "_links", "createdAt", "createdBy", "deprecated", "draft", "plug", "runtime", "status", "updatedAt", "updatedBy", "updates" ], + "title" : "EntityWithLinks_IPlugResponseV2_", + "required" : [ "createdAt", "createdBy", "deprecated", "draft", "plug", "runtime", "status", "updatedAt", "updatedBy", "updates" ], "type" : "object", "properties" : { + "_embedded" : { + "$ref" : "#/components/schemas/AltEmbeddedVersion_IPlugResponseV2_" + }, "_links" : { "$ref" : "#/components/schemas/AltVersionHALLink" }, @@ -93,28 +94,26 @@ """, object_hook=with_example_provider, ) -latest_plugs_response_v2_entities_inner_model_schema.update({ +entity_with_links_i_plug_response_v2__model_schema.update({ "definitions": MODEL_DEFINITIONS }) -latest_plugs_response_v2_entities_inner_faker = JSF( - latest_plugs_response_v2_entities_inner_model_schema, allow_none_optionals=1 +entity_with_links_i_plug_response_v2__faker = JSF( + entity_with_links_i_plug_response_v2__model_schema, allow_none_optionals=1 ) -class LatestPlugsResponseV2EntitiesInnerStub: - """LatestPlugsResponseV2EntitiesInner unit test stubs.""" +class EntityWithLinksIPlugResponseV2Stub: + """EntityWithLinksIPlugResponseV2 unit test stubs.""" @classmethod def create_json(cls): """Create a dict stub instance.""" - return latest_plugs_response_v2_entities_inner_faker.generate() + return entity_with_links_i_plug_response_v2__faker.generate() @classmethod - def create_instance(cls) -> "LatestPlugsResponseV2EntitiesInner": - """Create LatestPlugsResponseV2EntitiesInner stub instance.""" + def create_instance(cls) -> "EntityWithLinksIPlugResponseV2": + """Create EntityWithLinksIPlugResponseV2 stub instance.""" if not MODELS_AVAILABLE: raise ImportError("Models must be installed to create class stubs") - return LatestPlugsResponseV2EntitiesInnerAdapter.validate_python( - cls.create_json() - ) + return EntityWithLinksIPlugResponseV2Adapter.validate_python(cls.create_json()) diff --git a/test/types/latest_webscripts_response_v2_entities_inner_stub.py b/test/types/entity_with_links_i_webscript_response_with_invoke_link_v2_stub.py similarity index 65% rename from test/types/latest_webscripts_response_v2_entities_inner_stub.py rename to test/types/entity_with_links_i_webscript_response_with_invoke_link_v2_stub.py index 38b88a1d..a3e9e880 100644 --- a/test/types/latest_webscripts_response_v2_entities_inner_stub.py +++ b/test/types/entity_with_links_i_webscript_response_with_invoke_link_v2_stub.py @@ -16,23 +16,26 @@ from ..openapi import MODEL_DEFINITIONS, with_example_provider try: - from waylay.services.registry.models.latest_webscripts_response_v2_entities_inner import ( - LatestWebscriptsResponseV2EntitiesInner, + from waylay.services.registry.models.entity_with_links_i_webscript_response_with_invoke_link_v2 import ( + EntityWithLinksIWebscriptResponseWithInvokeLinkV2, ) - LatestWebscriptsResponseV2EntitiesInnerAdapter = TypeAdapter( - LatestWebscriptsResponseV2EntitiesInner + EntityWithLinksIWebscriptResponseWithInvokeLinkV2Adapter = TypeAdapter( + EntityWithLinksIWebscriptResponseWithInvokeLinkV2 ) MODELS_AVAILABLE = True except ImportError as exc: MODELS_AVAILABLE = False -latest_webscripts_response_v2_entities_inner_model_schema = json.loads( +entity_with_links_i_webscript_response_with_invoke_link_v2__model_schema = json.loads( r"""{ - "title" : "LatestWebscriptsResponseV2_entities_inner", - "required" : [ "_links", "createdAt", "createdBy", "deprecated", "draft", "runtime", "status", "updatedAt", "updatedBy", "updates", "webscript" ], + "title" : "EntityWithLinks_IWebscriptResponseWithInvokeLinkV2_", + "required" : [ "createdAt", "createdBy", "deprecated", "draft", "runtime", "status", "updatedAt", "updatedBy", "updates", "webscript" ], "type" : "object", "properties" : { + "_embedded" : { + "$ref" : "#/components/schemas/AltEmbeddedVersion_IWebscriptResponseWithInvokeLinkV2_" + }, "_links" : { "$ref" : "#/components/schemas/InvokeHALLink" }, @@ -98,28 +101,31 @@ """, object_hook=with_example_provider, ) -latest_webscripts_response_v2_entities_inner_model_schema.update({ +entity_with_links_i_webscript_response_with_invoke_link_v2__model_schema.update({ "definitions": MODEL_DEFINITIONS }) -latest_webscripts_response_v2_entities_inner_faker = JSF( - latest_webscripts_response_v2_entities_inner_model_schema, allow_none_optionals=1 +entity_with_links_i_webscript_response_with_invoke_link_v2__faker = JSF( + entity_with_links_i_webscript_response_with_invoke_link_v2__model_schema, + allow_none_optionals=1, ) -class LatestWebscriptsResponseV2EntitiesInnerStub: - """LatestWebscriptsResponseV2EntitiesInner unit test stubs.""" +class EntityWithLinksIWebscriptResponseWithInvokeLinkV2Stub: + """EntityWithLinksIWebscriptResponseWithInvokeLinkV2 unit test stubs.""" @classmethod def create_json(cls): """Create a dict stub instance.""" - return latest_webscripts_response_v2_entities_inner_faker.generate() + return ( + entity_with_links_i_webscript_response_with_invoke_link_v2__faker.generate() + ) @classmethod - def create_instance(cls) -> "LatestWebscriptsResponseV2EntitiesInner": - """Create LatestWebscriptsResponseV2EntitiesInner stub instance.""" + def create_instance(cls) -> "EntityWithLinksIWebscriptResponseWithInvokeLinkV2": + """Create EntityWithLinksIWebscriptResponseWithInvokeLinkV2 stub instance.""" if not MODELS_AVAILABLE: raise ImportError("Models must be installed to create class stubs") - return LatestWebscriptsResponseV2EntitiesInnerAdapter.validate_python( + return EntityWithLinksIWebscriptResponseWithInvokeLinkV2Adapter.validate_python( cls.create_json() ) diff --git a/test/types/example_reference_stub.py b/test/types/example_reference_stub.py new file mode 100644 index 00000000..14bfe8f0 --- /dev/null +++ b/test/types/example_reference_stub.py @@ -0,0 +1,53 @@ +# coding: utf-8 +"""Waylay Function Registry model tests. + +This code was generated from the OpenAPI documentation of 'Waylay Function Registry' + +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +import json + +from jsf import JSF +from pydantic import TypeAdapter + +from ..openapi import MODEL_DEFINITIONS, with_example_provider + +try: + from waylay.services.registry.models.example_reference import ExampleReference + + ExampleReferenceAdapter = TypeAdapter(ExampleReference) + MODELS_AVAILABLE = True +except ImportError as exc: + MODELS_AVAILABLE = False + +example_reference_model_schema = json.loads( + r"""{ + "type" : "string", + "description" : "Example reference.\n\nReferences the example assets from the selected runtime.", + "enum" : [ "!example" ] +} +""", + object_hook=with_example_provider, +) +example_reference_model_schema.update({"definitions": MODEL_DEFINITIONS}) + +example_reference_faker = JSF(example_reference_model_schema, allow_none_optionals=1) + + +class ExampleReferenceStub: + """ExampleReference unit test stubs.""" + + @classmethod + def create_json(cls): + """Create a dict stub instance.""" + return example_reference_faker.generate() + + @classmethod + def create_instance(cls) -> "ExampleReference": + """Create ExampleReference stub instance.""" + if not MODELS_AVAILABLE: + raise ImportError("Models must be installed to create class stubs") + return ExampleReferenceAdapter.validate_python(cls.create_json()) diff --git a/test/types/function_delete_query_stub.py b/test/types/function_delete_query_stub.py deleted file mode 100644 index 9de594e4..00000000 --- a/test/types/function_delete_query_stub.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding: utf-8 -"""Waylay Function Registry model tests. - -This code was generated from the OpenAPI documentation of 'Waylay Function Registry' - -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. -""" - -import json - -from jsf import JSF -from pydantic import TypeAdapter - -from ..openapi import MODEL_DEFINITIONS, with_example_provider - -try: - from waylay.services.registry.models.function_delete_query import ( - FunctionDeleteQuery, - ) - - FunctionDeleteQueryAdapter = TypeAdapter(FunctionDeleteQuery) - MODELS_AVAILABLE = True -except ImportError as exc: - MODELS_AVAILABLE = False - -function_delete_query_model_schema = json.loads( - r"""{ - "type" : "object", - "properties" : { - "force" : { - "type" : "boolean", - "description" : "If true, the function version will be immediately undeployed and removed.\n\nOtherwise, the removal will be delayed to allow current invocations to end. During that period, the function is marked _deprecated_." - }, - "undeploy" : { - "type" : "boolean", - "description" : "If `true`, the `DELETE` operation\n* undeploys the (openfaas) function: it becomes no longer available for invocation.\n* does NOT remove the function from registry: it stays in an `undeployed` status. All assets and definitions are retained, so the version can be restored later with a _rebuild_ action.\n\nIf `false`, the `DELETE` operation\n* _only_ marks the plug function as _deprecated_, the function remains active but is removed from the default listings. This also applies to _draft_ versions.\n\nThis parameter is incompatible with `force=true`.\n\nIf not set the default behaviour applies:\n* _draft_ versions are _undeployed_ and _removed_ from registry.\n* non-_draft_ versions are marked _deprecated_ only." - } - }, - "additionalProperties" : false -} -""", - object_hook=with_example_provider, -) -function_delete_query_model_schema.update({"definitions": MODEL_DEFINITIONS}) - -function_delete_query_faker = JSF( - function_delete_query_model_schema, allow_none_optionals=1 -) - - -class FunctionDeleteQueryStub: - """FunctionDeleteQuery unit test stubs.""" - - @classmethod - def create_json(cls): - """Create a dict stub instance.""" - return function_delete_query_faker.generate() - - @classmethod - def create_instance(cls) -> "FunctionDeleteQuery": - """Create FunctionDeleteQuery stub instance.""" - if not MODELS_AVAILABLE: - raise ImportError("Models must be installed to create class stubs") - return FunctionDeleteQueryAdapter.validate_python(cls.create_json()) diff --git a/test/types/function_entity_query_stub.py b/test/types/function_entity_query_stub.py deleted file mode 100644 index 271d7767..00000000 --- a/test/types/function_entity_query_stub.py +++ /dev/null @@ -1,77 +0,0 @@ -# coding: utf-8 -"""Waylay Function Registry model tests. - -This code was generated from the OpenAPI documentation of 'Waylay Function Registry' - -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. -""" - -import json - -from jsf import JSF -from pydantic import TypeAdapter - -from ..openapi import MODEL_DEFINITIONS, with_example_provider - -try: - from waylay.services.registry.models.function_entity_query import ( - FunctionEntityQuery, - ) - - FunctionEntityQueryAdapter = TypeAdapter(FunctionEntityQuery) - MODELS_AVAILABLE = True -except ImportError as exc: - MODELS_AVAILABLE = False - -function_entity_query_model_schema = json.loads( - r"""{ - "type" : "object", - "properties" : { - "name" : { - "type" : "string", - "description" : "Filter on the name of the function. This is case-insensitive and supports wild-cards `?` (any one character) and `*` (any sequence of characters)." - }, - "archiveFormat" : { - "type" : "array", - "description" : "Filter on the archive format of the function.", - "items" : { - "$ref" : "#/components/schemas/ArchiveFormat" - } - }, - "runtime" : { - "type" : "array", - "description" : "Filter on the runtime of the function.", - "items" : { - "$ref" : "#/components/schemas/Runtime" - } - } - }, - "additionalProperties" : false, - "description" : "Filter on function attributes that do not change across function versions." -} -""", - object_hook=with_example_provider, -) -function_entity_query_model_schema.update({"definitions": MODEL_DEFINITIONS}) - -function_entity_query_faker = JSF( - function_entity_query_model_schema, allow_none_optionals=1 -) - - -class FunctionEntityQueryStub: - """FunctionEntityQuery unit test stubs.""" - - @classmethod - def create_json(cls): - """Create a dict stub instance.""" - return function_entity_query_faker.generate() - - @classmethod - def create_instance(cls) -> "FunctionEntityQuery": - """Create FunctionEntityQuery stub instance.""" - if not MODELS_AVAILABLE: - raise ImportError("Models must be installed to create class stubs") - return FunctionEntityQueryAdapter.validate_python(cls.create_json()) diff --git a/test/types/function_job_args_stub.py b/test/types/function_job_args_stub.py index 67262efd..6c799f1f 100644 --- a/test/types/function_job_args_stub.py +++ b/test/types/function_job_args_stub.py @@ -25,7 +25,7 @@ function_job_args_model_schema = json.loads( r"""{ - "required" : [ "runtimeName", "runtimeVersion" ], + "required" : [ "revision", "runtimeName", "runtimeVersion" ], "type" : "object", "properties" : { "runtimeName" : { diff --git a/test/types/function_version_query_stub.py b/test/types/function_version_query_stub.py deleted file mode 100644 index 260a09dc..00000000 --- a/test/types/function_version_query_stub.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding: utf-8 -"""Waylay Function Registry model tests. - -This code was generated from the OpenAPI documentation of 'Waylay Function Registry' - -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. -""" - -import json - -from jsf import JSF -from pydantic import TypeAdapter - -from ..openapi import MODEL_DEFINITIONS, with_example_provider - -try: - from waylay.services.registry.models.function_version_query import ( - FunctionVersionQuery, - ) - - FunctionVersionQueryAdapter = TypeAdapter(FunctionVersionQuery) - MODELS_AVAILABLE = True -except ImportError as exc: - MODELS_AVAILABLE = False - -function_version_query_model_schema = json.loads( - r"""{ - "type" : "object", - "properties" : { - "version" : { - "type" : "string", - "description" : "Filter on the version of the function (case-sensitive, supports wildcards)." - }, - "status" : { - "type" : "array", - "description" : "Filter on the status of the plug. Filter values with a `-` postfix exclude the status. Use the `any` filter value to include all states. When not specified, a default `undeployed-` filter excludes _undeployed_ functions.", - "items" : { - "$ref" : "#/components/schemas/StatusFilter" - } - }, - "runtimeVersion" : { - "$ref" : "#/components/schemas/SemanticVersionRange" - }, - "createdBy" : { - "type" : "string", - "description" : "Filter on the user that create the plug. You can use the `@me` token to indicate your own plugs.", - "example" : "@me" - }, - "updatedBy" : { - "type" : "string", - "description" : "Filter on the user that last updated the plug. You can use the `@me` token to indicate your own plugs.", - "example" : "@me" - }, - "createdBefore" : { - "$ref" : "#/components/schemas/TimestampSpec" - }, - "createdAfter" : { - "$ref" : "#/components/schemas/TimestampSpec" - }, - "updatedBefore" : { - "$ref" : "#/components/schemas/TimestampSpec" - }, - "updatedAfter" : { - "$ref" : "#/components/schemas/TimestampSpec" - } - }, - "additionalProperties" : false, - "description" : "Filter on function attributes that can change across function versions. When these query parameters are used, the query is considered a _function version_ listing and no HAL links to latest (_draft_, _published_) versions are included." -} -""", - object_hook=with_example_provider, -) -function_version_query_model_schema.update({"definitions": MODEL_DEFINITIONS}) - -function_version_query_faker = JSF( - function_version_query_model_schema, allow_none_optionals=1 -) - - -class FunctionVersionQueryStub: - """FunctionVersionQuery unit test stubs.""" - - @classmethod - def create_json(cls): - """Create a dict stub instance.""" - return function_version_query_faker.generate() - - @classmethod - def create_instance(cls) -> "FunctionVersionQuery": - """Create FunctionVersionQuery stub instance.""" - if not MODELS_AVAILABLE: - raise ImportError("Models must be installed to create class stubs") - return FunctionVersionQueryAdapter.validate_python(cls.create_json()) diff --git a/test/types/plug_type_query_stub.py b/test/types/job_type_notify_stub.py similarity index 51% rename from test/types/plug_type_query_stub.py rename to test/types/job_type_notify_stub.py index fe75f05c..c7987f75 100644 --- a/test/types/plug_type_query_stub.py +++ b/test/types/job_type_notify_stub.py @@ -16,42 +16,39 @@ from ..openapi import MODEL_DEFINITIONS, with_example_provider try: - from waylay.services.registry.models.plug_type_query import PlugTypeQuery + from waylay.services.registry.models.job_type_notify import JobTypeNotify - PlugTypeQueryAdapter = TypeAdapter(PlugTypeQuery) + JobTypeNotifyAdapter = TypeAdapter(JobTypeNotify) MODELS_AVAILABLE = True except ImportError as exc: MODELS_AVAILABLE = False -plug_type_query_model_schema = json.loads( +job_type_notify_model_schema = json.loads( r"""{ - "type" : "object", - "properties" : { - "type" : { - "$ref" : "#/components/schemas/PlugType" - } - }, - "additionalProperties" : false + "title" : "JobTypeNotify", + "type" : "string", + "description" : "A job to notify that an function version has changed.", + "enum" : [ "notify" ] } """, object_hook=with_example_provider, ) -plug_type_query_model_schema.update({"definitions": MODEL_DEFINITIONS}) +job_type_notify_model_schema.update({"definitions": MODEL_DEFINITIONS}) -plug_type_query_faker = JSF(plug_type_query_model_schema, allow_none_optionals=1) +job_type_notify_faker = JSF(job_type_notify_model_schema, allow_none_optionals=1) -class PlugTypeQueryStub: - """PlugTypeQuery unit test stubs.""" +class JobTypeNotifyStub: + """JobTypeNotify unit test stubs.""" @classmethod def create_json(cls): """Create a dict stub instance.""" - return plug_type_query_faker.generate() + return job_type_notify_faker.generate() @classmethod - def create_instance(cls) -> "PlugTypeQuery": - """Create PlugTypeQuery stub instance.""" + def create_instance(cls) -> "JobTypeNotify": + """Create JobTypeNotify stub instance.""" if not MODELS_AVAILABLE: raise ImportError("Models must be installed to create class stubs") - return PlugTypeQueryAdapter.validate_python(cls.create_json()) + return JobTypeNotifyAdapter.validate_python(cls.create_json()) diff --git a/test/types/job_type_schema_stub.py b/test/types/job_type_schema_stub.py index d3758213..cb596935 100644 --- a/test/types/job_type_schema_stub.py +++ b/test/types/job_type_schema_stub.py @@ -38,6 +38,8 @@ "$ref" : "#/components/schemas/JobTypeScale" }, { "$ref" : "#/components/schemas/JobTypeBatch" + }, { + "$ref" : "#/components/schemas/JobTypeNotify" } ] } """, diff --git a/test/types/job_type_stub.py b/test/types/job_type_stub.py index 12d5dfc3..8c2393b1 100644 --- a/test/types/job_type_stub.py +++ b/test/types/job_type_stub.py @@ -27,7 +27,7 @@ r"""{ "title" : "JobType", "type" : "string", - "enum" : [ "build", "deploy", "verify", "undeploy", "batch", "scale", "cleanup", "other" ] + "enum" : [ "build", "deploy", "verify", "undeploy", "batch", "scale", "cleanup", "notify" ] } """, object_hook=with_example_provider, diff --git a/test/types/latest_function_versions_query_show_related_stub.py b/test/types/latest_function_versions_query_show_related_stub.py new file mode 100644 index 00000000..e01c3dc3 --- /dev/null +++ b/test/types/latest_function_versions_query_show_related_stub.py @@ -0,0 +1,63 @@ +# coding: utf-8 +"""Waylay Function Registry model tests. + +This code was generated from the OpenAPI documentation of 'Waylay Function Registry' + +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +import json + +from jsf import JSF +from pydantic import TypeAdapter + +from ..openapi import MODEL_DEFINITIONS, with_example_provider + +try: + from waylay.services.registry.models.latest_function_versions_query_show_related import ( + LatestFunctionVersionsQueryShowRelated, + ) + + LatestFunctionVersionsQueryShowRelatedAdapter = TypeAdapter( + LatestFunctionVersionsQueryShowRelated + ) + MODELS_AVAILABLE = True +except ImportError as exc: + MODELS_AVAILABLE = False + +latest_function_versions_query_show_related_model_schema = json.loads( + r"""{ + "title" : "LatestFunctionVersionsQuery_showRelated", + "type" : "string", + "enum" : [ "none" ] +} +""", + object_hook=with_example_provider, +) +latest_function_versions_query_show_related_model_schema.update({ + "definitions": MODEL_DEFINITIONS +}) + +latest_function_versions_query_show_related_faker = JSF( + latest_function_versions_query_show_related_model_schema, allow_none_optionals=1 +) + + +class LatestFunctionVersionsQueryShowRelatedStub: + """LatestFunctionVersionsQueryShowRelated unit test stubs.""" + + @classmethod + def create_json(cls): + """Create a dict stub instance.""" + return latest_function_versions_query_show_related_faker.generate() + + @classmethod + def create_instance(cls) -> "LatestFunctionVersionsQueryShowRelated": + """Create LatestFunctionVersionsQueryShowRelated stub instance.""" + if not MODELS_AVAILABLE: + raise ImportError("Models must be installed to create class stubs") + return LatestFunctionVersionsQueryShowRelatedAdapter.validate_python( + cls.create_json() + ) diff --git a/test/types/latest_function_versions_query_stub.py b/test/types/latest_function_versions_query_stub.py index b1d6f4a0..85184eb2 100644 --- a/test/types/latest_function_versions_query_stub.py +++ b/test/types/latest_function_versions_query_stub.py @@ -119,6 +119,9 @@ "latest" : { "type" : "boolean", "description" : "When `true`, only the latest version per function name is returned. If set to `false`, multiple versions per named function can be returned. Defaults to `true`, except when specific versions are selected with the `nameVersion` filter." + }, + "showRelated" : { + "$ref" : "#/components/schemas/LatestFunctionVersionsQuery_showRelated" } }, "additionalProperties" : false, diff --git a/test/types/latest_functions_query_stub.py b/test/types/latest_functions_query_stub.py index fad3f52e..a37814a1 100644 --- a/test/types/latest_functions_query_stub.py +++ b/test/types/latest_functions_query_stub.py @@ -29,6 +29,9 @@ r"""{ "type" : "object", "properties" : { + "showRelated" : { + "$ref" : "#/components/schemas/ShowRelatedType" + }, "limit" : { "minimum" : 0, "type" : "number", diff --git a/test/types/latest_models_response_v2_stub.py b/test/types/latest_models_response_v2_stub.py index ccf9a8cb..8d06d8a8 100644 --- a/test/types/latest_models_response_v2_stub.py +++ b/test/types/latest_models_response_v2_stub.py @@ -46,7 +46,7 @@ "type" : "array", "description" : "The specification and deployment status of the queried functions", "items" : { - "$ref" : "#/components/schemas/LatestModelsResponseV2_entities_inner" + "$ref" : "#/components/schemas/EntityWithLinks_IKfservingResponseV2_" } } }, diff --git a/test/types/latest_plug_versions_query_stub.py b/test/types/latest_plug_versions_query_stub.py index 19279d6e..2eb73ee2 100644 --- a/test/types/latest_plug_versions_query_stub.py +++ b/test/types/latest_plug_versions_query_stub.py @@ -125,6 +125,9 @@ "latest" : { "type" : "boolean", "description" : "When `true`, only the latest version per function name is returned. If set to `false`, multiple versions per named function can be returned. Defaults to `true`, except when specific versions are selected with the `nameVersion` filter." + }, + "showRelated" : { + "$ref" : "#/components/schemas/LatestFunctionVersionsQuery_showRelated" } }, "additionalProperties" : false, diff --git a/test/types/latest_plugs_query_stub.py b/test/types/latest_plugs_query_stub.py index fe1ce749..f0640d13 100644 --- a/test/types/latest_plugs_query_stub.py +++ b/test/types/latest_plugs_query_stub.py @@ -30,6 +30,9 @@ "type" : { "$ref" : "#/components/schemas/PlugType" }, + "showRelated" : { + "$ref" : "#/components/schemas/ShowRelatedType" + }, "limit" : { "minimum" : 0, "type" : "number", diff --git a/test/types/latest_plugs_response_v2_stub.py b/test/types/latest_plugs_response_v2_stub.py index 35cee35c..7509022a 100644 --- a/test/types/latest_plugs_response_v2_stub.py +++ b/test/types/latest_plugs_response_v2_stub.py @@ -46,7 +46,7 @@ "type" : "array", "description" : "The specification and deployment status of the queried functions", "items" : { - "$ref" : "#/components/schemas/LatestPlugsResponseV2_entities_inner" + "$ref" : "#/components/schemas/EntityWithLinks_IPlugResponseV2_" } } }, diff --git a/test/types/latest_webscripts_response_v2_stub.py b/test/types/latest_webscripts_response_v2_stub.py index a7d425aa..1935900c 100644 --- a/test/types/latest_webscripts_response_v2_stub.py +++ b/test/types/latest_webscripts_response_v2_stub.py @@ -46,7 +46,7 @@ "type" : "array", "description" : "The specification and deployment status of the queried functions", "items" : { - "$ref" : "#/components/schemas/LatestWebscriptsResponseV2_entities_inner" + "$ref" : "#/components/schemas/EntityWithLinks_IWebscriptResponseWithInvokeLinkV2_" } } }, diff --git a/test/types/limit_query_stub.py b/test/types/limit_query_stub.py deleted file mode 100644 index 8724da99..00000000 --- a/test/types/limit_query_stub.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding: utf-8 -"""Waylay Function Registry model tests. - -This code was generated from the OpenAPI documentation of 'Waylay Function Registry' - -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. -""" - -import json - -from jsf import JSF -from pydantic import TypeAdapter - -from ..openapi import MODEL_DEFINITIONS, with_example_provider - -try: - from waylay.services.registry.models.limit_query import LimitQuery - - LimitQueryAdapter = TypeAdapter(LimitQuery) - MODELS_AVAILABLE = True -except ImportError as exc: - MODELS_AVAILABLE = False - -limit_query_model_schema = json.loads( - r"""{ - "type" : "object", - "properties" : { - "limit" : { - "minimum" : 0, - "type" : "number", - "description" : "The maximum number of items to be return from this query. Has a deployment-defined default and maximum value." - } - }, - "additionalProperties" : false -} -""", - object_hook=with_example_provider, -) -limit_query_model_schema.update({"definitions": MODEL_DEFINITIONS}) - -limit_query_faker = JSF(limit_query_model_schema, allow_none_optionals=1) - - -class LimitQueryStub: - """LimitQuery unit test stubs.""" - - @classmethod - def create_json(cls): - """Create a dict stub instance.""" - return limit_query_faker.generate() - - @classmethod - def create_instance(cls) -> "LimitQuery": - """Create LimitQuery stub instance.""" - if not MODELS_AVAILABLE: - raise ImportError("Models must be installed to create class stubs") - return LimitQueryAdapter.validate_python(cls.create_json()) diff --git a/test/types/multipart_file_upload_stub.py b/test/types/multipart_file_upload_stub.py deleted file mode 100644 index 70d308b6..00000000 --- a/test/types/multipart_file_upload_stub.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding: utf-8 -"""Waylay Function Registry model tests. - -This code was generated from the OpenAPI documentation of 'Waylay Function Registry' - -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. -""" - -import json - -from jsf import JSF -from pydantic import TypeAdapter - -from ..openapi import MODEL_DEFINITIONS, with_example_provider - -try: - from waylay.services.registry.models.multipart_file_upload import ( - MultipartFileUpload, - ) - - MultipartFileUploadAdapter = TypeAdapter(MultipartFileUpload) - MODELS_AVAILABLE = True -except ImportError as exc: - MODELS_AVAILABLE = False - -multipart_file_upload__model_schema = json.loads( - r"""{ - "title" : "Multipart file upload.", - "type" : "object", - "properties" : { - "filename" : { - "type" : "array", - "items" : { - "type" : "string", - "format" : "binary" - } - } - }, - "description" : "A multi-part upload containing one or more file assets.", - "nullable" : true -} -""", - object_hook=with_example_provider, -) -multipart_file_upload__model_schema.update({"definitions": MODEL_DEFINITIONS}) - -multipart_file_upload__faker = JSF( - multipart_file_upload__model_schema, allow_none_optionals=1 -) - - -class MultipartFileUploadStub: - """MultipartFileUpload unit test stubs.""" - - @classmethod - def create_json(cls): - """Create a dict stub instance.""" - return multipart_file_upload__faker.generate() - - @classmethod - def create_instance(cls) -> "MultipartFileUpload": - """Create MultipartFileUpload stub instance.""" - if not MODELS_AVAILABLE: - raise ImportError("Models must be installed to create class stubs") - return MultipartFileUploadAdapter.validate_python(cls.create_json()) diff --git a/test/types/named_function_versions_query_stub.py b/test/types/named_function_versions_query_stub.py deleted file mode 100644 index c06773ac..00000000 --- a/test/types/named_function_versions_query_stub.py +++ /dev/null @@ -1,127 +0,0 @@ -# coding: utf-8 -"""Waylay Function Registry model tests. - -This code was generated from the OpenAPI documentation of 'Waylay Function Registry' - -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. -""" - -import json - -from jsf import JSF -from pydantic import TypeAdapter - -from ..openapi import MODEL_DEFINITIONS, with_example_provider - -try: - from waylay.services.registry.models.named_function_versions_query import ( - NamedFunctionVersionsQuery, - ) - - NamedFunctionVersionsQueryAdapter = TypeAdapter(NamedFunctionVersionsQuery) - MODELS_AVAILABLE = True -except ImportError as exc: - MODELS_AVAILABLE = False - -named_function_versions_query_model_schema = json.loads( - r"""{ - "type" : "object", - "properties" : { - "limit" : { - "minimum" : 0, - "type" : "number", - "description" : "The maximum number of items to be return from this query. Has a deployment-defined default and maximum value." - }, - "page" : { - "minimum" : 0, - "type" : "number", - "description" : "The number of pages to skip when returning result to this query." - }, - "deprecated" : { - "type" : "boolean", - "description" : "Filter on the deprecation status of the function." - }, - "draft" : { - "type" : "boolean", - "description" : "Filter on the draft status of the function." - }, - "version" : { - "type" : "string", - "description" : "Filter on the version of the function (case-sensitive, supports wildcards)." - }, - "status" : { - "type" : "array", - "description" : "Filter on the status of the plug. Filter values with a `-` postfix exclude the status. Use the `any` filter value to include all states. When not specified, a default `undeployed-` filter excludes _undeployed_ functions.", - "items" : { - "$ref" : "#/components/schemas/StatusFilter" - } - }, - "runtimeVersion" : { - "$ref" : "#/components/schemas/SemanticVersionRange" - }, - "createdBy" : { - "type" : "string", - "description" : "Filter on the user that create the plug. You can use the `@me` token to indicate your own plugs.", - "example" : "@me" - }, - "updatedBy" : { - "type" : "string", - "description" : "Filter on the user that last updated the plug. You can use the `@me` token to indicate your own plugs.", - "example" : "@me" - }, - "createdBefore" : { - "$ref" : "#/components/schemas/TimestampSpec" - }, - "createdAfter" : { - "$ref" : "#/components/schemas/TimestampSpec" - }, - "updatedBefore" : { - "$ref" : "#/components/schemas/TimestampSpec" - }, - "updatedAfter" : { - "$ref" : "#/components/schemas/TimestampSpec" - }, - "archiveFormat" : { - "type" : "array", - "description" : "Filter on the archive format of the function.", - "items" : { - "$ref" : "#/components/schemas/ArchiveFormat" - } - }, - "runtime" : { - "type" : "array", - "description" : "Filter on the runtime of the function.", - "items" : { - "$ref" : "#/components/schemas/Runtime" - } - } - }, - "additionalProperties" : false, - "description" : "Named function versions listing query." -} -""", - object_hook=with_example_provider, -) -named_function_versions_query_model_schema.update({"definitions": MODEL_DEFINITIONS}) - -named_function_versions_query_faker = JSF( - named_function_versions_query_model_schema, allow_none_optionals=1 -) - - -class NamedFunctionVersionsQueryStub: - """NamedFunctionVersionsQuery unit test stubs.""" - - @classmethod - def create_json(cls): - """Create a dict stub instance.""" - return named_function_versions_query_faker.generate() - - @classmethod - def create_instance(cls) -> "NamedFunctionVersionsQuery": - """Create NamedFunctionVersionsQuery stub instance.""" - if not MODELS_AVAILABLE: - raise ImportError("Models must be installed to create class stubs") - return NamedFunctionVersionsQueryAdapter.validate_python(cls.create_json()) diff --git a/test/types/named_versions_filter_stub.py b/test/types/named_versions_filter_stub.py deleted file mode 100644 index 06e382ab..00000000 --- a/test/types/named_versions_filter_stub.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding: utf-8 -"""Waylay Function Registry model tests. - -This code was generated from the OpenAPI documentation of 'Waylay Function Registry' - -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. -""" - -import json - -from jsf import JSF -from pydantic import TypeAdapter - -from ..openapi import MODEL_DEFINITIONS, with_example_provider - -try: - from waylay.services.registry.models.named_versions_filter import ( - NamedVersionsFilter, - ) - - NamedVersionsFilterAdapter = TypeAdapter(NamedVersionsFilter) - MODELS_AVAILABLE = True -except ImportError as exc: - MODELS_AVAILABLE = False - -named_versions_filter_model_schema = json.loads( - r"""{ - "type" : "object", - "properties" : { - "nameVersion" : { - "type" : "array", - "description" : "Filter on exact `{name}@{version}` functions. Using this filter implies a `latest=false` default, returning multiple versions of the same named versions if they are filtered.", - "items" : { - "$ref" : "#/components/schemas/NamedVersion" - } - } - }, - "additionalProperties" : false -} -""", - object_hook=with_example_provider, -) -named_versions_filter_model_schema.update({"definitions": MODEL_DEFINITIONS}) - -named_versions_filter_faker = JSF( - named_versions_filter_model_schema, allow_none_optionals=1 -) - - -class NamedVersionsFilterStub: - """NamedVersionsFilter unit test stubs.""" - - @classmethod - def create_json(cls): - """Create a dict stub instance.""" - return named_versions_filter_faker.generate() - - @classmethod - def create_instance(cls) -> "NamedVersionsFilter": - """Create NamedVersionsFilter stub instance.""" - if not MODELS_AVAILABLE: - raise ImportError("Models must be installed to create class stubs") - return NamedVersionsFilterAdapter.validate_python(cls.create_json()) diff --git a/test/types/dry_run_query_stub.py b/test/types/notify_result_stub.py similarity index 51% rename from test/types/dry_run_query_stub.py rename to test/types/notify_result_stub.py index 35145633..cf96d3c3 100644 --- a/test/types/dry_run_query_stub.py +++ b/test/types/notify_result_stub.py @@ -16,43 +16,44 @@ from ..openapi import MODEL_DEFINITIONS, with_example_provider try: - from waylay.services.registry.models.dry_run_query import DryRunQuery + from waylay.services.registry.models.notify_result import NotifyResult - DryRunQueryAdapter = TypeAdapter(DryRunQuery) + NotifyResultAdapter = TypeAdapter(NotifyResult) MODELS_AVAILABLE = True except ImportError as exc: MODELS_AVAILABLE = False -dry_run_query_model_schema = json.loads( +notify_result_model_schema = json.loads( r"""{ + "title" : "NotifyResult", + "required" : [ "operation" ], "type" : "object", "properties" : { - "dryRun" : { - "type" : "boolean", - "description" : "If set to true, validates the deployment conditions, but does not change anything." + "operation" : { + "$ref" : "#/components/schemas/RequestOperation" } }, - "additionalProperties" : false + "description" : "The result data for a change notification." } """, object_hook=with_example_provider, ) -dry_run_query_model_schema.update({"definitions": MODEL_DEFINITIONS}) +notify_result_model_schema.update({"definitions": MODEL_DEFINITIONS}) -dry_run_query_faker = JSF(dry_run_query_model_schema, allow_none_optionals=1) +notify_result_faker = JSF(notify_result_model_schema, allow_none_optionals=1) -class DryRunQueryStub: - """DryRunQuery unit test stubs.""" +class NotifyResultStub: + """NotifyResult unit test stubs.""" @classmethod def create_json(cls): """Create a dict stub instance.""" - return dry_run_query_faker.generate() + return notify_result_faker.generate() @classmethod - def create_instance(cls) -> "DryRunQuery": - """Create DryRunQuery stub instance.""" + def create_instance(cls) -> "NotifyResult": + """Create NotifyResult stub instance.""" if not MODELS_AVAILABLE: raise ImportError("Models must be installed to create class stubs") - return DryRunQueryAdapter.validate_python(cls.create_json()) + return NotifyResultAdapter.validate_python(cls.create_json()) diff --git a/test/types/paging_query_stub.py b/test/types/paging_query_stub.py deleted file mode 100644 index 1612807e..00000000 --- a/test/types/paging_query_stub.py +++ /dev/null @@ -1,64 +0,0 @@ -# coding: utf-8 -"""Waylay Function Registry model tests. - -This code was generated from the OpenAPI documentation of 'Waylay Function Registry' - -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. -""" - -import json - -from jsf import JSF -from pydantic import TypeAdapter - -from ..openapi import MODEL_DEFINITIONS, with_example_provider - -try: - from waylay.services.registry.models.paging_query import PagingQuery - - PagingQueryAdapter = TypeAdapter(PagingQuery) - MODELS_AVAILABLE = True -except ImportError as exc: - MODELS_AVAILABLE = False - -paging_query_model_schema = json.loads( - r"""{ - "type" : "object", - "properties" : { - "limit" : { - "minimum" : 0, - "type" : "number", - "description" : "The maximum number of items to be return from this query. Has a deployment-defined default and maximum value." - }, - "page" : { - "minimum" : 0, - "type" : "number", - "description" : "The number of pages to skip when returning result to this query." - } - }, - "additionalProperties" : false -} -""", - object_hook=with_example_provider, -) -paging_query_model_schema.update({"definitions": MODEL_DEFINITIONS}) - -paging_query_faker = JSF(paging_query_model_schema, allow_none_optionals=1) - - -class PagingQueryStub: - """PagingQuery unit test stubs.""" - - @classmethod - def create_json(cls): - """Create a dict stub instance.""" - return paging_query_faker.generate() - - @classmethod - def create_instance(cls) -> "PagingQuery": - """Create PagingQuery stub instance.""" - if not MODELS_AVAILABLE: - raise ImportError("Models must be installed to create class stubs") - return PagingQueryAdapter.validate_python(cls.create_json()) diff --git a/test/types/plug_delete_query_stub.py b/test/types/plug_delete_query_stub.py deleted file mode 100644 index 1d7cf77d..00000000 --- a/test/types/plug_delete_query_stub.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding: utf-8 -"""Waylay Function Registry model tests. - -This code was generated from the OpenAPI documentation of 'Waylay Function Registry' - -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. -""" - -import json - -from jsf import JSF -from pydantic import TypeAdapter - -from ..openapi import MODEL_DEFINITIONS, with_example_provider - -try: - from waylay.services.registry.models.plug_delete_query import PlugDeleteQuery - - PlugDeleteQueryAdapter = TypeAdapter(PlugDeleteQuery) - MODELS_AVAILABLE = True -except ImportError as exc: - MODELS_AVAILABLE = False - -plug_delete_query_model_schema = json.loads( - r"""{ - "type" : "object", - "properties" : { - "force" : { - "type" : "boolean", - "description" : "If true, the plug version(s) will be undeployed and removed. Otherwise, the plug version(s) will only be deprecated, i.e removed from regular listings." - }, - "undeploy" : { - "type" : "boolean", - "description" : "If `true`, the `DELETE` operation\n* undeploys the (openfaas) function for the plug: it becomes no longer available for invocation.\n* does NOT remove the plug from registry: it stays in an `undeployed` status. All assets and definitions are retained, so the plug can be restored later with a _rebuild_ action.\n\nIf `false`, the `DELETE` operation\n* _only_ marks the plug version(s) as _deprecated_: the plug remains active but is removed from the default listings. This also applies to _draft_ versions.\n\nThis parameter is incompatible with `force=true`.\n\nIf not set the default behaviour applies:\n* _draft_ versions are _undeployed_ and _removed_ from registry.\n* non-_draft_ versions are marked _deprecated_ only." - } - }, - "additionalProperties" : false -} -""", - object_hook=with_example_provider, -) -plug_delete_query_model_schema.update({"definitions": MODEL_DEFINITIONS}) - -plug_delete_query_faker = JSF(plug_delete_query_model_schema, allow_none_optionals=1) - - -class PlugDeleteQueryStub: - """PlugDeleteQuery unit test stubs.""" - - @classmethod - def create_json(cls): - """Create a dict stub instance.""" - return plug_delete_query_faker.generate() - - @classmethod - def create_instance(cls) -> "PlugDeleteQuery": - """Create PlugDeleteQuery stub instance.""" - if not MODELS_AVAILABLE: - raise ImportError("Models must be installed to create class stubs") - return PlugDeleteQueryAdapter.validate_python(cls.create_json()) diff --git a/test/types/publish_function_query_stub.py b/test/types/publish_function_query_stub.py index f2a5fbbd..7bd254f0 100644 --- a/test/types/publish_function_query_stub.py +++ b/test/types/publish_function_query_stub.py @@ -29,10 +29,19 @@ r"""{ "type" : "object", "properties" : { + "chown" : { + "type" : "boolean", + "description" : "If set, ownership of the draft function is transferred to the current user.", + "default" : false + }, "comment" : { "type" : "string", "description" : "An optional user-specified comment corresponding to the operation." }, + "author" : { + "type" : "string", + "description" : "Optionally changes the author metadata when updating a function." + }, "deprecatePrevious" : { "$ref" : "#/components/schemas/DeprecatePreviousPolicy" }, diff --git a/test/types/rebuild_query_params_stub.py b/test/types/rebuild_query_params_stub.py deleted file mode 100644 index 8964b9fa..00000000 --- a/test/types/rebuild_query_params_stub.py +++ /dev/null @@ -1,78 +0,0 @@ -# coding: utf-8 -"""Waylay Function Registry model tests. - -This code was generated from the OpenAPI documentation of 'Waylay Function Registry' - -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. -""" - -import json - -from jsf import JSF -from pydantic import TypeAdapter - -from ..openapi import MODEL_DEFINITIONS, with_example_provider - -try: - from waylay.services.registry.models.rebuild_query_params import RebuildQueryParams - - RebuildQueryParamsAdapter = TypeAdapter(RebuildQueryParams) - MODELS_AVAILABLE = True -except ImportError as exc: - MODELS_AVAILABLE = False - -rebuild_query_params_model_schema = json.loads( - r"""{ - "type" : "object", - "properties" : { - "upgrade" : { - "$ref" : "#/components/schemas/RebuildPolicy" - }, - "dryRun" : { - "type" : "boolean", - "description" : "If set to true, checks whether rebuild jobs are needed, but do not start any jobs." - }, - "forceVersion" : { - "$ref" : "#/components/schemas/SemanticVersion" - }, - "ignoreChecks" : { - "type" : "boolean", - "description" : "If set to true, checks that normally prevent a rebuild are overriden. These checks include:\n* function state in `pending`, `running`, `failed` or `undeployed`\n* backoff period due to recent failures\n* usage of deprecated dependencies\n* running jobs on entity\n* the `dryRun` option" - }, - "scaleToZero" : { - "type" : "boolean", - "description" : "Indicates whether the function needs to be scaled down after successful (re-)deployment. If not set, the function is scaled to zero only if it was not active before this command." - }, - "skipRebuild" : { - "type" : "boolean", - "description" : "If set, the function will not be rebuild. Always uses the current runtime version when re-deploying/re-verifying the function." - } - }, - "additionalProperties" : false -} -""", - object_hook=with_example_provider, -) -rebuild_query_params_model_schema.update({"definitions": MODEL_DEFINITIONS}) - -rebuild_query_params_faker = JSF( - rebuild_query_params_model_schema, allow_none_optionals=1 -) - - -class RebuildQueryParamsStub: - """RebuildQueryParams unit test stubs.""" - - @classmethod - def create_json(cls): - """Create a dict stub instance.""" - return rebuild_query_params_faker.generate() - - @classmethod - def create_instance(cls) -> "RebuildQueryParams": - """Create RebuildQueryParams stub instance.""" - if not MODELS_AVAILABLE: - raise ImportError("Models must be installed to create class stubs") - return RebuildQueryParamsAdapter.validate_python(cls.create_json()) diff --git a/test/types/rebuild_query_v2_stub.py b/test/types/rebuild_query_v2_stub.py index 6bc1b0cc..3e805ff2 100644 --- a/test/types/rebuild_query_v2_stub.py +++ b/test/types/rebuild_query_v2_stub.py @@ -27,6 +27,10 @@ r"""{ "type" : "object", "properties" : { + "scaleToZero" : { + "type" : "boolean", + "description" : "Indicates whether the function needs to be scaled down after successful verification. If not set, the function is scaled to zero only if it was not active before this command." + }, "comment" : { "type" : "string", "description" : "An optional user-specified comment corresponding to the operation." @@ -50,10 +54,6 @@ "type" : "boolean", "description" : "If set to true, checks that normally prevent a rebuild are overriden. These checks include:\n* function state in `pending`, `running`, `failed` or `undeployed`\n* backoff period due to recent failures\n* usage of deprecated dependencies\n* running jobs on entity\n* the `dryRun` option" }, - "scaleToZero" : { - "type" : "boolean", - "description" : "Indicates whether the function needs to be scaled down after successful (re-)deployment. If not set, the function is scaled to zero only if it was not active before this command." - }, "skipRebuild" : { "type" : "boolean", "description" : "If set, the function will not be rebuild. Always uses the current runtime version when re-deploying/re-verifying the function." diff --git a/test/types/registry_error_response_stub.py b/test/types/registry_error_response_stub.py new file mode 100644 index 00000000..d051399b --- /dev/null +++ b/test/types/registry_error_response_stub.py @@ -0,0 +1,73 @@ +# coding: utf-8 +"""Waylay Function Registry model tests. + +This code was generated from the OpenAPI documentation of 'Waylay Function Registry' + +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +import json + +from jsf import JSF +from pydantic import TypeAdapter + +from ..openapi import MODEL_DEFINITIONS, with_example_provider + +try: + from waylay.services.registry.models.registry_error_response import ( + RegistryErrorResponse, + ) + + RegistryErrorResponseAdapter = TypeAdapter(RegistryErrorResponse) + MODELS_AVAILABLE = True +except ImportError as exc: + MODELS_AVAILABLE = False + +registry_error_response_model_schema = json.loads( + r"""{ + "required" : [ "code", "error", "statusCode" ], + "type" : "object", + "properties" : { + "error" : { + "type" : "string" + }, + "code" : { + "type" : "string" + }, + "statusCode" : { + "type" : "number" + }, + "data" : { + "type" : "object", + "additionalProperties" : { + "type" : "string" + } + } + } +} +""", + object_hook=with_example_provider, +) +registry_error_response_model_schema.update({"definitions": MODEL_DEFINITIONS}) + +registry_error_response_faker = JSF( + registry_error_response_model_schema, allow_none_optionals=1 +) + + +class RegistryErrorResponseStub: + """RegistryErrorResponse unit test stubs.""" + + @classmethod + def create_json(cls): + """Create a dict stub instance.""" + return registry_error_response_faker.generate() + + @classmethod + def create_instance(cls) -> "RegistryErrorResponse": + """Create RegistryErrorResponse stub instance.""" + if not MODELS_AVAILABLE: + raise ImportError("Models must be installed to create class stubs") + return RegistryErrorResponseAdapter.validate_python(cls.create_json()) diff --git a/test/types/request_deploy_query_stub.py b/test/types/request_deploy_query_stub.py new file mode 100644 index 00000000..386711e1 --- /dev/null +++ b/test/types/request_deploy_query_stub.py @@ -0,0 +1,61 @@ +# coding: utf-8 +"""Waylay Function Registry model tests. + +This code was generated from the OpenAPI documentation of 'Waylay Function Registry' + +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +import json + +from jsf import JSF +from pydantic import TypeAdapter + +from ..openapi import MODEL_DEFINITIONS, with_example_provider + +try: + from waylay.services.registry.models.request_deploy_query import RequestDeployQuery + + RequestDeployQueryAdapter = TypeAdapter(RequestDeployQuery) + MODELS_AVAILABLE = True +except ImportError as exc: + MODELS_AVAILABLE = False + +request_deploy_query_model_schema = json.loads( + r"""{ + "type" : "object", + "properties" : { + "deploy" : { + "type" : "boolean", + "description" : "Indicates that a function should be _deployed_ when its assets are valid.\n\n* If `true` (default), jobs to build and deploy the function will be initiated after it is checked that the assets are valid. Invalid assets lead to a validation error, and the function and its assets are not created or updated.\n* If `false`, the uploaded assets are stored and the function is created/updated in `registered` state. Asset validation errors are only returned as warning, and stored as `failureReason` on the function entity. Use an _asset update_ or _rebuild_ to initiate a build and deploy at a later stage.", + "default" : true + } + }, + "additionalProperties" : false +} +""", + object_hook=with_example_provider, +) +request_deploy_query_model_schema.update({"definitions": MODEL_DEFINITIONS}) + +request_deploy_query_faker = JSF( + request_deploy_query_model_schema, allow_none_optionals=1 +) + + +class RequestDeployQueryStub: + """RequestDeployQuery unit test stubs.""" + + @classmethod + def create_json(cls): + """Create a dict stub instance.""" + return request_deploy_query_faker.generate() + + @classmethod + def create_instance(cls) -> "RequestDeployQuery": + """Create RequestDeployQuery stub instance.""" + if not MODELS_AVAILABLE: + raise ImportError("Models must be installed to create class stubs") + return RequestDeployQueryAdapter.validate_python(cls.create_json()) diff --git a/test/types/scale_args_stub.py b/test/types/scale_args_stub.py index c14c409b..ab4c6ea6 100644 --- a/test/types/scale_args_stub.py +++ b/test/types/scale_args_stub.py @@ -26,7 +26,7 @@ scale_args_model_schema = json.loads( r"""{ "title" : "ScaleArgs", - "required" : [ "endpoint", "namespace", "replicas", "runtimeName", "runtimeVersion" ], + "required" : [ "endpoint", "namespace", "replicas", "revision", "runtimeName", "runtimeVersion" ], "type" : "object", "properties" : { "namespace" : { diff --git a/test/types/tags_query_stub.py b/test/types/show_related_type_stub.py similarity index 51% rename from test/types/tags_query_stub.py rename to test/types/show_related_type_stub.py index 729f4526..898bee7a 100644 --- a/test/types/tags_query_stub.py +++ b/test/types/show_related_type_stub.py @@ -16,42 +16,37 @@ from ..openapi import MODEL_DEFINITIONS, with_example_provider try: - from waylay.services.registry.models.tags_query import TagsQuery + from waylay.services.registry.models.show_related_type import ShowRelatedType - TagsQueryAdapter = TypeAdapter(TagsQuery) + ShowRelatedTypeAdapter = TypeAdapter(ShowRelatedType) MODELS_AVAILABLE = True except ImportError as exc: MODELS_AVAILABLE = False -tags_query_model_schema = json.loads( +show_related_type_model_schema = json.loads( r"""{ - "type" : "object", - "properties" : { - "tags" : { - "$ref" : "#/components/schemas/TagsFilter" - } - }, - "additionalProperties" : false + "type" : "string", + "enum" : [ "embed", "link", "none" ] } """, object_hook=with_example_provider, ) -tags_query_model_schema.update({"definitions": MODEL_DEFINITIONS}) +show_related_type_model_schema.update({"definitions": MODEL_DEFINITIONS}) -tags_query_faker = JSF(tags_query_model_schema, allow_none_optionals=1) +show_related_type_faker = JSF(show_related_type_model_schema, allow_none_optionals=1) -class TagsQueryStub: - """TagsQuery unit test stubs.""" +class ShowRelatedTypeStub: + """ShowRelatedType unit test stubs.""" @classmethod def create_json(cls): """Create a dict stub instance.""" - return tags_query_faker.generate() + return show_related_type_faker.generate() @classmethod - def create_instance(cls) -> "TagsQuery": - """Create TagsQuery stub instance.""" + def create_instance(cls) -> "ShowRelatedType": + """Create ShowRelatedType stub instance.""" if not MODELS_AVAILABLE: raise ImportError("Models must be installed to create class stubs") - return TagsQueryAdapter.validate_python(cls.create_json()) + return ShowRelatedTypeAdapter.validate_python(cls.create_json()) diff --git a/test/types/status_exclude_stub.py b/test/types/status_exclude_stub.py new file mode 100644 index 00000000..2b742873 --- /dev/null +++ b/test/types/status_exclude_stub.py @@ -0,0 +1,55 @@ +# coding: utf-8 +"""Waylay Function Registry model tests. + +This code was generated from the OpenAPI documentation of 'Waylay Function Registry' + +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +import json + +from jsf import JSF +from pydantic import TypeAdapter + +from ..openapi import MODEL_DEFINITIONS, with_example_provider + +try: + from waylay.services.registry.models.status_exclude import StatusExclude + + StatusExcludeAdapter = TypeAdapter(StatusExclude) + MODELS_AVAILABLE = True +except ImportError as exc: + MODELS_AVAILABLE = False + +status_exclude_model_schema = json.loads( + r"""{ + "pattern" : "^(registered|pending|deployed|unhealthy|failed|running|undeploying|undeployed)-$", + "type" : "string", + "description" : "Any status value with a `-` postfix appended, excludes that status as a filter.", + "example" : "running-", + "enum" : [ "registered-", "running-", "pending-", "deployed-", "unhealthy-", "failed-", "undeploying-", "undeployed-" ] +} +""", + object_hook=with_example_provider, +) +status_exclude_model_schema.update({"definitions": MODEL_DEFINITIONS}) + +status_exclude_faker = JSF(status_exclude_model_schema, allow_none_optionals=1) + + +class StatusExcludeStub: + """StatusExclude unit test stubs.""" + + @classmethod + def create_json(cls): + """Create a dict stub instance.""" + return status_exclude_faker.generate() + + @classmethod + def create_instance(cls) -> "StatusExclude": + """Create StatusExclude stub instance.""" + if not MODELS_AVAILABLE: + raise ImportError("Models must be installed to create class stubs") + return StatusExcludeAdapter.validate_python(cls.create_json()) diff --git a/test/types/undeploy_args_stub.py b/test/types/undeploy_args_stub.py index a5dc68dd..71eacd36 100644 --- a/test/types/undeploy_args_stub.py +++ b/test/types/undeploy_args_stub.py @@ -26,7 +26,7 @@ undeploy_args_model_schema = json.loads( r"""{ "title" : "UndeployArgs", - "required" : [ "deleteEntity", "endpoint", "isNativePlug", "namespace", "runtimeName", "runtimeVersion" ], + "required" : [ "deleteEntity", "endpoint", "isNativePlug", "namespace", "revision", "runtimeName", "runtimeVersion" ], "type" : "object", "properties" : { "namespace" : { diff --git a/test/types/update_comment_stub.py b/test/types/update_comment_stub.py deleted file mode 100644 index 8cb2d139..00000000 --- a/test/types/update_comment_stub.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding: utf-8 -"""Waylay Function Registry model tests. - -This code was generated from the OpenAPI documentation of 'Waylay Function Registry' - -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. -""" - -import json - -from jsf import JSF -from pydantic import TypeAdapter - -from ..openapi import MODEL_DEFINITIONS, with_example_provider - -try: - from waylay.services.registry.models.update_comment import UpdateComment - - UpdateCommentAdapter = TypeAdapter(UpdateComment) - MODELS_AVAILABLE = True -except ImportError as exc: - MODELS_AVAILABLE = False - -update_comment_model_schema = json.loads( - r"""{ - "type" : "object", - "properties" : { - "comment" : { - "type" : "string", - "description" : "An optional user-specified comment corresponding to the operation." - } - } -} -""", - object_hook=with_example_provider, -) -update_comment_model_schema.update({"definitions": MODEL_DEFINITIONS}) - -update_comment_faker = JSF(update_comment_model_schema, allow_none_optionals=1) - - -class UpdateCommentStub: - """UpdateComment unit test stubs.""" - - @classmethod - def create_json(cls): - """Create a dict stub instance.""" - return update_comment_faker.generate() - - @classmethod - def create_instance(cls) -> "UpdateComment": - """Create UpdateComment stub instance.""" - if not MODELS_AVAILABLE: - raise ImportError("Models must be installed to create class stubs") - return UpdateCommentAdapter.validate_python(cls.create_json()) diff --git a/test/types/update_draft_query_stub.py b/test/types/update_draft_query_stub.py index 1414d381..adaaee0c 100644 --- a/test/types/update_draft_query_stub.py +++ b/test/types/update_draft_query_stub.py @@ -25,22 +25,35 @@ update_draft_query_model_schema = json.loads( r"""{ - "required" : [ "chown" ], "type" : "object", "properties" : { - "comment" : { - "type" : "string", - "description" : "An optional user-specified comment corresponding to the operation." + "scaleToZero" : { + "type" : "boolean", + "description" : "If set to true, after successful deployment, the deployed function will be scaled to zero. This saves computing resources when the function is not to be used immediately.", + "default" : false }, - "async" : { + "deploy" : { "type" : "boolean", - "description" : "Unless this is set to false, the server will start the required job actions asynchronously and return a 202 Accepted response. If false the request will block until the job actions are completed, or a timeout occurs.", + "description" : "Indicates that a function should be _deployed_ when its assets are valid.\n\n* If `true` (default), jobs to build and deploy the function will be initiated after it is checked that the assets are valid. Invalid assets lead to a validation error, and the function and its assets are not created or updated.\n* If `false`, the uploaded assets are stored and the function is created/updated in `registered` state. Asset validation errors are only returned as warning, and stored as `failureReason` on the function entity. Use an _asset update_ or _rebuild_ to initiate a build and deploy at a later stage.", "default" : true }, "chown" : { "type" : "boolean", "description" : "If set, ownership of the draft function is transferred to the current user.", "default" : false + }, + "comment" : { + "type" : "string", + "description" : "An optional user-specified comment corresponding to the operation." + }, + "author" : { + "type" : "string", + "description" : "Optionally changes the author metadata when updating a function." + }, + "async" : { + "type" : "boolean", + "description" : "Unless this is set to false, the server will start the required job actions asynchronously and return a 202 Accepted response. If false the request will block until the job actions are completed, or a timeout occurs.", + "default" : true } }, "additionalProperties" : false diff --git a/test/types/verify_args_stub.py b/test/types/verify_args_stub.py index 92492a2a..32f4f5d1 100644 --- a/test/types/verify_args_stub.py +++ b/test/types/verify_args_stub.py @@ -26,7 +26,7 @@ verify_args_model_schema = json.loads( r"""{ "title" : "VerifyArgs", - "required" : [ "endpoint", "namespace", "runtimeName", "runtimeVersion" ], + "required" : [ "endpoint", "namespace", "revision", "runtimeName", "runtimeVersion" ], "type" : "object", "properties" : { "namespace" : { diff --git a/test/types/versions_query_stub.py b/test/types/versions_query_stub.py deleted file mode 100644 index 81547f89..00000000 --- a/test/types/versions_query_stub.py +++ /dev/null @@ -1,146 +0,0 @@ -# coding: utf-8 -"""Waylay Function Registry model tests. - -This code was generated from the OpenAPI documentation of 'Waylay Function Registry' - -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. -""" - -import json - -from jsf import JSF -from pydantic import TypeAdapter - -from ..openapi import MODEL_DEFINITIONS, with_example_provider - -try: - from waylay.services.registry.models.versions_query import VersionsQuery - - VersionsQueryAdapter = TypeAdapter(VersionsQuery) - MODELS_AVAILABLE = True -except ImportError as exc: - MODELS_AVAILABLE = False - -versions_query_model_schema = json.loads( - r"""{ - "type" : "object", - "properties" : { - "limit" : { - "minimum" : 0, - "type" : "number", - "description" : "The maximum number of items to be return from this query. Has a deployment-defined default and maximum value." - }, - "page" : { - "minimum" : 0, - "type" : "number", - "description" : "The number of pages to skip when returning result to this query." - }, - "endpoint" : { - "type" : "string", - "description" : "Filter on the openfaas endpoint. This is case-insensitive and supports wild-cards `?` (any one character) and `*` (any sequence of characters)." - }, - "imageName" : { - "type" : "string", - "description" : "Filter on the container image name. This is case-insensitive and supports wild-cards `?` (any one character) and `*` (any sequence of characters)." - }, - "storageLocation" : { - "type" : "string", - "description" : "Filter on the storageLocation. This is case-insensitive and supports wild-cards `?` (any one character) and `*` (any sequence of characters)." - }, - "deprecated" : { - "type" : "boolean", - "description" : "Filter on the deprecation status of the function." - }, - "draft" : { - "type" : "boolean", - "description" : "Filter on the draft status of the function." - }, - "nameVersion" : { - "type" : "array", - "description" : "Filter on exact `{name}@{version}` functions. Using this filter implies a `latest=false` default, returning multiple versions of the same named versions if they are filtered.", - "items" : { - "$ref" : "#/components/schemas/NamedVersion" - } - }, - "version" : { - "type" : "string", - "description" : "Filter on the version of the function (case-sensitive, supports wildcards)." - }, - "status" : { - "type" : "array", - "description" : "Filter on the status of the plug. Filter values with a `-` postfix exclude the status. Use the `any` filter value to include all states. When not specified, a default `undeployed-` filter excludes _undeployed_ functions.", - "items" : { - "$ref" : "#/components/schemas/StatusFilter" - } - }, - "runtimeVersion" : { - "$ref" : "#/components/schemas/SemanticVersionRange" - }, - "createdBy" : { - "type" : "string", - "description" : "Filter on the user that create the plug. You can use the `@me` token to indicate your own plugs.", - "example" : "@me" - }, - "updatedBy" : { - "type" : "string", - "description" : "Filter on the user that last updated the plug. You can use the `@me` token to indicate your own plugs.", - "example" : "@me" - }, - "createdBefore" : { - "$ref" : "#/components/schemas/TimestampSpec" - }, - "createdAfter" : { - "$ref" : "#/components/schemas/TimestampSpec" - }, - "updatedBefore" : { - "$ref" : "#/components/schemas/TimestampSpec" - }, - "updatedAfter" : { - "$ref" : "#/components/schemas/TimestampSpec" - }, - "name" : { - "type" : "string", - "description" : "Filter on the name of the function. This is case-insensitive and supports wild-cards `?` (any one character) and `*` (any sequence of characters)." - }, - "archiveFormat" : { - "type" : "array", - "description" : "Filter on the archive format of the function.", - "items" : { - "$ref" : "#/components/schemas/ArchiveFormat" - } - }, - "runtime" : { - "type" : "array", - "description" : "Filter on the runtime of the function.", - "items" : { - "$ref" : "#/components/schemas/Runtime" - } - } - }, - "additionalProperties" : false, - "description" : "Function versions paged query" -} -""", - object_hook=with_example_provider, -) -versions_query_model_schema.update({"definitions": MODEL_DEFINITIONS}) - -versions_query_faker = JSF(versions_query_model_schema, allow_none_optionals=1) - - -class VersionsQueryStub: - """VersionsQuery unit test stubs.""" - - @classmethod - def create_json(cls): - """Create a dict stub instance.""" - return versions_query_faker.generate() - - @classmethod - def create_instance(cls) -> "VersionsQuery": - """Create VersionsQuery stub instance.""" - if not MODELS_AVAILABLE: - raise ImportError("Models must be installed to create class stubs") - return VersionsQueryAdapter.validate_python(cls.create_json()) diff --git a/test/types/with_embedded_alt_versions_i_kfserving_response_v2_stub.py b/test/types/with_embedded_alt_versions_i_kfserving_response_v2_stub.py new file mode 100644 index 00000000..9e445227 --- /dev/null +++ b/test/types/with_embedded_alt_versions_i_kfserving_response_v2_stub.py @@ -0,0 +1,67 @@ +# coding: utf-8 +"""Waylay Function Registry model tests. + +This code was generated from the OpenAPI documentation of 'Waylay Function Registry' + +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +import json + +from jsf import JSF +from pydantic import TypeAdapter + +from ..openapi import MODEL_DEFINITIONS, with_example_provider + +try: + from waylay.services.registry.models.with_embedded_alt_versions_i_kfserving_response_v2 import ( + WithEmbeddedAltVersionsIKfservingResponseV2, + ) + + WithEmbeddedAltVersionsIKfservingResponseV2Adapter = TypeAdapter( + WithEmbeddedAltVersionsIKfservingResponseV2 + ) + MODELS_AVAILABLE = True +except ImportError as exc: + MODELS_AVAILABLE = False + +with_embedded_alt_versions_i_kfserving_response_v2__model_schema = json.loads( + r"""{ + "type" : "object", + "properties" : { + "_embedded" : { + "$ref" : "#/components/schemas/AltEmbeddedVersion_IKfservingResponseV2_" + } + } +} +""", + object_hook=with_example_provider, +) +with_embedded_alt_versions_i_kfserving_response_v2__model_schema.update({ + "definitions": MODEL_DEFINITIONS +}) + +with_embedded_alt_versions_i_kfserving_response_v2__faker = JSF( + with_embedded_alt_versions_i_kfserving_response_v2__model_schema, + allow_none_optionals=1, +) + + +class WithEmbeddedAltVersionsIKfservingResponseV2Stub: + """WithEmbeddedAltVersionsIKfservingResponseV2 unit test stubs.""" + + @classmethod + def create_json(cls): + """Create a dict stub instance.""" + return with_embedded_alt_versions_i_kfserving_response_v2__faker.generate() + + @classmethod + def create_instance(cls) -> "WithEmbeddedAltVersionsIKfservingResponseV2": + """Create WithEmbeddedAltVersionsIKfservingResponseV2 stub instance.""" + if not MODELS_AVAILABLE: + raise ImportError("Models must be installed to create class stubs") + return WithEmbeddedAltVersionsIKfservingResponseV2Adapter.validate_python( + cls.create_json() + ) diff --git a/test/types/with_embedded_alt_versions_i_plug_response_v2_stub.py b/test/types/with_embedded_alt_versions_i_plug_response_v2_stub.py new file mode 100644 index 00000000..286754d4 --- /dev/null +++ b/test/types/with_embedded_alt_versions_i_plug_response_v2_stub.py @@ -0,0 +1,66 @@ +# coding: utf-8 +"""Waylay Function Registry model tests. + +This code was generated from the OpenAPI documentation of 'Waylay Function Registry' + +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +import json + +from jsf import JSF +from pydantic import TypeAdapter + +from ..openapi import MODEL_DEFINITIONS, with_example_provider + +try: + from waylay.services.registry.models.with_embedded_alt_versions_i_plug_response_v2 import ( + WithEmbeddedAltVersionsIPlugResponseV2, + ) + + WithEmbeddedAltVersionsIPlugResponseV2Adapter = TypeAdapter( + WithEmbeddedAltVersionsIPlugResponseV2 + ) + MODELS_AVAILABLE = True +except ImportError as exc: + MODELS_AVAILABLE = False + +with_embedded_alt_versions_i_plug_response_v2__model_schema = json.loads( + r"""{ + "type" : "object", + "properties" : { + "_embedded" : { + "$ref" : "#/components/schemas/AltEmbeddedVersion_IPlugResponseV2_" + } + } +} +""", + object_hook=with_example_provider, +) +with_embedded_alt_versions_i_plug_response_v2__model_schema.update({ + "definitions": MODEL_DEFINITIONS +}) + +with_embedded_alt_versions_i_plug_response_v2__faker = JSF( + with_embedded_alt_versions_i_plug_response_v2__model_schema, allow_none_optionals=1 +) + + +class WithEmbeddedAltVersionsIPlugResponseV2Stub: + """WithEmbeddedAltVersionsIPlugResponseV2 unit test stubs.""" + + @classmethod + def create_json(cls): + """Create a dict stub instance.""" + return with_embedded_alt_versions_i_plug_response_v2__faker.generate() + + @classmethod + def create_instance(cls) -> "WithEmbeddedAltVersionsIPlugResponseV2": + """Create WithEmbeddedAltVersionsIPlugResponseV2 stub instance.""" + if not MODELS_AVAILABLE: + raise ImportError("Models must be installed to create class stubs") + return WithEmbeddedAltVersionsIPlugResponseV2Adapter.validate_python( + cls.create_json() + ) diff --git a/test/types/with_embedded_alt_versions_i_webscript_response_with_invoke_link_v2_stub.py b/test/types/with_embedded_alt_versions_i_webscript_response_with_invoke_link_v2_stub.py new file mode 100644 index 00000000..3e7e371a --- /dev/null +++ b/test/types/with_embedded_alt_versions_i_webscript_response_with_invoke_link_v2_stub.py @@ -0,0 +1,71 @@ +# coding: utf-8 +"""Waylay Function Registry model tests. + +This code was generated from the OpenAPI documentation of 'Waylay Function Registry' + +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +import json + +from jsf import JSF +from pydantic import TypeAdapter + +from ..openapi import MODEL_DEFINITIONS, with_example_provider + +try: + from waylay.services.registry.models.with_embedded_alt_versions_i_webscript_response_with_invoke_link_v2 import ( + WithEmbeddedAltVersionsIWebscriptResponseWithInvokeLinkV2, + ) + + WithEmbeddedAltVersionsIWebscriptResponseWithInvokeLinkV2Adapter = TypeAdapter( + WithEmbeddedAltVersionsIWebscriptResponseWithInvokeLinkV2 + ) + MODELS_AVAILABLE = True +except ImportError as exc: + MODELS_AVAILABLE = False + +with_embedded_alt_versions_i_webscript_response_with_invoke_link_v2__model_schema = ( + json.loads( + r"""{ + "type" : "object", + "properties" : { + "_embedded" : { + "$ref" : "#/components/schemas/AltEmbeddedVersion_IWebscriptResponseWithInvokeLinkV2_" + } + } +} +""", + object_hook=with_example_provider, + ) +) +with_embedded_alt_versions_i_webscript_response_with_invoke_link_v2__model_schema.update({ + "definitions": MODEL_DEFINITIONS +}) + +with_embedded_alt_versions_i_webscript_response_with_invoke_link_v2__faker = JSF( + with_embedded_alt_versions_i_webscript_response_with_invoke_link_v2__model_schema, + allow_none_optionals=1, +) + + +class WithEmbeddedAltVersionsIWebscriptResponseWithInvokeLinkV2Stub: + """WithEmbeddedAltVersionsIWebscriptResponseWithInvokeLinkV2 unit test stubs.""" + + @classmethod + def create_json(cls): + """Create a dict stub instance.""" + return with_embedded_alt_versions_i_webscript_response_with_invoke_link_v2__faker.generate() + + @classmethod + def create_instance( + cls, + ) -> "WithEmbeddedAltVersionsIWebscriptResponseWithInvokeLinkV2": + """Create WithEmbeddedAltVersionsIWebscriptResponseWithInvokeLinkV2 stub instance.""" + if not MODELS_AVAILABLE: + raise ImportError("Models must be installed to create class stubs") + return WithEmbeddedAltVersionsIWebscriptResponseWithInvokeLinkV2Adapter.validate_python( + cls.create_json() + ) diff --git a/waylay-sdk-registry-types/.openapi-generator/FILES b/waylay-sdk-registry-types/.openapi-generator/FILES index e80b7b6c..57587af1 100644 --- a/waylay-sdk-registry-types/.openapi-generator/FILES +++ b/waylay-sdk-registry-types/.openapi-generator/FILES @@ -4,6 +4,9 @@ src/waylay/services/registry/models/__init__.py src/waylay/services/registry/models/active_event_data.py src/waylay/services/registry/models/active_event_sse.py src/waylay/services/registry/models/active_event_sse_event.py +src/waylay/services/registry/models/alt_embedded_version_i_kfserving_response_v2.py +src/waylay/services/registry/models/alt_embedded_version_i_plug_response_v2.py +src/waylay/services/registry/models/alt_embedded_version_i_webscript_response_with_invoke_link_v2.py src/waylay/services/registry/models/alt_version_hal_link.py src/waylay/services/registry/models/any_function_response.py src/waylay/services/registry/models/any_job_for_function.py @@ -20,10 +23,8 @@ src/waylay/services/registry/models/asset_summary.py src/waylay/services/registry/models/asset_summary_with_hal_link.py src/waylay/services/registry/models/asset_summary_with_hal_link_links.py src/waylay/services/registry/models/assets_conditions.py -src/waylay/services/registry/models/async_deploy_query.py src/waylay/services/registry/models/async_deploy_query_v1.py src/waylay/services/registry/models/async_query_default_false.py -src/waylay/services/registry/models/async_query_default_true.py src/waylay/services/registry/models/async_verify_query.py src/waylay/services/registry/models/batch.py src/waylay/services/registry/models/batch_args.py @@ -45,9 +46,11 @@ src/waylay/services/registry/models/completed_event_sse_event.py src/waylay/services/registry/models/content_query_v2.py src/waylay/services/registry/models/content_validation_listing.py src/waylay/services/registry/models/create_function_query_v2.py +src/waylay/services/registry/models/create_function_query_v2_copy.py src/waylay/services/registry/models/create_kf_serving_async_response.py src/waylay/services/registry/models/create_plug_async_response.py src/waylay/services/registry/models/create_webscript_async_response.py +src/waylay/services/registry/models/create_webscripts_copy_parameter.py src/waylay/services/registry/models/delayed_event_data.py src/waylay/services/registry/models/delayed_event_sse.py src/waylay/services/registry/models/delayed_event_sse_event.py @@ -55,19 +58,18 @@ src/waylay/services/registry/models/deploy.py src/waylay/services/registry/models/deploy1.py src/waylay/services/registry/models/deploy_args.py src/waylay/services/registry/models/deploy_args_deploy_spec_overrides.py -src/waylay/services/registry/models/deploy_attributes_filter.py src/waylay/services/registry/models/deploy_job_status.py src/waylay/services/registry/models/deploy_result.py src/waylay/services/registry/models/deploy_spec.py src/waylay/services/registry/models/deploy_spec_openfaas_spec.py src/waylay/services/registry/models/deploy_type.py src/waylay/services/registry/models/deprecate_previous_policy.py -src/waylay/services/registry/models/deprecate_previous_query.py -src/waylay/services/registry/models/deprecated_draft_filter.py src/waylay/services/registry/models/documentation.py src/waylay/services/registry/models/documentation_property.py -src/waylay/services/registry/models/dry_run_query.py src/waylay/services/registry/models/entity_response.py +src/waylay/services/registry/models/entity_with_links_i_kfserving_response_v2.py +src/waylay/services/registry/models/entity_with_links_i_plug_response_v2.py +src/waylay/services/registry/models/entity_with_links_i_webscript_response_with_invoke_link_v2.py src/waylay/services/registry/models/error_and_status_response.py src/waylay/services/registry/models/error_response.py src/waylay/services/registry/models/event_ack.py @@ -76,6 +78,7 @@ src/waylay/services/registry/models/event_keep_alive.py src/waylay/services/registry/models/event_sse.py src/waylay/services/registry/models/event_type_sse.py src/waylay/services/registry/models/event_with_close_sse.py +src/waylay/services/registry/models/example_reference.py src/waylay/services/registry/models/exposed_openfaas_deploy_spec.py src/waylay/services/registry/models/failed_event_data.py src/waylay/services/registry/models/failed_event_sse.py @@ -83,10 +86,8 @@ src/waylay/services/registry/models/failed_event_sse_event.py src/waylay/services/registry/models/failure_reason.py src/waylay/services/registry/models/file_upload.py src/waylay/services/registry/models/force_delete_query_v1.py -src/waylay/services/registry/models/function_delete_query.py src/waylay/services/registry/models/function_deploy_overrides.py src/waylay/services/registry/models/function_deploy_overrides_type.py -src/waylay/services/registry/models/function_entity_query.py src/waylay/services/registry/models/function_job_args.py src/waylay/services/registry/models/function_manifest.py src/waylay/services/registry/models/function_meta.py @@ -94,7 +95,6 @@ src/waylay/services/registry/models/function_name_version.py src/waylay/services/registry/models/function_ref.py src/waylay/services/registry/models/function_spec.py src/waylay/services/registry/models/function_type.py -src/waylay/services/registry/models/function_version_query.py src/waylay/services/registry/models/get_content_params_v2.py src/waylay/services/registry/models/get_invokable_webscript_query.py src/waylay/services/registry/models/get_model_response_v2.py @@ -157,6 +157,7 @@ src/waylay/services/registry/models/job_type.py src/waylay/services/registry/models/job_type_batch.py src/waylay/services/registry/models/job_type_build.py src/waylay/services/registry/models/job_type_deploy.py +src/waylay/services/registry/models/job_type_notify.py src/waylay/services/registry/models/job_type_scale.py src/waylay/services/registry/models/job_type_schema.py src/waylay/services/registry/models/job_type_undeploy.py @@ -186,19 +187,17 @@ src/waylay/services/registry/models/kf_serving_versions_query_v1.py src/waylay/services/registry/models/kfserving_response_v2.py src/waylay/services/registry/models/language_release.py src/waylay/services/registry/models/latest_function_versions_query.py +src/waylay/services/registry/models/latest_function_versions_query_show_related.py src/waylay/services/registry/models/latest_functions_query.py src/waylay/services/registry/models/latest_models_response_v2.py -src/waylay/services/registry/models/latest_models_response_v2_entities_inner.py src/waylay/services/registry/models/latest_plug_query.py src/waylay/services/registry/models/latest_plug_version_query_v2.py src/waylay/services/registry/models/latest_plug_versions_query.py src/waylay/services/registry/models/latest_plug_versions_query_v2.py src/waylay/services/registry/models/latest_plugs_query.py src/waylay/services/registry/models/latest_plugs_response_v2.py -src/waylay/services/registry/models/latest_plugs_response_v2_entities_inner.py src/waylay/services/registry/models/latest_version_level.py src/waylay/services/registry/models/latest_webscripts_response_v2.py -src/waylay/services/registry/models/latest_webscripts_response_v2_entities_inner.py src/waylay/services/registry/models/legacy_configuration_object.py src/waylay/services/registry/models/legacy_configuration_object_format.py src/waylay/services/registry/models/legacy_configuration_response_object.py @@ -225,7 +224,6 @@ src/waylay/services/registry/models/legacy_plug_script_meta_raw_data_inner.py src/waylay/services/registry/models/legacy_plug_script_response.py src/waylay/services/registry/models/legacy_required_properties_inner.py src/waylay/services/registry/models/legacy_required_property_object.py -src/waylay/services/registry/models/limit_query.py src/waylay/services/registry/models/media_type.py src/waylay/services/registry/models/message_and_status_response.py src/waylay/services/registry/models/message_response.py @@ -233,10 +231,8 @@ src/waylay/services/registry/models/model.py src/waylay/services/registry/models/model1.py src/waylay/services/registry/models/model2.py src/waylay/services/registry/models/model_versions_response_v2.py -src/waylay/services/registry/models/multipart_file_upload.py src/waylay/services/registry/models/name.py src/waylay/services/registry/models/name_and_version.py -src/waylay/services/registry/models/named_function_versions_query.py src/waylay/services/registry/models/named_kf_serving_versions_query_v2.py src/waylay/services/registry/models/named_parameters_typeof_as_job_reference.py src/waylay/services/registry/models/named_parameters_typeof_as_job_reference_job_status.py @@ -244,15 +240,14 @@ src/waylay/services/registry/models/named_parameters_typeof_from_legacy.py src/waylay/services/registry/models/named_parameters_typeof_from_legacy_documentation.py src/waylay/services/registry/models/named_parameters_typeof_is_not_legacy.py src/waylay/services/registry/models/named_plug_versions_query_v2.py -src/waylay/services/registry/models/named_versions_filter.py src/waylay/services/registry/models/named_webscript_versions_query_v2.py +src/waylay/services/registry/models/notify_result.py src/waylay/services/registry/models/object.py src/waylay/services/registry/models/openfaas_deploy_args.py src/waylay/services/registry/models/openfaas_function_ref.py src/waylay/services/registry/models/operation.py src/waylay/services/registry/models/operation_status.py src/waylay/services/registry/models/operation_status_error.py -src/waylay/services/registry/models/paging_query.py src/waylay/services/registry/models/paging_response.py src/waylay/services/registry/models/parent_keys.py src/waylay/services/registry/models/patch_interface_query.py @@ -262,7 +257,6 @@ src/waylay/services/registry/models/plug.py src/waylay/services/registry/models/plug1.py src/waylay/services/registry/models/plug2.py src/waylay/services/registry/models/plug_delete_force_query.py -src/waylay/services/registry/models/plug_delete_query.py src/waylay/services/registry/models/plug_interface.py src/waylay/services/registry/models/plug_listing_and_query_response.py src/waylay/services/registry/models/plug_listing_response.py @@ -275,7 +269,6 @@ src/waylay/services/registry/models/plug_property_format_type.py src/waylay/services/registry/models/plug_response.py src/waylay/services/registry/models/plug_response_v2.py src/waylay/services/registry/models/plug_type.py -src/waylay/services/registry/models/plug_type_query.py src/waylay/services/registry/models/plug_versions_response_v2.py src/waylay/services/registry/models/post_model_job_async_response_v2.py src/waylay/services/registry/models/post_model_job_sync_response_v2.py @@ -293,13 +286,14 @@ src/waylay/services/registry/models/rebuild_model_sync_response_v2.py src/waylay/services/registry/models/rebuild_plug_async_response_v2.py src/waylay/services/registry/models/rebuild_plug_sync_response_v2.py src/waylay/services/registry/models/rebuild_policy.py -src/waylay/services/registry/models/rebuild_query_params.py src/waylay/services/registry/models/rebuild_query_v2.py src/waylay/services/registry/models/rebuild_submitted_response.py src/waylay/services/registry/models/rebuild_webscript_async_response_v2.py src/waylay/services/registry/models/rebuild_webscript_sync_response_v2.py +src/waylay/services/registry/models/registry_error_response.py src/waylay/services/registry/models/remove_function_query_v2.py src/waylay/services/registry/models/remove_plug_query_v2.py +src/waylay/services/registry/models/request_deploy_query.py src/waylay/services/registry/models/request_operation.py src/waylay/services/registry/models/resource_limits.py src/waylay/services/registry/models/root_page_response.py @@ -329,8 +323,10 @@ src/waylay/services/registry/models/scale_type.py src/waylay/services/registry/models/schema_by_id_params.py src/waylay/services/registry/models/schema_params.py src/waylay/services/registry/models/semantic_version_range.py +src/waylay/services/registry/models/show_related_type.py src/waylay/services/registry/models/status.py src/waylay/services/registry/models/status_any.py +src/waylay/services/registry/models/status_exclude.py src/waylay/services/registry/models/status_filter.py src/waylay/services/registry/models/status_include.py src/waylay/services/registry/models/status_response.py @@ -340,7 +336,6 @@ src/waylay/services/registry/models/supported_events.py src/waylay/services/registry/models/tag.py src/waylay/services/registry/models/tag_query.py src/waylay/services/registry/models/tags_filter.py -src/waylay/services/registry/models/tags_query.py src/waylay/services/registry/models/timestamp_absolute.py src/waylay/services/registry/models/timestamp_age.py src/waylay/services/registry/models/timestamp_spec.py @@ -353,7 +348,6 @@ src/waylay/services/registry/models/undeploy_submitted_response_v2.py src/waylay/services/registry/models/undeploy_type.py src/waylay/services/registry/models/undeployed_response_v2.py src/waylay/services/registry/models/unhealthy_invokable_webscript_error.py -src/waylay/services/registry/models/update_comment.py src/waylay/services/registry/models/update_draft_query.py src/waylay/services/registry/models/update_metadata_request_v1.py src/waylay/services/registry/models/update_metadata_request_v2.py @@ -370,7 +364,6 @@ src/waylay/services/registry/models/verify_result.py src/waylay/services/registry/models/verify_type.py src/waylay/services/registry/models/verify_webscript_sync_response_v2.py src/waylay/services/registry/models/version_includes.py -src/waylay/services/registry/models/versions_query.py src/waylay/services/registry/models/versions_query_v2.py src/waylay/services/registry/models/versions_response_v2.py src/waylay/services/registry/models/waiting_children_event_sse.py @@ -390,15 +383,18 @@ src/waylay/services/registry/models/webscript_response_v2.py src/waylay/services/registry/models/webscript_response_with_invoke_link_v2.py src/waylay/services/registry/models/webscript_versions_response_v2.py src/waylay/services/registry/models/with_asset_hal_link.py +src/waylay/services/registry/models/with_embedded_alt_versions_i_kfserving_response_v2.py +src/waylay/services/registry/models/with_embedded_alt_versions_i_plug_response_v2.py +src/waylay/services/registry/models/with_embedded_alt_versions_i_webscript_response_with_invoke_link_v2.py src/waylay/services/registry/models/with_entity_attributes.py src/waylay/services/registry/models/with_limit.py src/waylay/services/registry/models/with_paging.py src/waylay/services/registry/queries/__init__.py src/waylay/services/registry/queries/about_api.py src/waylay/services/registry/queries/jobs_api.py -src/waylay/services/registry/queries/model_functions_api.py -src/waylay/services/registry/queries/plug_functions_api.py +src/waylay/services/registry/queries/models_api.py +src/waylay/services/registry/queries/plugs_api.py src/waylay/services/registry/queries/py.typed src/waylay/services/registry/queries/runtimes_api.py src/waylay/services/registry/queries/schemas_api.py -src/waylay/services/registry/queries/webscript_functions_api.py +src/waylay/services/registry/queries/webscripts_api.py diff --git a/waylay-sdk-registry-types/README.md b/waylay-sdk-registry-types/README.md index 05b236c2..23f543b6 100644 --- a/waylay-sdk-registry-types/README.md +++ b/waylay-sdk-registry-types/README.md @@ -2,7 +2,7 @@ V2 API to build and deploy Waylay functions (plugs, webscripts, BYOML models). This Python package is automatically generated based on the -Waylay Registry OpenAPI specification (API version: 2.12.4) +Waylay Registry OpenAPI specification (API version: 2.13.0) For more information, please visit [the openapi specification](https://docs.waylay.io/openapi/public/redocly/registry.html). It is considered an extension of the waylay-sdk-registry package, and it consists of the typed model classes for all path params, query params, body params and responses for each of the api methods in `waylay-sdk-registry`. diff --git a/waylay-sdk-registry-types/pyproject.toml b/waylay-sdk-registry-types/pyproject.toml index 082187ad..67f2496d 100644 --- a/waylay-sdk-registry-types/pyproject.toml +++ b/waylay-sdk-registry-types/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "waylay-sdk-registry-types" -version = "2.12.4.20240415" +version = "2.13.0b20240415" description = "Waylay Function Registry Types " authors = [ { name = "Waylay", email = "info@waylay.io"} @@ -13,7 +13,7 @@ keywords = ["Waylay Function Registry" , "Types"] requires-python = ">= 3.9" dependencies = [ "waylay-sdk-core ~= 0.2.0", - "waylay-sdk-registry == 2.12.4.20240415", + "waylay-sdk-registry == 2.13.0b20240415", "pydantic ~= 2.6", "typing-extensions ~= 4.10", "eval-type-backport ~= 0.1.3; python_version < '3.10'", diff --git a/waylay-sdk-registry-types/src/waylay/services/registry/models/__init__.py b/waylay-sdk-registry-types/src/waylay/services/registry/models/__init__.py index 31440d9b..5372da06 100644 --- a/waylay-sdk-registry-types/src/waylay/services/registry/models/__init__.py +++ b/waylay-sdk-registry-types/src/waylay/services/registry/models/__init__.py @@ -3,7 +3,7 @@ This code was generated from the OpenAPI documentation of 'Waylay Function Registry' -version: 2.12.4 +version: 2.13.0 V2 API to build and deploy Waylay functions (plugs, webscripts, BYOML models). @@ -12,12 +12,19 @@ Do not edit the class manually. """ -__version__ = "2.12.4.20240415" +__version__ = "2.13.0b20240415" # import models into model package from .active_event_data import ActiveEventData from .active_event_sse import ActiveEventSSE from .active_event_sse_event import ActiveEventSSEEvent +from .alt_embedded_version_i_kfserving_response_v2 import ( + AltEmbeddedVersionIKfservingResponseV2, +) +from .alt_embedded_version_i_plug_response_v2 import AltEmbeddedVersionIPlugResponseV2 +from .alt_embedded_version_i_webscript_response_with_invoke_link_v2 import ( + AltEmbeddedVersionIWebscriptResponseWithInvokeLinkV2, +) from .alt_version_hal_link import AltVersionHALLink from .any_function_response import AnyFunctionResponse from .any_job_for_function import AnyJobForFunction @@ -34,10 +41,8 @@ from .asset_summary_with_hal_link import AssetSummaryWithHALLink from .asset_summary_with_hal_link_links import AssetSummaryWithHALLinkLinks from .assets_conditions import AssetsConditions -from .async_deploy_query import AsyncDeployQuery from .async_deploy_query_v1 import AsyncDeployQueryV1 from .async_query_default_false import AsyncQueryDefaultFalse -from .async_query_default_true import AsyncQueryDefaultTrue from .async_verify_query import AsyncVerifyQuery from .batch import Batch from .batch_args import BatchArgs @@ -59,9 +64,11 @@ from .content_query_v2 import ContentQueryV2 from .content_validation_listing import ContentValidationListing from .create_function_query_v2 import CreateFunctionQueryV2 +from .create_function_query_v2_copy import CreateFunctionQueryV2Copy from .create_kf_serving_async_response import CreateKFServingAsyncResponse from .create_plug_async_response import CreatePlugAsyncResponse from .create_webscript_async_response import CreateWebscriptAsyncResponse +from .create_webscripts_copy_parameter import CreateWebscriptsCopyParameter from .delayed_event_data import DelayedEventData from .delayed_event_sse import DelayedEventSSE from .delayed_event_sse_event import DelayedEventSSEEvent @@ -69,19 +76,22 @@ from .deploy1 import Deploy1 from .deploy_args import DeployArgs from .deploy_args_deploy_spec_overrides import DeployArgsDeploySpecOverrides -from .deploy_attributes_filter import DeployAttributesFilter from .deploy_job_status import DeployJobStatus from .deploy_result import DeployResult from .deploy_spec import DeploySpec from .deploy_spec_openfaas_spec import DeploySpecOpenfaasSpec from .deploy_type import DeployType from .deprecate_previous_policy import DeprecatePreviousPolicy -from .deprecate_previous_query import DeprecatePreviousQuery -from .deprecated_draft_filter import DeprecatedDraftFilter from .documentation import Documentation from .documentation_property import DocumentationProperty -from .dry_run_query import DryRunQuery from .entity_response import EntityResponse +from .entity_with_links_i_kfserving_response_v2 import ( + EntityWithLinksIKfservingResponseV2, +) +from .entity_with_links_i_plug_response_v2 import EntityWithLinksIPlugResponseV2 +from .entity_with_links_i_webscript_response_with_invoke_link_v2 import ( + EntityWithLinksIWebscriptResponseWithInvokeLinkV2, +) from .error_and_status_response import ErrorAndStatusResponse from .error_response import ErrorResponse from .event_ack import EventAck @@ -90,6 +100,7 @@ from .event_sse import EventSSE from .event_type_sse import EventTypeSSE from .event_with_close_sse import EventWithCloseSSE +from .example_reference import ExampleReference from .exposed_openfaas_deploy_spec import ExposedOpenfaasDeploySpec from .failed_event_data import FailedEventData from .failed_event_sse import FailedEventSSE @@ -97,10 +108,8 @@ from .failure_reason import FailureReason from .file_upload import FileUpload from .force_delete_query_v1 import ForceDeleteQueryV1 -from .function_delete_query import FunctionDeleteQuery from .function_deploy_overrides import FunctionDeployOverrides from .function_deploy_overrides_type import FunctionDeployOverridesType -from .function_entity_query import FunctionEntityQuery from .function_job_args import FunctionJobArgs from .function_manifest import FunctionManifest from .function_meta import FunctionMeta @@ -108,7 +117,6 @@ from .function_ref import FunctionRef from .function_spec import FunctionSpec from .function_type import FunctionType -from .function_version_query import FunctionVersionQuery from .get_content_params_v2 import GetContentParamsV2 from .get_invokable_webscript_query import GetInvokableWebscriptQuery from .get_model_response_v2 import GetModelResponseV2 @@ -177,6 +185,7 @@ from .job_type_batch import JobTypeBatch from .job_type_build import JobTypeBuild from .job_type_deploy import JobTypeDeploy +from .job_type_notify import JobTypeNotify from .job_type_scale import JobTypeScale from .job_type_schema import JobTypeSchema from .job_type_undeploy import JobTypeUndeploy @@ -208,23 +217,19 @@ from .kfserving_response_v2 import KfservingResponseV2 from .language_release import LanguageRelease from .latest_function_versions_query import LatestFunctionVersionsQuery +from .latest_function_versions_query_show_related import ( + LatestFunctionVersionsQueryShowRelated, +) from .latest_functions_query import LatestFunctionsQuery from .latest_models_response_v2 import LatestModelsResponseV2 -from .latest_models_response_v2_entities_inner import ( - LatestModelsResponseV2EntitiesInner, -) from .latest_plug_query import LatestPlugQuery from .latest_plug_version_query_v2 import LatestPlugVersionQueryV2 from .latest_plug_versions_query import LatestPlugVersionsQuery from .latest_plug_versions_query_v2 import LatestPlugVersionsQueryV2 from .latest_plugs_query import LatestPlugsQuery from .latest_plugs_response_v2 import LatestPlugsResponseV2 -from .latest_plugs_response_v2_entities_inner import LatestPlugsResponseV2EntitiesInner from .latest_version_level import LatestVersionLevel from .latest_webscripts_response_v2 import LatestWebscriptsResponseV2 -from .latest_webscripts_response_v2_entities_inner import ( - LatestWebscriptsResponseV2EntitiesInner, -) from .legacy_configuration_object import LegacyConfigurationObject from .legacy_configuration_object_format import LegacyConfigurationObjectFormat from .legacy_configuration_response_object import LegacyConfigurationResponseObject @@ -257,7 +262,6 @@ from .legacy_plug_script_response import LegacyPlugScriptResponse from .legacy_required_properties_inner import LegacyRequiredPropertiesInner from .legacy_required_property_object import LegacyRequiredPropertyObject -from .limit_query import LimitQuery from .media_type import MediaType from .message_and_status_response import MessageAndStatusResponse from .message_response import MessageResponse @@ -265,10 +269,8 @@ from .model1 import Model1 from .model2 import Model2 from .model_versions_response_v2 import ModelVersionsResponseV2 -from .multipart_file_upload import MultipartFileUpload from .name import Name from .name_and_version import NameAndVersion -from .named_function_versions_query import NamedFunctionVersionsQuery from .named_kf_serving_versions_query_v2 import NamedKFServingVersionsQueryV2 from .named_parameters_typeof_as_job_reference import ( NamedParametersTypeofAsJobReference, @@ -282,14 +284,13 @@ ) from .named_parameters_typeof_is_not_legacy import NamedParametersTypeofIsNotLegacy from .named_plug_versions_query_v2 import NamedPlugVersionsQueryV2 -from .named_versions_filter import NamedVersionsFilter from .named_webscript_versions_query_v2 import NamedWebscriptVersionsQueryV2 +from .notify_result import NotifyResult from .openfaas_deploy_args import OpenfaasDeployArgs from .openfaas_function_ref import OpenfaasFunctionRef from .operation import Operation from .operation_status import OperationStatus from .operation_status_error import OperationStatusError -from .paging_query import PagingQuery from .paging_response import PagingResponse from .parent_keys import ParentKeys from .patch_interface_query import PatchInterfaceQuery @@ -299,7 +300,6 @@ from .plug1 import Plug1 from .plug2 import Plug2 from .plug_delete_force_query import PlugDeleteForceQuery -from .plug_delete_query import PlugDeleteQuery from .plug_interface import PlugInterface from .plug_listing_and_query_response import PlugListingAndQueryResponse from .plug_listing_response import PlugListingResponse @@ -312,7 +312,6 @@ from .plug_response import PlugResponse from .plug_response_v2 import PlugResponseV2 from .plug_type import PlugType -from .plug_type_query import PlugTypeQuery from .plug_versions_response_v2 import PlugVersionsResponseV2 from .post_model_job_async_response_v2 import PostModelJobAsyncResponseV2 from .post_model_job_sync_response_v2 import PostModelJobSyncResponseV2 @@ -329,13 +328,14 @@ from .rebuild_plug_async_response_v2 import RebuildPlugAsyncResponseV2 from .rebuild_plug_sync_response_v2 import RebuildPlugSyncResponseV2 from .rebuild_policy import RebuildPolicy -from .rebuild_query_params import RebuildQueryParams from .rebuild_query_v2 import RebuildQueryV2 from .rebuild_submitted_response import RebuildSubmittedResponse from .rebuild_webscript_async_response_v2 import RebuildWebscriptAsyncResponseV2 from .rebuild_webscript_sync_response_v2 import RebuildWebscriptSyncResponseV2 +from .registry_error_response import RegistryErrorResponse from .remove_function_query_v2 import RemoveFunctionQueryV2 from .remove_plug_query_v2 import RemovePlugQueryV2 +from .request_deploy_query import RequestDeployQuery from .request_operation import RequestOperation from .resource_limits import ResourceLimits from .root_page_response import RootPageResponse @@ -365,8 +365,10 @@ from .schema_by_id_params import SchemaByIdParams from .schema_params import SchemaParams from .semantic_version_range import SemanticVersionRange +from .show_related_type import ShowRelatedType from .status import Status from .status_any import StatusAny +from .status_exclude import StatusExclude from .status_filter import StatusFilter from .status_include import StatusInclude from .status_response import StatusResponse @@ -376,7 +378,6 @@ from .tag import Tag from .tag_query import TagQuery from .tags_filter import TagsFilter -from .tags_query import TagsQuery from .timestamp_absolute import TimestampAbsolute from .timestamp_age import TimestampAge from .timestamp_spec import TimestampSpec @@ -389,7 +390,6 @@ from .undeploy_type import UndeployType from .undeployed_response_v2 import UndeployedResponseV2 from .unhealthy_invokable_webscript_error import UnhealthyInvokableWebscriptError -from .update_comment import UpdateComment from .update_draft_query import UpdateDraftQuery from .update_metadata_request_v1 import UpdateMetadataRequestV1 from .update_metadata_request_v2 import UpdateMetadataRequestV2 @@ -406,7 +406,6 @@ from .verify_type import VerifyType from .verify_webscript_sync_response_v2 import VerifyWebscriptSyncResponseV2 from .version_includes import VersionIncludes -from .versions_query import VersionsQuery from .versions_query_v2 import VersionsQueryV2 from .versions_response_v2 import VersionsResponseV2 from .waiting_children_event_sse import WaitingChildrenEventSSE @@ -426,6 +425,15 @@ from .webscript_response_with_invoke_link_v2 import WebscriptResponseWithInvokeLinkV2 from .webscript_versions_response_v2 import WebscriptVersionsResponseV2 from .with_asset_hal_link import WithAssetHALLink +from .with_embedded_alt_versions_i_kfserving_response_v2 import ( + WithEmbeddedAltVersionsIKfservingResponseV2, +) +from .with_embedded_alt_versions_i_plug_response_v2 import ( + WithEmbeddedAltVersionsIPlugResponseV2, +) +from .with_embedded_alt_versions_i_webscript_response_with_invoke_link_v2 import ( + WithEmbeddedAltVersionsIWebscriptResponseWithInvokeLinkV2, +) from .with_entity_attributes import WithEntityAttributes from .with_limit import WithLimit from .with_paging import WithPaging @@ -435,6 +443,9 @@ "ActiveEventData", "ActiveEventSSE", "ActiveEventSSEEvent", + "AltEmbeddedVersionIKfservingResponseV2", + "AltEmbeddedVersionIPlugResponseV2", + "AltEmbeddedVersionIWebscriptResponseWithInvokeLinkV2", "AltVersionHALLink", "AnyFunctionResponse", "AnyJobForFunction", @@ -451,10 +462,8 @@ "AssetSummaryWithHALLink", "AssetSummaryWithHALLinkLinks", "AssetsConditions", - "AsyncDeployQuery", "AsyncDeployQueryV1", "AsyncQueryDefaultFalse", - "AsyncQueryDefaultTrue", "AsyncVerifyQuery", "Batch", "BatchArgs", @@ -476,9 +485,11 @@ "ContentQueryV2", "ContentValidationListing", "CreateFunctionQueryV2", + "CreateFunctionQueryV2Copy", "CreateKFServingAsyncResponse", "CreatePlugAsyncResponse", "CreateWebscriptAsyncResponse", + "CreateWebscriptsCopyParameter", "DelayedEventData", "DelayedEventSSE", "DelayedEventSSEEvent", @@ -486,19 +497,18 @@ "Deploy1", "DeployArgs", "DeployArgsDeploySpecOverrides", - "DeployAttributesFilter", "DeployJobStatus", "DeployResult", "DeploySpec", "DeploySpecOpenfaasSpec", "DeployType", "DeprecatePreviousPolicy", - "DeprecatePreviousQuery", - "DeprecatedDraftFilter", "Documentation", "DocumentationProperty", - "DryRunQuery", "EntityResponse", + "EntityWithLinksIKfservingResponseV2", + "EntityWithLinksIPlugResponseV2", + "EntityWithLinksIWebscriptResponseWithInvokeLinkV2", "ErrorAndStatusResponse", "ErrorResponse", "EventAck", @@ -507,6 +517,7 @@ "EventSSE", "EventTypeSSE", "EventWithCloseSSE", + "ExampleReference", "ExposedOpenfaasDeploySpec", "FailedEventData", "FailedEventSSE", @@ -514,10 +525,8 @@ "FailureReason", "FileUpload", "ForceDeleteQueryV1", - "FunctionDeleteQuery", "FunctionDeployOverrides", "FunctionDeployOverridesType", - "FunctionEntityQuery", "FunctionJobArgs", "FunctionManifest", "FunctionMeta", @@ -525,7 +534,6 @@ "FunctionRef", "FunctionSpec", "FunctionType", - "FunctionVersionQuery", "GetContentParamsV2", "GetInvokableWebscriptQuery", "GetModelResponseV2", @@ -588,6 +596,7 @@ "JobTypeBatch", "JobTypeBuild", "JobTypeDeploy", + "JobTypeNotify", "JobTypeScale", "JobTypeSchema", "JobTypeUndeploy", @@ -617,19 +626,17 @@ "KfservingResponseV2", "LanguageRelease", "LatestFunctionVersionsQuery", + "LatestFunctionVersionsQueryShowRelated", "LatestFunctionsQuery", "LatestModelsResponseV2", - "LatestModelsResponseV2EntitiesInner", "LatestPlugQuery", "LatestPlugVersionQueryV2", "LatestPlugVersionsQuery", "LatestPlugVersionsQueryV2", "LatestPlugsQuery", "LatestPlugsResponseV2", - "LatestPlugsResponseV2EntitiesInner", "LatestVersionLevel", "LatestWebscriptsResponseV2", - "LatestWebscriptsResponseV2EntitiesInner", "LegacyConfigurationObject", "LegacyConfigurationObjectFormat", "LegacyConfigurationResponseObject", @@ -656,7 +663,6 @@ "LegacyPlugScriptResponse", "LegacyRequiredPropertiesInner", "LegacyRequiredPropertyObject", - "LimitQuery", "MediaType", "MessageAndStatusResponse", "MessageResponse", @@ -664,10 +670,8 @@ "Model1", "Model2", "ModelVersionsResponseV2", - "MultipartFileUpload", "Name", "NameAndVersion", - "NamedFunctionVersionsQuery", "NamedKFServingVersionsQueryV2", "NamedParametersTypeofAsJobReference", "NamedParametersTypeofAsJobReferenceJobStatus", @@ -675,14 +679,13 @@ "NamedParametersTypeofFromLegacyDocumentation", "NamedParametersTypeofIsNotLegacy", "NamedPlugVersionsQueryV2", - "NamedVersionsFilter", "NamedWebscriptVersionsQueryV2", + "NotifyResult", "OpenfaasDeployArgs", "OpenfaasFunctionRef", "Operation", "OperationStatus", "OperationStatusError", - "PagingQuery", "PagingResponse", "ParentKeys", "PatchInterfaceQuery", @@ -692,7 +695,6 @@ "Plug1", "Plug2", "PlugDeleteForceQuery", - "PlugDeleteQuery", "PlugInterface", "PlugListingAndQueryResponse", "PlugListingResponse", @@ -705,7 +707,6 @@ "PlugResponse", "PlugResponseV2", "PlugType", - "PlugTypeQuery", "PlugVersionsResponseV2", "PostModelJobAsyncResponseV2", "PostModelJobSyncResponseV2", @@ -722,13 +723,14 @@ "RebuildPlugAsyncResponseV2", "RebuildPlugSyncResponseV2", "RebuildPolicy", - "RebuildQueryParams", "RebuildQueryV2", "RebuildSubmittedResponse", "RebuildWebscriptAsyncResponseV2", "RebuildWebscriptSyncResponseV2", + "RegistryErrorResponse", "RemoveFunctionQueryV2", "RemovePlugQueryV2", + "RequestDeployQuery", "RequestOperation", "ResourceLimits", "RootPageResponse", @@ -758,8 +760,10 @@ "SchemaByIdParams", "SchemaParams", "SemanticVersionRange", + "ShowRelatedType", "Status", "StatusAny", + "StatusExclude", "StatusFilter", "StatusInclude", "StatusResponse", @@ -769,7 +773,6 @@ "Tag", "TagQuery", "TagsFilter", - "TagsQuery", "TimestampAbsolute", "TimestampAge", "TimestampSpec", @@ -782,7 +785,6 @@ "UndeployType", "UndeployedResponseV2", "UnhealthyInvokableWebscriptError", - "UpdateComment", "UpdateDraftQuery", "UpdateMetadataRequestV1", "UpdateMetadataRequestV2", @@ -799,7 +801,6 @@ "VerifyType", "VerifyWebscriptSyncResponseV2", "VersionIncludes", - "VersionsQuery", "VersionsQueryV2", "VersionsResponseV2", "WaitingChildrenEventSSE", @@ -819,6 +820,9 @@ "WebscriptResponseWithInvokeLinkV2", "WebscriptVersionsResponseV2", "WithAssetHALLink", + "WithEmbeddedAltVersionsIKfservingResponseV2", + "WithEmbeddedAltVersionsIPlugResponseV2", + "WithEmbeddedAltVersionsIWebscriptResponseWithInvokeLinkV2", "WithEntityAttributes", "WithLimit", "WithPaging", diff --git a/waylay-sdk-registry-types/src/waylay/services/registry/models/deprecate_previous_query.py b/waylay-sdk-registry-types/src/waylay/services/registry/models/alt_embedded_version_i_kfserving_response_v2.py similarity index 64% rename from waylay-sdk-registry-types/src/waylay/services/registry/models/deprecate_previous_query.py rename to waylay-sdk-registry-types/src/waylay/services/registry/models/alt_embedded_version_i_kfserving_response_v2.py index 31e29885..ed6585db 100644 --- a/waylay-sdk-registry-types/src/waylay/services/registry/models/deprecate_previous_query.py +++ b/waylay-sdk-registry-types/src/waylay/services/registry/models/alt_embedded_version_i_kfserving_response_v2.py @@ -13,19 +13,17 @@ from pydantic import ( ConfigDict, - Field, ) from waylay.sdk.api._models import BaseModel as WaylayBaseModel -from ..models.deprecate_previous_policy import DeprecatePreviousPolicy +from ..models.kfserving_response_v2 import KfservingResponseV2 -class DeprecatePreviousQuery(WaylayBaseModel): - """DeprecatePreviousQuery.""" +class AltEmbeddedVersionIKfservingResponseV2(WaylayBaseModel): + """Embedded representations of the _latest_ draft/published versions..""" - deprecate_previous: DeprecatePreviousPolicy | None = Field( - default=None, alias="deprecatePrevious" - ) + draft: KfservingResponseV2 | None = None + published: KfservingResponseV2 | None = None model_config = ConfigDict( populate_by_name=True, diff --git a/waylay-sdk-registry-types/src/waylay/services/registry/models/multipart_file_upload.py b/waylay-sdk-registry-types/src/waylay/services/registry/models/alt_embedded_version_i_plug_response_v2.py similarity index 66% rename from waylay-sdk-registry-types/src/waylay/services/registry/models/multipart_file_upload.py rename to waylay-sdk-registry-types/src/waylay/services/registry/models/alt_embedded_version_i_plug_response_v2.py index 21338bf6..5e63944e 100644 --- a/waylay-sdk-registry-types/src/waylay/services/registry/models/multipart_file_upload.py +++ b/waylay-sdk-registry-types/src/waylay/services/registry/models/alt_embedded_version_i_plug_response_v2.py @@ -11,20 +11,19 @@ from __future__ import annotations -from typing import List - from pydantic import ( ConfigDict, - StrictBytes, - StrictStr, ) from waylay.sdk.api._models import BaseModel as WaylayBaseModel +from ..models.plug_response_v2 import PlugResponseV2 + -class MultipartFileUpload(WaylayBaseModel): - """A multi-part upload containing one or more file assets..""" +class AltEmbeddedVersionIPlugResponseV2(WaylayBaseModel): + """Embedded representations of the _latest_ draft/published versions..""" - filename: List[StrictBytes | StrictStr] | None = None + draft: PlugResponseV2 | None = None + published: PlugResponseV2 | None = None model_config = ConfigDict( populate_by_name=True, diff --git a/waylay-sdk-registry-types/src/waylay/services/registry/models/tags_query.py b/waylay-sdk-registry-types/src/waylay/services/registry/models/alt_embedded_version_i_webscript_response_with_invoke_link_v2.py similarity index 59% rename from waylay-sdk-registry-types/src/waylay/services/registry/models/tags_query.py rename to waylay-sdk-registry-types/src/waylay/services/registry/models/alt_embedded_version_i_webscript_response_with_invoke_link_v2.py index c4397604..be99b670 100644 --- a/waylay-sdk-registry-types/src/waylay/services/registry/models/tags_query.py +++ b/waylay-sdk-registry-types/src/waylay/services/registry/models/alt_embedded_version_i_webscript_response_with_invoke_link_v2.py @@ -16,13 +16,16 @@ ) from waylay.sdk.api._models import BaseModel as WaylayBaseModel -from ..models.tags_filter import TagsFilter +from ..models.webscript_response_with_invoke_link_v2 import ( + WebscriptResponseWithInvokeLinkV2, +) -class TagsQuery(WaylayBaseModel): - """TagsQuery.""" +class AltEmbeddedVersionIWebscriptResponseWithInvokeLinkV2(WaylayBaseModel): + """Embedded representations of the _latest_ draft/published versions..""" - tags: TagsFilter | None = None + draft: WebscriptResponseWithInvokeLinkV2 | None = None + published: WebscriptResponseWithInvokeLinkV2 | None = None model_config = ConfigDict( populate_by_name=True, diff --git a/waylay-sdk-registry-types/src/waylay/services/registry/models/any_job_result.py b/waylay-sdk-registry-types/src/waylay/services/registry/models/any_job_result.py index b2f85d47..3877f953 100644 --- a/waylay-sdk-registry-types/src/waylay/services/registry/models/any_job_result.py +++ b/waylay-sdk-registry-types/src/waylay/services/registry/models/any_job_result.py @@ -23,6 +23,7 @@ from ..models.build_result import BuildResult from ..models.cleanup_result import CleanupResult from ..models.deploy_result import DeployResult +from ..models.notify_result import NotifyResult from ..models.undeploy_result import UndeployResult from ..models.verify_result import VerifyResult @@ -34,5 +35,6 @@ Annotated[object, "The result data for a completed scale job."], Annotated[BatchResult, ""], Annotated[CleanupResult, ""], + Annotated[NotifyResult, ""], ] """AnyJobResult.""" diff --git a/waylay-sdk-registry-types/src/waylay/services/registry/models/async_deploy_query.py b/waylay-sdk-registry-types/src/waylay/services/registry/models/async_deploy_query.py deleted file mode 100644 index 065918ed..00000000 --- a/waylay-sdk-registry-types/src/waylay/services/registry/models/async_deploy_query.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding: utf-8 -"""Waylay Function Registry models. - -This code was generated from the OpenAPI documentation of 'Waylay Function Registry' - -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. - -""" - -from __future__ import annotations - -from pydantic import ( - ConfigDict, - Field, - StrictBool, -) -from waylay.sdk.api._models import BaseModel as WaylayBaseModel - -from ..models.deprecate_previous_policy import DeprecatePreviousPolicy - - -class AsyncDeployQuery(WaylayBaseModel): - """AsyncDeployQuery.""" - - deprecate_previous: DeprecatePreviousPolicy | None = Field( - default=None, alias="deprecatePrevious" - ) - dry_run: StrictBool | None = Field( - default=None, - description="If set to true, validates the deployment conditions, but does not change anything.", - alias="dryRun", - ) - var_async: StrictBool | None = Field( - default=True, - description="Unless this is set to false, the server will start the required job actions asynchronously and return a 202 Accepted response. If false the request will block until the job actions are completed, or a timeout occurs.", - alias="async", - ) - scale_to_zero: StrictBool | None = Field( - default=False, - description="If set to true, after successful deployment, the deployed function will be scaled to zero. Saves computing resources when the function is not to be used immediately.", - alias="scaleToZero", - ) - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - extra="ignore", - ) diff --git a/waylay-sdk-registry-types/src/waylay/services/registry/models/async_deploy_query_v1.py b/waylay-sdk-registry-types/src/waylay/services/registry/models/async_deploy_query_v1.py index 9aaf4484..4dfed130 100644 --- a/waylay-sdk-registry-types/src/waylay/services/registry/models/async_deploy_query_v1.py +++ b/waylay-sdk-registry-types/src/waylay/services/registry/models/async_deploy_query_v1.py @@ -22,11 +22,6 @@ class AsyncDeployQueryV1(WaylayBaseModel): """AsyncDeployQueryV1.""" - scale_to_zero: StrictBool | None = Field( - default=False, - description="If set to true, after successful deployment, the deployed function will be scaled to zero. Saves computing resources when the function is not to be used immediately.", - alias="scaleToZero", - ) var_async: StrictBool | None = Field( default=True, description="Unless this is set to false, the server will start the required job actions asynchronously and return a 202 Accepted response. If false the request will block until the job actions are completed, or a timeout occurs.", @@ -37,6 +32,11 @@ class AsyncDeployQueryV1(WaylayBaseModel): description="If set to true, validates the deployment conditions, but does not change anything.", alias="dryRun", ) + scale_to_zero: StrictBool | None = Field( + default=False, + description="If set to true, after successful deployment, the deployed function will be scaled to zero. This saves computing resources when the function is not to be used immediately.", + alias="scaleToZero", + ) model_config = ConfigDict( populate_by_name=True, diff --git a/waylay-sdk-registry-types/src/waylay/services/registry/models/async_query_default_true.py b/waylay-sdk-registry-types/src/waylay/services/registry/models/async_query_default_true.py deleted file mode 100644 index 1ec135d8..00000000 --- a/waylay-sdk-registry-types/src/waylay/services/registry/models/async_query_default_true.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding: utf-8 -"""Waylay Function Registry models. - -This code was generated from the OpenAPI documentation of 'Waylay Function Registry' - -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. - -""" - -from __future__ import annotations - -from pydantic import ( - ConfigDict, - Field, - StrictBool, -) -from waylay.sdk.api._models import BaseModel as WaylayBaseModel - - -class AsyncQueryDefaultTrue(WaylayBaseModel): - """AsyncQueryDefaultTrue.""" - - var_async: StrictBool | None = Field( - default=True, - description="Unless this is set to false, the server will start the required job actions asynchronously and return a 202 Accepted response. If false the request will block until the job actions are completed, or a timeout occurs.", - alias="async", - ) - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - extra="ignore", - ) diff --git a/waylay-sdk-registry-types/src/waylay/services/registry/models/async_verify_query.py b/waylay-sdk-registry-types/src/waylay/services/registry/models/async_verify_query.py index d6da6b5b..5a75f0ba 100644 --- a/waylay-sdk-registry-types/src/waylay/services/registry/models/async_verify_query.py +++ b/waylay-sdk-registry-types/src/waylay/services/registry/models/async_verify_query.py @@ -15,7 +15,6 @@ ConfigDict, Field, StrictBool, - StrictStr, ) from waylay.sdk.api._models import BaseModel as WaylayBaseModel @@ -23,20 +22,16 @@ class AsyncVerifyQuery(WaylayBaseModel): """AsyncVerifyQuery.""" - comment: StrictStr | None = Field( + scale_to_zero: StrictBool | None = Field( default=None, - description="An optional user-specified comment corresponding to the operation.", + description="Indicates whether the function needs to be scaled down after successful verification. If not set, the function is scaled to zero only if it was not active before this command.", + alias="scaleToZero", ) var_async: StrictBool | None = Field( default=True, description="Unless this is set to false, the server will start the required job actions asynchronously and return a 202 Accepted response. If false the request will block until the job actions are completed, or a timeout occurs.", alias="async", ) - scale_to_zero: StrictBool | None = Field( - default=None, - description="Indicates whether the function needs to be scaled down after successful verification. If not set, the function is scaled to zero only if it was not active before this command.", - alias="scaleToZero", - ) model_config = ConfigDict( populate_by_name=True, diff --git a/waylay-sdk-registry-types/src/waylay/services/registry/models/build_args.py b/waylay-sdk-registry-types/src/waylay/services/registry/models/build_args.py index 8282d725..9fabbe40 100644 --- a/waylay-sdk-registry-types/src/waylay/services/registry/models/build_args.py +++ b/waylay-sdk-registry-types/src/waylay/services/registry/models/build_args.py @@ -34,9 +34,8 @@ class BuildArgs(WaylayBaseModel): description="A semantic version with _exactly_ a `major`, `minor` and `patch` specifier. No `pre-release` or `build` identifiers are allowed. See https://semver.org", alias="runtimeVersion", ) - revision: StrictStr | None = Field( - default=None, - description="The revision hash of the current (draft) function revision", + revision: StrictStr = Field( + description="The revision hash of the current (draft) function revision" ) storage_location: StrictStr = Field( description="Location of the function assets.", alias="storageLocation" diff --git a/waylay-sdk-registry-types/src/waylay/services/registry/models/completed_event_data.py b/waylay-sdk-registry-types/src/waylay/services/registry/models/completed_event_data.py index 6bea8fad..c3764254 100644 --- a/waylay-sdk-registry-types/src/waylay/services/registry/models/completed_event_data.py +++ b/waylay-sdk-registry-types/src/waylay/services/registry/models/completed_event_data.py @@ -13,7 +13,6 @@ from pydantic import ( ConfigDict, - Field, ) from waylay.sdk.api._models import BaseModel as WaylayBaseModel @@ -25,7 +24,7 @@ class CompletedEventData(WaylayBaseModel): """CompletedEventData.""" prev: QueueEvents | None = None - return_value: AnyJobResult = Field(alias="returnValue") + returnvalue: AnyJobResult model_config = ConfigDict( populate_by_name=True, diff --git a/waylay-sdk-registry-types/src/waylay/services/registry/models/create_function_query_v2.py b/waylay-sdk-registry-types/src/waylay/services/registry/models/create_function_query_v2.py index c599b88b..e2810500 100644 --- a/waylay-sdk-registry-types/src/waylay/services/registry/models/create_function_query_v2.py +++ b/waylay-sdk-registry-types/src/waylay/services/registry/models/create_function_query_v2.py @@ -11,14 +11,21 @@ from __future__ import annotations +import re + from pydantic import ( ConfigDict, Field, StrictBool, StrictStr, + field_validator, +) +from typing_extensions import ( + Annotated, # >=3.11 ) from waylay.sdk.api._models import BaseModel as WaylayBaseModel +from ..models.create_function_query_v2_copy import CreateFunctionQueryV2Copy from ..models.deprecate_previous_policy import DeprecatePreviousPolicy from ..models.semantic_version_range import SemanticVersionRange @@ -26,6 +33,23 @@ class CreateFunctionQueryV2(WaylayBaseModel): """CreateFunctionQueryV2.""" + deploy: StrictBool | None = Field( + default=True, + description="Indicates that a function should be _deployed_ when its assets are valid. * If `true` (default), jobs to build and deploy the function will be initiated after it is checked that the assets are valid. Invalid assets lead to a validation error, and the function and its assets are not created or updated. * If `false`, the uploaded assets are stored and the function is created/updated in `registered` state. Asset validation errors are only returned as warning, and stored as `failureReason` on the function entity. Use an _asset update_ or _rebuild_ to initiate a build and deploy at a later stage.", + ) + author: StrictStr | None = Field( + default=None, + description="Optionally changes the author metadata when updating a function.", + ) + comment: StrictStr | None = Field( + default=None, + description="An optional user-specified comment corresponding to the operation.", + ) + scale_to_zero: StrictBool | None = Field( + default=False, + description="If set to true, after successful deployment, the deployed function will be scaled to zero. This saves computing resources when the function is not to be used immediately.", + alias="scaleToZero", + ) deprecate_previous: DeprecatePreviousPolicy | None = Field( default=None, alias="deprecatePrevious" ) @@ -39,11 +63,6 @@ class CreateFunctionQueryV2(WaylayBaseModel): description="Unless this is set to false, the server will start the required job actions asynchronously and return a 202 Accepted response. If false the request will block until the job actions are completed, or a timeout occurs.", alias="async", ) - scale_to_zero: StrictBool | None = Field( - default=False, - description="If set to true, after successful deployment, the deployed function will be scaled to zero. Saves computing resources when the function is not to be used immediately.", - alias="scaleToZero", - ) version: SemanticVersionRange | None = None name: StrictStr | None = Field( default=None, @@ -53,6 +72,21 @@ class CreateFunctionQueryV2(WaylayBaseModel): default=False, description="If set, the created function will be a draft function and its assets are still mutable. A build and deploy is initiated only in the case when all necessary assets are present and valid.", ) + runtime: Annotated[str, Field(strict=True)] | None = Field( + default=None, + description="A name reference with optional version range: `[@]`. References (a version range of) a named and versioned entity like _function_ or _runtime_.", + ) + copy_from: CreateFunctionQueryV2Copy | None = Field(default=None, alias="copy") + + @field_validator("runtime") + @classmethod + def runtime_validate_regular_expression(cls, value): + """Validate the regular expression.""" + if value is None: + return value + if not re.match(r"^[^@]*(@.*)?$", value): + raise ValueError(r"must validate the regular expression /^[^@]*(@.*)?$/") + return value model_config = ConfigDict( populate_by_name=True, diff --git a/waylay-sdk-registry-types/src/waylay/services/registry/models/create_function_query_v2_copy.py b/waylay-sdk-registry-types/src/waylay/services/registry/models/create_function_query_v2_copy.py new file mode 100644 index 00000000..41c1ed52 --- /dev/null +++ b/waylay-sdk-registry-types/src/waylay/services/registry/models/create_function_query_v2_copy.py @@ -0,0 +1,31 @@ +# coding: utf-8 +"""Waylay Function Registry models. + +This code was generated from the OpenAPI documentation of 'Waylay Function Registry' + +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. + +""" + +from __future__ import annotations + +from typing import ( + Union, +) + +from typing_extensions import ( + Annotated, # >=3.9 +) + +from ..models.example_reference import ExampleReference + +CreateFunctionQueryV2Copy = Union[ + Annotated[ + str, + "A name reference with optional version range: `[@]`. References (a version range of) a named and versioned entity like _function_ or _runtime_.", + ], + Annotated[ExampleReference, ""], +] +"""Indicates the _source_ of initial assets for a _new function_. When using this query parameter, the request body does not need to contain assets, but any assets in the request body will overwrite the copied assets. #### Selection of _assets_ source * If set as `[@]`, the _new function_ will be created with copied assets of the selected _source function_. * If set as `!example`, a `runtime` query parameter is required, and the _new function_ will be initialized with assets of the _runtime example_. #### Selection of the _source function_ When `` is a range (or is not given), the latest _published_ version (in that range) is used. If no _published_ version exists, the latest _draft_ is selected. If no versions in the range exist, a `404` _Not Found_ error is returned. #### The `name` of the _new function_ If a `name` is NOT specified (either as query parameter, or in an optional manifest asset in the request body), the `name` of the _new function_ will be that of the _source function_. #### The `version` of the _new function_ When the _target_ and _source_ name are equal, the `version` query parameters is defaulted to `` (`~` when it's an exact version) The version of the _new function_ will be: * If a `version` is NOT specified (either as query parameter, in an optional manifest asset, or as `` _default_) * a **patch increment** (`..+1`) of the latest **existing version** with the target `name` * **`1.0.0`** otherwise * If a `version` is specified: * the **lowest version** in that range **if no existing version** is in that range. * an **increment** of the latest existing version, **at the highest level** (_major_,_minor_,_patch_) allowed by that range. * otherwise, if all allowed versions already exist, a **`409` _Duplicate_ error** is raised. #### Deployment overrides The new function will use the deployment overrides of the copied function, unless a _manifest_ was specified in the request body..""" diff --git a/waylay-sdk-registry-types/src/waylay/services/registry/models/create_webscripts_copy_parameter.py b/waylay-sdk-registry-types/src/waylay/services/registry/models/create_webscripts_copy_parameter.py new file mode 100644 index 00000000..a6af3eec --- /dev/null +++ b/waylay-sdk-registry-types/src/waylay/services/registry/models/create_webscripts_copy_parameter.py @@ -0,0 +1,31 @@ +# coding: utf-8 +"""Waylay Function Registry models. + +This code was generated from the OpenAPI documentation of 'Waylay Function Registry' + +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. + +""" + +from __future__ import annotations + +from typing import ( + Union, +) + +from typing_extensions import ( + Annotated, # >=3.9 +) + +from ..models.example_reference import ExampleReference + +CreateWebscriptsCopyParameter = Union[ + Annotated[ + str, + "A name reference with optional version range: `[@]`. References (a version range of) a named and versioned entity like _function_ or _runtime_.", + ], + Annotated[ExampleReference, ""], +] +"""CreateWebscriptsCopyParameter.""" diff --git a/waylay-sdk-registry-types/src/waylay/services/registry/models/deploy_args.py b/waylay-sdk-registry-types/src/waylay/services/registry/models/deploy_args.py index e78f1c6b..b188c2ed 100644 --- a/waylay-sdk-registry-types/src/waylay/services/registry/models/deploy_args.py +++ b/waylay-sdk-registry-types/src/waylay/services/registry/models/deploy_args.py @@ -43,9 +43,8 @@ class DeployArgs(WaylayBaseModel): description="A semantic version with _exactly_ a `major`, `minor` and `patch` specifier. No `pre-release` or `build` identifiers are allowed. See https://semver.org", alias="runtimeVersion", ) - revision: StrictStr | None = Field( - default=None, - description="The revision hash of the current (draft) function revision", + revision: StrictStr = Field( + description="The revision hash of the current (draft) function revision" ) deploy_spec_overrides: DeployArgsDeploySpecOverrides = Field( alias="deploySpecOverrides" diff --git a/waylay-sdk-registry-types/src/waylay/services/registry/models/deploy_attributes_filter.py b/waylay-sdk-registry-types/src/waylay/services/registry/models/deploy_attributes_filter.py deleted file mode 100644 index 9f4fce0f..00000000 --- a/waylay-sdk-registry-types/src/waylay/services/registry/models/deploy_attributes_filter.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding: utf-8 -"""Waylay Function Registry models. - -This code was generated from the OpenAPI documentation of 'Waylay Function Registry' - -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. - -""" - -from __future__ import annotations - -from pydantic import ( - ConfigDict, - Field, - StrictStr, -) -from waylay.sdk.api._models import BaseModel as WaylayBaseModel - - -class DeployAttributesFilter(WaylayBaseModel): - """DeployAttributesFilter.""" - - endpoint: StrictStr | None = Field( - default=None, - description="Filter on the openfaas endpoint. This is case-insensitive and supports wild-cards `?` (any one character) and `*` (any sequence of characters).", - ) - image_name: StrictStr | None = Field( - default=None, - description="Filter on the container image name. This is case-insensitive and supports wild-cards `?` (any one character) and `*` (any sequence of characters).", - alias="imageName", - ) - storage_location: StrictStr | None = Field( - default=None, - description="Filter on the storageLocation. This is case-insensitive and supports wild-cards `?` (any one character) and `*` (any sequence of characters).", - alias="storageLocation", - ) - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - extra="ignore", - ) diff --git a/waylay-sdk-registry-types/src/waylay/services/registry/models/latest_models_response_v2_entities_inner.py b/waylay-sdk-registry-types/src/waylay/services/registry/models/entity_with_links_i_kfserving_response_v2.py similarity index 83% rename from waylay-sdk-registry-types/src/waylay/services/registry/models/latest_models_response_v2_entities_inner.py rename to waylay-sdk-registry-types/src/waylay/services/registry/models/entity_with_links_i_kfserving_response_v2.py index 230043ab..27069e1e 100644 --- a/waylay-sdk-registry-types/src/waylay/services/registry/models/latest_models_response_v2_entities_inner.py +++ b/waylay-sdk-registry-types/src/waylay/services/registry/models/entity_with_links_i_kfserving_response_v2.py @@ -22,6 +22,9 @@ ) from waylay.sdk.api._models import BaseModel as WaylayBaseModel +from ..models.alt_embedded_version_i_kfserving_response_v2 import ( + AltEmbeddedVersionIKfservingResponseV2, +) from ..models.alt_version_hal_link import AltVersionHALLink from ..models.failure_reason import FailureReason from ..models.kf_serving_manifest import KFServingManifest @@ -30,10 +33,13 @@ from ..models.update_record import UpdateRecord -class LatestModelsResponseV2EntitiesInner(WaylayBaseModel): - """LatestModelsResponseV2EntitiesInner.""" +class EntityWithLinksIKfservingResponseV2(WaylayBaseModel): + """EntityWithLinksIKfservingResponseV2.""" - links: AltVersionHALLink = Field(alias="_links") + embedded: AltEmbeddedVersionIKfservingResponseV2 | None = Field( + default=None, alias="_embedded" + ) + links: AltVersionHALLink | None = Field(default=None, alias="_links") created_by: StrictStr = Field( description="The user that created this entity.", alias="createdBy" ) diff --git a/waylay-sdk-registry-types/src/waylay/services/registry/models/latest_plugs_response_v2_entities_inner.py b/waylay-sdk-registry-types/src/waylay/services/registry/models/entity_with_links_i_plug_response_v2.py similarity index 84% rename from waylay-sdk-registry-types/src/waylay/services/registry/models/latest_plugs_response_v2_entities_inner.py rename to waylay-sdk-registry-types/src/waylay/services/registry/models/entity_with_links_i_plug_response_v2.py index 9de9045a..e3ea6801 100644 --- a/waylay-sdk-registry-types/src/waylay/services/registry/models/latest_plugs_response_v2_entities_inner.py +++ b/waylay-sdk-registry-types/src/waylay/services/registry/models/entity_with_links_i_plug_response_v2.py @@ -22,6 +22,9 @@ ) from waylay.sdk.api._models import BaseModel as WaylayBaseModel +from ..models.alt_embedded_version_i_plug_response_v2 import ( + AltEmbeddedVersionIPlugResponseV2, +) from ..models.alt_version_hal_link import AltVersionHALLink from ..models.failure_reason import FailureReason from ..models.plug_manifest import PlugManifest @@ -30,10 +33,13 @@ from ..models.update_record import UpdateRecord -class LatestPlugsResponseV2EntitiesInner(WaylayBaseModel): - """LatestPlugsResponseV2EntitiesInner.""" +class EntityWithLinksIPlugResponseV2(WaylayBaseModel): + """EntityWithLinksIPlugResponseV2.""" - links: AltVersionHALLink = Field(alias="_links") + embedded: AltEmbeddedVersionIPlugResponseV2 | None = Field( + default=None, alias="_embedded" + ) + links: AltVersionHALLink | None = Field(default=None, alias="_links") created_by: StrictStr = Field( description="The user that created this entity.", alias="createdBy" ) diff --git a/waylay-sdk-registry-types/src/waylay/services/registry/models/latest_webscripts_response_v2_entities_inner.py b/waylay-sdk-registry-types/src/waylay/services/registry/models/entity_with_links_i_webscript_response_with_invoke_link_v2.py similarity index 82% rename from waylay-sdk-registry-types/src/waylay/services/registry/models/latest_webscripts_response_v2_entities_inner.py rename to waylay-sdk-registry-types/src/waylay/services/registry/models/entity_with_links_i_webscript_response_with_invoke_link_v2.py index b43b59d2..eb889857 100644 --- a/waylay-sdk-registry-types/src/waylay/services/registry/models/latest_webscripts_response_v2_entities_inner.py +++ b/waylay-sdk-registry-types/src/waylay/services/registry/models/entity_with_links_i_webscript_response_with_invoke_link_v2.py @@ -22,6 +22,9 @@ ) from waylay.sdk.api._models import BaseModel as WaylayBaseModel +from ..models.alt_embedded_version_i_webscript_response_with_invoke_link_v2 import ( + AltEmbeddedVersionIWebscriptResponseWithInvokeLinkV2, +) from ..models.failure_reason import FailureReason from ..models.invoke_hal_link import InvokeHALLink from ..models.runtime_attributes import RuntimeAttributes @@ -30,10 +33,13 @@ from ..models.webscript_manifest import WebscriptManifest -class LatestWebscriptsResponseV2EntitiesInner(WaylayBaseModel): - """LatestWebscriptsResponseV2EntitiesInner.""" +class EntityWithLinksIWebscriptResponseWithInvokeLinkV2(WaylayBaseModel): + """EntityWithLinksIWebscriptResponseWithInvokeLinkV2.""" - links: InvokeHALLink = Field(alias="_links") + embedded: AltEmbeddedVersionIWebscriptResponseWithInvokeLinkV2 | None = Field( + default=None, alias="_embedded" + ) + links: InvokeHALLink | None = Field(default=None, alias="_links") created_by: StrictStr = Field( description="The user that created this entity.", alias="createdBy" ) diff --git a/waylay-sdk-registry-types/src/waylay/services/registry/models/example_reference.py b/waylay-sdk-registry-types/src/waylay/services/registry/models/example_reference.py new file mode 100644 index 00000000..a64d8b02 --- /dev/null +++ b/waylay-sdk-registry-types/src/waylay/services/registry/models/example_reference.py @@ -0,0 +1,23 @@ +# coding: utf-8 +"""Waylay Function Registry models. + +This code was generated from the OpenAPI documentation of 'Waylay Function Registry' + +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. + +""" + +from __future__ import annotations + +from enum import Enum + + +class ExampleReference(str, Enum): + """Example reference. References the example assets from the selected runtime..""" + + EXCLAMATION_EXAMPLE = "!example" + + def __str__(self) -> str: + return str(self.value) diff --git a/waylay-sdk-registry-types/src/waylay/services/registry/models/function_delete_query.py b/waylay-sdk-registry-types/src/waylay/services/registry/models/function_delete_query.py deleted file mode 100644 index 477f20af..00000000 --- a/waylay-sdk-registry-types/src/waylay/services/registry/models/function_delete_query.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 -"""Waylay Function Registry models. - -This code was generated from the OpenAPI documentation of 'Waylay Function Registry' - -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. - -""" - -from __future__ import annotations - -from pydantic import ( - ConfigDict, - Field, - StrictBool, -) -from waylay.sdk.api._models import BaseModel as WaylayBaseModel - - -class FunctionDeleteQuery(WaylayBaseModel): - """FunctionDeleteQuery.""" - - force: StrictBool | None = Field( - default=None, - description="If true, the function version will be immediately undeployed and removed. Otherwise, the removal will be delayed to allow current invocations to end. During that period, the function is marked _deprecated_.", - ) - undeploy: StrictBool | None = Field( - default=None, - description="If `true`, the `DELETE` operation * undeploys the (openfaas) function: it becomes no longer available for invocation. * does NOT remove the function from registry: it stays in an `undeployed` status. All assets and definitions are retained, so the version can be restored later with a _rebuild_ action. If `false`, the `DELETE` operation * _only_ marks the plug function as _deprecated_, the function remains active but is removed from the default listings. This also applies to _draft_ versions. This parameter is incompatible with `force=true`. If not set the default behaviour applies: * _draft_ versions are _undeployed_ and _removed_ from registry. * non-_draft_ versions are marked _deprecated_ only.", - ) - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - extra="ignore", - ) diff --git a/waylay-sdk-registry-types/src/waylay/services/registry/models/function_entity_query.py b/waylay-sdk-registry-types/src/waylay/services/registry/models/function_entity_query.py deleted file mode 100644 index aed827e6..00000000 --- a/waylay-sdk-registry-types/src/waylay/services/registry/models/function_entity_query.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding: utf-8 -"""Waylay Function Registry models. - -This code was generated from the OpenAPI documentation of 'Waylay Function Registry' - -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. - -""" - -from __future__ import annotations - -from typing import List - -from pydantic import ( - ConfigDict, - Field, - StrictStr, -) -from waylay.sdk.api._models import BaseModel as WaylayBaseModel - -from ..models.archive_format import ArchiveFormat - - -class FunctionEntityQuery(WaylayBaseModel): - """Filter on function attributes that do not change across function versions..""" - - name: StrictStr | None = Field( - default=None, - description="Filter on the name of the function. This is case-insensitive and supports wild-cards `?` (any one character) and `*` (any sequence of characters).", - ) - archive_format: List[ArchiveFormat] | None = Field( - default=None, - description="Filter on the archive format of the function.", - alias="archiveFormat", - ) - runtime: List[StrictStr] | None = Field( - default=None, description="Filter on the runtime of the function." - ) - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - extra="ignore", - ) diff --git a/waylay-sdk-registry-types/src/waylay/services/registry/models/function_job_args.py b/waylay-sdk-registry-types/src/waylay/services/registry/models/function_job_args.py index 986b0f0e..9ee507c2 100644 --- a/waylay-sdk-registry-types/src/waylay/services/registry/models/function_job_args.py +++ b/waylay-sdk-registry-types/src/waylay/services/registry/models/function_job_args.py @@ -33,9 +33,8 @@ class FunctionJobArgs(WaylayBaseModel): description="A semantic version with _exactly_ a `major`, `minor` and `patch` specifier. No `pre-release` or `build` identifiers are allowed. See https://semver.org", alias="runtimeVersion", ) - revision: StrictStr | None = Field( - default=None, - description="The revision hash of the current (draft) function revision", + revision: StrictStr = Field( + description="The revision hash of the current (draft) function revision" ) @field_validator("runtime_version") diff --git a/waylay-sdk-registry-types/src/waylay/services/registry/models/function_version_query.py b/waylay-sdk-registry-types/src/waylay/services/registry/models/function_version_query.py deleted file mode 100644 index 62eab715..00000000 --- a/waylay-sdk-registry-types/src/waylay/services/registry/models/function_version_query.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding: utf-8 -"""Waylay Function Registry models. - -This code was generated from the OpenAPI documentation of 'Waylay Function Registry' - -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. - -""" - -from __future__ import annotations - -from typing import List - -from pydantic import ( - ConfigDict, - Field, - StrictStr, -) -from waylay.sdk.api._models import BaseModel as WaylayBaseModel - -from ..models.semantic_version_range import SemanticVersionRange -from ..models.status_filter import StatusFilter -from ..models.timestamp_spec import TimestampSpec - - -class FunctionVersionQuery(WaylayBaseModel): - """Filter on function attributes that can change across function versions. When these query parameters are used, the query is considered a _function version_ listing and no HAL links to latest (_draft_, _published_) versions are included..""" - - version: StrictStr | None = Field( - default=None, - description="Filter on the version of the function (case-sensitive, supports wildcards).", - ) - status: List[StatusFilter] | None = Field( - default=None, - description="Filter on the status of the plug. Filter values with a `-` postfix exclude the status. Use the `any` filter value to include all states. When not specified, a default `undeployed-` filter excludes _undeployed_ functions.", - ) - runtime_version: SemanticVersionRange | None = Field( - default=None, alias="runtimeVersion" - ) - created_by: StrictStr | None = Field( - default=None, - description="Filter on the user that create the plug. You can use the `@me` token to indicate your own plugs.", - alias="createdBy", - ) - updated_by: StrictStr | None = Field( - default=None, - description="Filter on the user that last updated the plug. You can use the `@me` token to indicate your own plugs.", - alias="updatedBy", - ) - created_before: TimestampSpec | None = Field(default=None, alias="createdBefore") - created_after: TimestampSpec | None = Field(default=None, alias="createdAfter") - updated_before: TimestampSpec | None = Field(default=None, alias="updatedBefore") - updated_after: TimestampSpec | None = Field(default=None, alias="updatedAfter") - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - extra="ignore", - ) diff --git a/waylay-sdk-registry-types/src/waylay/services/registry/models/job_type.py b/waylay-sdk-registry-types/src/waylay/services/registry/models/job_type.py index e5b4bb89..8558b51f 100644 --- a/waylay-sdk-registry-types/src/waylay/services/registry/models/job_type.py +++ b/waylay-sdk-registry-types/src/waylay/services/registry/models/job_type.py @@ -24,7 +24,7 @@ class JobType(str, Enum): BATCH = "batch" SCALE = "scale" CLEANUP = "cleanup" - OTHER = "other" + NOTIFY = "notify" def __str__(self) -> str: return str(self.value) diff --git a/waylay-sdk-registry-types/src/waylay/services/registry/models/job_type_notify.py b/waylay-sdk-registry-types/src/waylay/services/registry/models/job_type_notify.py new file mode 100644 index 00000000..b75f8158 --- /dev/null +++ b/waylay-sdk-registry-types/src/waylay/services/registry/models/job_type_notify.py @@ -0,0 +1,23 @@ +# coding: utf-8 +"""Waylay Function Registry models. + +This code was generated from the OpenAPI documentation of 'Waylay Function Registry' + +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. + +""" + +from __future__ import annotations + +from enum import Enum + + +class JobTypeNotify(str, Enum): + """A job to notify that an function version has changed..""" + + NOTIFY = "notify" + + def __str__(self) -> str: + return str(self.value) diff --git a/waylay-sdk-registry-types/src/waylay/services/registry/models/job_type_schema.py b/waylay-sdk-registry-types/src/waylay/services/registry/models/job_type_schema.py index 97f262ea..fd68eb45 100644 --- a/waylay-sdk-registry-types/src/waylay/services/registry/models/job_type_schema.py +++ b/waylay-sdk-registry-types/src/waylay/services/registry/models/job_type_schema.py @@ -22,6 +22,7 @@ from ..models.job_type_batch import JobTypeBatch from ..models.job_type_build import JobTypeBuild from ..models.job_type_deploy import JobTypeDeploy +from ..models.job_type_notify import JobTypeNotify from ..models.job_type_scale import JobTypeScale from ..models.job_type_undeploy import JobTypeUndeploy from ..models.job_type_verify import JobTypeVerify @@ -33,5 +34,6 @@ Annotated[JobTypeUndeploy, ""], Annotated[JobTypeScale, ""], Annotated[JobTypeBatch, ""], + Annotated[JobTypeNotify, ""], ] """JobTypeSchema.""" diff --git a/waylay-sdk-registry-types/src/waylay/services/registry/models/latest_function_versions_query.py b/waylay-sdk-registry-types/src/waylay/services/registry/models/latest_function_versions_query.py index cfdead37..1639b759 100644 --- a/waylay-sdk-registry-types/src/waylay/services/registry/models/latest_function_versions_query.py +++ b/waylay-sdk-registry-types/src/waylay/services/registry/models/latest_function_versions_query.py @@ -25,6 +25,9 @@ from waylay.sdk.api._models import BaseModel as WaylayBaseModel from ..models.archive_format import ArchiveFormat +from ..models.latest_function_versions_query_show_related import ( + LatestFunctionVersionsQueryShowRelated, +) from ..models.semantic_version_range import SemanticVersionRange from ..models.status_filter import StatusFilter from ..models.timestamp_spec import TimestampSpec @@ -111,6 +114,9 @@ class LatestFunctionVersionsQuery(WaylayBaseModel): default=None, description="When `true`, only the latest version per function name is returned. If set to `false`, multiple versions per named function can be returned. Defaults to `true`, except when specific versions are selected with the `nameVersion` filter.", ) + show_related: LatestFunctionVersionsQueryShowRelated | None = Field( + default=None, alias="showRelated" + ) model_config = ConfigDict( populate_by_name=True, diff --git a/waylay-sdk-registry-types/src/waylay/services/registry/models/latest_function_versions_query_show_related.py b/waylay-sdk-registry-types/src/waylay/services/registry/models/latest_function_versions_query_show_related.py new file mode 100644 index 00000000..da402e07 --- /dev/null +++ b/waylay-sdk-registry-types/src/waylay/services/registry/models/latest_function_versions_query_show_related.py @@ -0,0 +1,23 @@ +# coding: utf-8 +"""Waylay Function Registry models. + +This code was generated from the OpenAPI documentation of 'Waylay Function Registry' + +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. + +""" + +from __future__ import annotations + +from enum import Enum + + +class LatestFunctionVersionsQueryShowRelated(str, Enum): + """LatestFunctionVersionsQueryShowRelated.""" + + NONE = "none" + + def __str__(self) -> str: + return str(self.value) diff --git a/waylay-sdk-registry-types/src/waylay/services/registry/models/latest_functions_query.py b/waylay-sdk-registry-types/src/waylay/services/registry/models/latest_functions_query.py index 2e5468f9..bab6622d 100644 --- a/waylay-sdk-registry-types/src/waylay/services/registry/models/latest_functions_query.py +++ b/waylay-sdk-registry-types/src/waylay/services/registry/models/latest_functions_query.py @@ -25,11 +25,13 @@ from waylay.sdk.api._models import BaseModel as WaylayBaseModel from ..models.archive_format import ArchiveFormat +from ..models.show_related_type import ShowRelatedType class LatestFunctionsQuery(WaylayBaseModel): """Request to list latest function versions per named function. A request that only uses these query parameters will include links to the _latest_ draft/published versions..""" + show_related: ShowRelatedType | None = Field(default=None, alias="showRelated") limit: ( Annotated[float, Field(strict=True, ge=0)] | Annotated[int, Field(strict=True, ge=0)] diff --git a/waylay-sdk-registry-types/src/waylay/services/registry/models/latest_models_response_v2.py b/waylay-sdk-registry-types/src/waylay/services/registry/models/latest_models_response_v2.py index 27eee7f3..d8958048 100644 --- a/waylay-sdk-registry-types/src/waylay/services/registry/models/latest_models_response_v2.py +++ b/waylay-sdk-registry-types/src/waylay/services/registry/models/latest_models_response_v2.py @@ -21,8 +21,8 @@ ) from waylay.sdk.api._models import BaseModel as WaylayBaseModel -from ..models.latest_models_response_v2_entities_inner import ( - LatestModelsResponseV2EntitiesInner, +from ..models.entity_with_links_i_kfserving_response_v2 import ( + EntityWithLinksIKfservingResponseV2, ) @@ -38,7 +38,7 @@ class LatestModelsResponseV2(WaylayBaseModel): page: StrictFloat | StrictInt | None = Field( default=None, description="The page number of a paged query result." ) - entities: List[LatestModelsResponseV2EntitiesInner] = Field( + entities: List[EntityWithLinksIKfservingResponseV2] = Field( description="The specification and deployment status of the queried functions" ) diff --git a/waylay-sdk-registry-types/src/waylay/services/registry/models/latest_plug_versions_query.py b/waylay-sdk-registry-types/src/waylay/services/registry/models/latest_plug_versions_query.py index 201f2f49..99ceaf76 100644 --- a/waylay-sdk-registry-types/src/waylay/services/registry/models/latest_plug_versions_query.py +++ b/waylay-sdk-registry-types/src/waylay/services/registry/models/latest_plug_versions_query.py @@ -25,6 +25,9 @@ from waylay.sdk.api._models import BaseModel as WaylayBaseModel from ..models.archive_format import ArchiveFormat +from ..models.latest_function_versions_query_show_related import ( + LatestFunctionVersionsQueryShowRelated, +) from ..models.plug_type import PlugType from ..models.semantic_version_range import SemanticVersionRange from ..models.status_filter import StatusFilter @@ -115,6 +118,9 @@ class LatestPlugVersionsQuery(WaylayBaseModel): default=None, description="When `true`, only the latest version per function name is returned. If set to `false`, multiple versions per named function can be returned. Defaults to `true`, except when specific versions are selected with the `nameVersion` filter.", ) + show_related: LatestFunctionVersionsQueryShowRelated | None = Field( + default=None, alias="showRelated" + ) model_config = ConfigDict( populate_by_name=True, diff --git a/waylay-sdk-registry-types/src/waylay/services/registry/models/latest_plugs_query.py b/waylay-sdk-registry-types/src/waylay/services/registry/models/latest_plugs_query.py index 585239fa..38ed693e 100644 --- a/waylay-sdk-registry-types/src/waylay/services/registry/models/latest_plugs_query.py +++ b/waylay-sdk-registry-types/src/waylay/services/registry/models/latest_plugs_query.py @@ -26,12 +26,14 @@ from ..models.archive_format import ArchiveFormat from ..models.plug_type import PlugType +from ..models.show_related_type import ShowRelatedType class LatestPlugsQuery(WaylayBaseModel): """Latest plug versions listing query with latest links. A request that only uses these query parameters will include links to the _latest_ draft/published versions of the plug..""" type: PlugType | None = None + show_related: ShowRelatedType | None = Field(default=None, alias="showRelated") limit: ( Annotated[float, Field(strict=True, ge=0)] | Annotated[int, Field(strict=True, ge=0)] diff --git a/waylay-sdk-registry-types/src/waylay/services/registry/models/latest_plugs_response_v2.py b/waylay-sdk-registry-types/src/waylay/services/registry/models/latest_plugs_response_v2.py index 2d9e3f2a..bdbd7186 100644 --- a/waylay-sdk-registry-types/src/waylay/services/registry/models/latest_plugs_response_v2.py +++ b/waylay-sdk-registry-types/src/waylay/services/registry/models/latest_plugs_response_v2.py @@ -21,9 +21,7 @@ ) from waylay.sdk.api._models import BaseModel as WaylayBaseModel -from ..models.latest_plugs_response_v2_entities_inner import ( - LatestPlugsResponseV2EntitiesInner, -) +from ..models.entity_with_links_i_plug_response_v2 import EntityWithLinksIPlugResponseV2 class LatestPlugsResponseV2(WaylayBaseModel): @@ -38,7 +36,7 @@ class LatestPlugsResponseV2(WaylayBaseModel): page: StrictFloat | StrictInt | None = Field( default=None, description="The page number of a paged query result." ) - entities: List[LatestPlugsResponseV2EntitiesInner] = Field( + entities: List[EntityWithLinksIPlugResponseV2] = Field( description="The specification and deployment status of the queried functions" ) diff --git a/waylay-sdk-registry-types/src/waylay/services/registry/models/latest_webscripts_response_v2.py b/waylay-sdk-registry-types/src/waylay/services/registry/models/latest_webscripts_response_v2.py index ec8996e0..55c4bc9b 100644 --- a/waylay-sdk-registry-types/src/waylay/services/registry/models/latest_webscripts_response_v2.py +++ b/waylay-sdk-registry-types/src/waylay/services/registry/models/latest_webscripts_response_v2.py @@ -21,8 +21,8 @@ ) from waylay.sdk.api._models import BaseModel as WaylayBaseModel -from ..models.latest_webscripts_response_v2_entities_inner import ( - LatestWebscriptsResponseV2EntitiesInner, +from ..models.entity_with_links_i_webscript_response_with_invoke_link_v2 import ( + EntityWithLinksIWebscriptResponseWithInvokeLinkV2, ) @@ -38,7 +38,7 @@ class LatestWebscriptsResponseV2(WaylayBaseModel): page: StrictFloat | StrictInt | None = Field( default=None, description="The page number of a paged query result." ) - entities: List[LatestWebscriptsResponseV2EntitiesInner] = Field( + entities: List[EntityWithLinksIWebscriptResponseWithInvokeLinkV2] = Field( description="The specification and deployment status of the queried functions" ) diff --git a/waylay-sdk-registry-types/src/waylay/services/registry/models/named_function_versions_query.py b/waylay-sdk-registry-types/src/waylay/services/registry/models/named_function_versions_query.py deleted file mode 100644 index 0bdb30e2..00000000 --- a/waylay-sdk-registry-types/src/waylay/services/registry/models/named_function_versions_query.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding: utf-8 -"""Waylay Function Registry models. - -This code was generated from the OpenAPI documentation of 'Waylay Function Registry' - -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. - -""" - -from __future__ import annotations - -from typing import List - -from pydantic import ( - ConfigDict, - Field, - StrictBool, - StrictStr, -) -from typing_extensions import ( - Annotated, # >=3.11 -) -from waylay.sdk.api._models import BaseModel as WaylayBaseModel - -from ..models.archive_format import ArchiveFormat -from ..models.semantic_version_range import SemanticVersionRange -from ..models.status_filter import StatusFilter -from ..models.timestamp_spec import TimestampSpec - - -class NamedFunctionVersionsQuery(WaylayBaseModel): - """Named function versions listing query..""" - - limit: ( - Annotated[float, Field(strict=True, ge=0)] - | Annotated[int, Field(strict=True, ge=0)] - | None - ) = Field( - default=None, - description="The maximum number of items to be return from this query. Has a deployment-defined default and maximum value.", - ) - page: ( - Annotated[float, Field(strict=True, ge=0)] - | Annotated[int, Field(strict=True, ge=0)] - | None - ) = Field( - default=None, - description="The number of pages to skip when returning result to this query.", - ) - deprecated: StrictBool | None = Field( - default=None, description="Filter on the deprecation status of the function." - ) - draft: StrictBool | None = Field( - default=None, description="Filter on the draft status of the function." - ) - version: StrictStr | None = Field( - default=None, - description="Filter on the version of the function (case-sensitive, supports wildcards).", - ) - status: List[StatusFilter] | None = Field( - default=None, - description="Filter on the status of the plug. Filter values with a `-` postfix exclude the status. Use the `any` filter value to include all states. When not specified, a default `undeployed-` filter excludes _undeployed_ functions.", - ) - runtime_version: SemanticVersionRange | None = Field( - default=None, alias="runtimeVersion" - ) - created_by: StrictStr | None = Field( - default=None, - description="Filter on the user that create the plug. You can use the `@me` token to indicate your own plugs.", - alias="createdBy", - ) - updated_by: StrictStr | None = Field( - default=None, - description="Filter on the user that last updated the plug. You can use the `@me` token to indicate your own plugs.", - alias="updatedBy", - ) - created_before: TimestampSpec | None = Field(default=None, alias="createdBefore") - created_after: TimestampSpec | None = Field(default=None, alias="createdAfter") - updated_before: TimestampSpec | None = Field(default=None, alias="updatedBefore") - updated_after: TimestampSpec | None = Field(default=None, alias="updatedAfter") - archive_format: List[ArchiveFormat] | None = Field( - default=None, - description="Filter on the archive format of the function.", - alias="archiveFormat", - ) - runtime: List[StrictStr] | None = Field( - default=None, description="Filter on the runtime of the function." - ) - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - extra="ignore", - ) diff --git a/waylay-sdk-registry-types/src/waylay/services/registry/models/named_versions_filter.py b/waylay-sdk-registry-types/src/waylay/services/registry/models/named_versions_filter.py deleted file mode 100644 index 2a04f723..00000000 --- a/waylay-sdk-registry-types/src/waylay/services/registry/models/named_versions_filter.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 -"""Waylay Function Registry models. - -This code was generated from the OpenAPI documentation of 'Waylay Function Registry' - -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. - -""" - -from __future__ import annotations - -from typing import List - -from pydantic import ( - ConfigDict, - Field, -) -from typing_extensions import ( - Annotated, # >=3.11 -) -from waylay.sdk.api._models import BaseModel as WaylayBaseModel - - -class NamedVersionsFilter(WaylayBaseModel): - """NamedVersionsFilter.""" - - name_version: List[Annotated[str, Field(strict=True)]] | None = Field( - default=None, - description="Filter on exact `{name}@{version}` functions. Using this filter implies a `latest=false` default, returning multiple versions of the same named versions if they are filtered.", - alias="nameVersion", - ) - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - extra="ignore", - ) diff --git a/waylay-sdk-registry-types/src/waylay/services/registry/models/plug_type_query.py b/waylay-sdk-registry-types/src/waylay/services/registry/models/notify_result.py similarity index 75% rename from waylay-sdk-registry-types/src/waylay/services/registry/models/plug_type_query.py rename to waylay-sdk-registry-types/src/waylay/services/registry/models/notify_result.py index c2260078..67fdae05 100644 --- a/waylay-sdk-registry-types/src/waylay/services/registry/models/plug_type_query.py +++ b/waylay-sdk-registry-types/src/waylay/services/registry/models/notify_result.py @@ -16,13 +16,13 @@ ) from waylay.sdk.api._models import BaseModel as WaylayBaseModel -from ..models.plug_type import PlugType +from ..models.request_operation import RequestOperation -class PlugTypeQuery(WaylayBaseModel): - """PlugTypeQuery.""" +class NotifyResult(WaylayBaseModel): + """The result data for a change notification..""" - type: PlugType | None = None + operation: RequestOperation model_config = ConfigDict( populate_by_name=True, diff --git a/waylay-sdk-registry-types/src/waylay/services/registry/models/paging_query.py b/waylay-sdk-registry-types/src/waylay/services/registry/models/paging_query.py deleted file mode 100644 index abcf73c0..00000000 --- a/waylay-sdk-registry-types/src/waylay/services/registry/models/paging_query.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding: utf-8 -"""Waylay Function Registry models. - -This code was generated from the OpenAPI documentation of 'Waylay Function Registry' - -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. - -""" - -from __future__ import annotations - -from pydantic import ( - ConfigDict, - Field, -) -from typing_extensions import ( - Annotated, # >=3.11 -) -from waylay.sdk.api._models import BaseModel as WaylayBaseModel - - -class PagingQuery(WaylayBaseModel): - """PagingQuery.""" - - limit: ( - Annotated[float, Field(strict=True, ge=0)] - | Annotated[int, Field(strict=True, ge=0)] - | None - ) = Field( - default=None, - description="The maximum number of items to be return from this query. Has a deployment-defined default and maximum value.", - ) - page: ( - Annotated[float, Field(strict=True, ge=0)] - | Annotated[int, Field(strict=True, ge=0)] - | None - ) = Field( - default=None, - description="The number of pages to skip when returning result to this query.", - ) - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - extra="ignore", - ) diff --git a/waylay-sdk-registry-types/src/waylay/services/registry/models/plug_delete_query.py b/waylay-sdk-registry-types/src/waylay/services/registry/models/plug_delete_query.py deleted file mode 100644 index 3da29c20..00000000 --- a/waylay-sdk-registry-types/src/waylay/services/registry/models/plug_delete_query.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 -"""Waylay Function Registry models. - -This code was generated from the OpenAPI documentation of 'Waylay Function Registry' - -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. - -""" - -from __future__ import annotations - -from pydantic import ( - ConfigDict, - Field, - StrictBool, -) -from waylay.sdk.api._models import BaseModel as WaylayBaseModel - - -class PlugDeleteQuery(WaylayBaseModel): - """PlugDeleteQuery.""" - - force: StrictBool | None = Field( - default=None, - description="If true, the plug version(s) will be undeployed and removed. Otherwise, the plug version(s) will only be deprecated, i.e removed from regular listings.", - ) - undeploy: StrictBool | None = Field( - default=None, - description="If `true`, the `DELETE` operation * undeploys the (openfaas) function for the plug: it becomes no longer available for invocation. * does NOT remove the plug from registry: it stays in an `undeployed` status. All assets and definitions are retained, so the plug can be restored later with a _rebuild_ action. If `false`, the `DELETE` operation * _only_ marks the plug version(s) as _deprecated_: the plug remains active but is removed from the default listings. This also applies to _draft_ versions. This parameter is incompatible with `force=true`. If not set the default behaviour applies: * _draft_ versions are _undeployed_ and _removed_ from registry. * non-_draft_ versions are marked _deprecated_ only.", - ) - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - extra="ignore", - ) diff --git a/waylay-sdk-registry-types/src/waylay/services/registry/models/publish_function_query.py b/waylay-sdk-registry-types/src/waylay/services/registry/models/publish_function_query.py index 908b6b7c..e6764d58 100644 --- a/waylay-sdk-registry-types/src/waylay/services/registry/models/publish_function_query.py +++ b/waylay-sdk-registry-types/src/waylay/services/registry/models/publish_function_query.py @@ -25,10 +25,18 @@ class PublishFunctionQuery(WaylayBaseModel): """PublishFunctionQuery.""" + chown: StrictBool | None = Field( + default=False, + description="If set, ownership of the draft function is transferred to the current user.", + ) comment: StrictStr | None = Field( default=None, description="An optional user-specified comment corresponding to the operation.", ) + author: StrictStr | None = Field( + default=None, + description="Optionally changes the author metadata when updating a function.", + ) deprecate_previous: DeprecatePreviousPolicy | None = Field( default=None, alias="deprecatePrevious" ) diff --git a/waylay-sdk-registry-types/src/waylay/services/registry/models/rebuild_query_params.py b/waylay-sdk-registry-types/src/waylay/services/registry/models/rebuild_query_params.py deleted file mode 100644 index 6fc91f83..00000000 --- a/waylay-sdk-registry-types/src/waylay/services/registry/models/rebuild_query_params.py +++ /dev/null @@ -1,77 +0,0 @@ -# coding: utf-8 -"""Waylay Function Registry models. - -This code was generated from the OpenAPI documentation of 'Waylay Function Registry' - -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. - -""" - -from __future__ import annotations - -import re - -from pydantic import ( - ConfigDict, - Field, - StrictBool, - field_validator, -) -from typing_extensions import ( - Annotated, # >=3.11 -) -from waylay.sdk.api._models import BaseModel as WaylayBaseModel - -from ..models.rebuild_policy import RebuildPolicy - - -class RebuildQueryParams(WaylayBaseModel): - """RebuildQueryParams.""" - - upgrade: RebuildPolicy | None = None - dry_run: StrictBool | None = Field( - default=None, - description="If set to true, checks whether rebuild jobs are needed, but do not start any jobs.", - alias="dryRun", - ) - force_version: Annotated[str, Field(strict=True)] | None = Field( - default=None, - description="A semantic version with _exactly_ a `major`, `minor` and `patch` specifier. No `pre-release` or `build` identifiers are allowed. See https://semver.org", - alias="forceVersion", - ) - ignore_checks: StrictBool | None = Field( - default=None, - description="If set to true, checks that normally prevent a rebuild are overriden. These checks include: * function state in `pending`, `running`, `failed` or `undeployed` * backoff period due to recent failures * usage of deprecated dependencies * running jobs on entity * the `dryRun` option", - alias="ignoreChecks", - ) - scale_to_zero: StrictBool | None = Field( - default=None, - description="Indicates whether the function needs to be scaled down after successful (re-)deployment. If not set, the function is scaled to zero only if it was not active before this command.", - alias="scaleToZero", - ) - skip_rebuild: StrictBool | None = Field( - default=None, - description="If set, the function will not be rebuild. Always uses the current runtime version when re-deploying/re-verifying the function.", - alias="skipRebuild", - ) - - @field_validator("force_version") - @classmethod - def force_version_validate_regular_expression(cls, value): - """Validate the regular expression.""" - if value is None: - return value - if not re.match(r"^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)$", value): - raise ValueError( - r"must validate the regular expression /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)$/" - ) - return value - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - extra="ignore", - ) diff --git a/waylay-sdk-registry-types/src/waylay/services/registry/models/rebuild_query_v2.py b/waylay-sdk-registry-types/src/waylay/services/registry/models/rebuild_query_v2.py index 2d15b1a5..a0b2d3ed 100644 --- a/waylay-sdk-registry-types/src/waylay/services/registry/models/rebuild_query_v2.py +++ b/waylay-sdk-registry-types/src/waylay/services/registry/models/rebuild_query_v2.py @@ -31,6 +31,11 @@ class RebuildQueryV2(WaylayBaseModel): """RebuildQueryV2.""" + scale_to_zero: StrictBool | None = Field( + default=None, + description="Indicates whether the function needs to be scaled down after successful verification. If not set, the function is scaled to zero only if it was not active before this command.", + alias="scaleToZero", + ) comment: StrictStr | None = Field( default=None, description="An optional user-specified comment corresponding to the operation.", @@ -56,11 +61,6 @@ class RebuildQueryV2(WaylayBaseModel): description="If set to true, checks that normally prevent a rebuild are overriden. These checks include: * function state in `pending`, `running`, `failed` or `undeployed` * backoff period due to recent failures * usage of deprecated dependencies * running jobs on entity * the `dryRun` option", alias="ignoreChecks", ) - scale_to_zero: StrictBool | None = Field( - default=None, - description="Indicates whether the function needs to be scaled down after successful (re-)deployment. If not set, the function is scaled to zero only if it was not active before this command.", - alias="scaleToZero", - ) skip_rebuild: StrictBool | None = Field( default=None, description="If set, the function will not be rebuild. Always uses the current runtime version when re-deploying/re-verifying the function.", diff --git a/waylay-sdk-registry-types/src/waylay/services/registry/models/update_comment.py b/waylay-sdk-registry-types/src/waylay/services/registry/models/registry_error_response.py similarity index 66% rename from waylay-sdk-registry-types/src/waylay/services/registry/models/update_comment.py rename to waylay-sdk-registry-types/src/waylay/services/registry/models/registry_error_response.py index 0de81a7d..7a8ba5d7 100644 --- a/waylay-sdk-registry-types/src/waylay/services/registry/models/update_comment.py +++ b/waylay-sdk-registry-types/src/waylay/services/registry/models/registry_error_response.py @@ -11,21 +11,25 @@ from __future__ import annotations +from typing import Dict + from pydantic import ( ConfigDict, Field, + StrictFloat, + StrictInt, StrictStr, ) from waylay.sdk.api._models import BaseModel as WaylayBaseModel -class UpdateComment(WaylayBaseModel): - """UpdateComment.""" +class RegistryErrorResponse(WaylayBaseModel): + """RegistryErrorResponse.""" - comment: StrictStr | None = Field( - default=None, - description="An optional user-specified comment corresponding to the operation.", - ) + error: StrictStr + code: StrictStr + status_code: StrictFloat | StrictInt = Field(alias="statusCode") + data: Dict[str, StrictStr] | None = None model_config = ConfigDict( populate_by_name=True, diff --git a/waylay-sdk-registry-types/src/waylay/services/registry/models/request_deploy_query.py b/waylay-sdk-registry-types/src/waylay/services/registry/models/request_deploy_query.py new file mode 100644 index 00000000..0567c9b1 --- /dev/null +++ b/waylay-sdk-registry-types/src/waylay/services/registry/models/request_deploy_query.py @@ -0,0 +1,35 @@ +# coding: utf-8 +"""Waylay Function Registry models. + +This code was generated from the OpenAPI documentation of 'Waylay Function Registry' + +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. + +""" + +from __future__ import annotations + +from pydantic import ( + ConfigDict, + Field, + StrictBool, +) +from waylay.sdk.api._models import BaseModel as WaylayBaseModel + + +class RequestDeployQuery(WaylayBaseModel): + """RequestDeployQuery.""" + + deploy: StrictBool | None = Field( + default=True, + description="Indicates that a function should be _deployed_ when its assets are valid. * If `true` (default), jobs to build and deploy the function will be initiated after it is checked that the assets are valid. Invalid assets lead to a validation error, and the function and its assets are not created or updated. * If `false`, the uploaded assets are stored and the function is created/updated in `registered` state. Asset validation errors are only returned as warning, and stored as `failureReason` on the function entity. Use an _asset update_ or _rebuild_ to initiate a build and deploy at a later stage.", + ) + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + extra="ignore", + ) diff --git a/waylay-sdk-registry-types/src/waylay/services/registry/models/scale_args.py b/waylay-sdk-registry-types/src/waylay/services/registry/models/scale_args.py index 3869acd2..c6028aaf 100644 --- a/waylay-sdk-registry-types/src/waylay/services/registry/models/scale_args.py +++ b/waylay-sdk-registry-types/src/waylay/services/registry/models/scale_args.py @@ -39,9 +39,8 @@ class ScaleArgs(WaylayBaseModel): description="A semantic version with _exactly_ a `major`, `minor` and `patch` specifier. No `pre-release` or `build` identifiers are allowed. See https://semver.org", alias="runtimeVersion", ) - revision: StrictStr | None = Field( - default=None, - description="The revision hash of the current (draft) function revision", + revision: StrictStr = Field( + description="The revision hash of the current (draft) function revision" ) replicas: StrictFloat | StrictInt = Field(description="Number of target replicas") diff --git a/waylay-sdk-registry-types/src/waylay/services/registry/models/show_related_type.py b/waylay-sdk-registry-types/src/waylay/services/registry/models/show_related_type.py new file mode 100644 index 00000000..7e5cecd2 --- /dev/null +++ b/waylay-sdk-registry-types/src/waylay/services/registry/models/show_related_type.py @@ -0,0 +1,25 @@ +# coding: utf-8 +"""Waylay Function Registry models. + +This code was generated from the OpenAPI documentation of 'Waylay Function Registry' + +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. + +""" + +from __future__ import annotations + +from enum import Enum + + +class ShowRelatedType(str, Enum): + """ShowRelatedType.""" + + EMBED = "embed" + LINK = "link" + NONE = "none" + + def __str__(self) -> str: + return str(self.value) diff --git a/waylay-sdk-registry-types/src/waylay/services/registry/models/status_exclude.py b/waylay-sdk-registry-types/src/waylay/services/registry/models/status_exclude.py new file mode 100644 index 00000000..5e111da5 --- /dev/null +++ b/waylay-sdk-registry-types/src/waylay/services/registry/models/status_exclude.py @@ -0,0 +1,30 @@ +# coding: utf-8 +"""Waylay Function Registry models. + +This code was generated from the OpenAPI documentation of 'Waylay Function Registry' + +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. + +""" + +from __future__ import annotations + +from enum import Enum + + +class StatusExclude(str, Enum): + """Any status value with a `-` postfix appended, excludes that status as a filter..""" + + REGISTERED_MINUS = "registered-" + RUNNING_MINUS = "running-" + PENDING_MINUS = "pending-" + DEPLOYED_MINUS = "deployed-" + UNHEALTHY_MINUS = "unhealthy-" + FAILED_MINUS = "failed-" + UNDEPLOYING_MINUS = "undeploying-" + UNDEPLOYED_MINUS = "undeployed-" + + def __str__(self) -> str: + return str(self.value) diff --git a/waylay-sdk-registry-types/src/waylay/services/registry/models/status_filter.py b/waylay-sdk-registry-types/src/waylay/services/registry/models/status_filter.py index fd07492d..0942eff3 100644 --- a/waylay-sdk-registry-types/src/waylay/services/registry/models/status_filter.py +++ b/waylay-sdk-registry-types/src/waylay/services/registry/models/status_filter.py @@ -20,14 +20,10 @@ ) from ..models.status_any import StatusAny +from ..models.status_exclude import StatusExclude from ..models.status_include import StatusInclude StatusFilter = Union[ - Annotated[StatusInclude, ""], - Annotated[ - str, - "Any status value with a `-` postfix appended, excludes that status as a filter.", - ], - Annotated[StatusAny, ""], + Annotated[StatusInclude, ""], Annotated[StatusExclude, ""], Annotated[StatusAny, ""] ] """Inclusion or exclusion filter on the `status` property..""" diff --git a/waylay-sdk-registry-types/src/waylay/services/registry/models/undeploy_args.py b/waylay-sdk-registry-types/src/waylay/services/registry/models/undeploy_args.py index 7b2e548c..df5c179f 100644 --- a/waylay-sdk-registry-types/src/waylay/services/registry/models/undeploy_args.py +++ b/waylay-sdk-registry-types/src/waylay/services/registry/models/undeploy_args.py @@ -38,9 +38,8 @@ class UndeployArgs(WaylayBaseModel): description="A semantic version with _exactly_ a `major`, `minor` and `patch` specifier. No `pre-release` or `build` identifiers are allowed. See https://semver.org", alias="runtimeVersion", ) - revision: StrictStr | None = Field( - default=None, - description="The revision hash of the current (draft) function revision", + revision: StrictStr = Field( + description="The revision hash of the current (draft) function revision" ) is_native_plug: StrictBool = Field( description="If true, the function is not expected to be deployed on openfaas.", diff --git a/waylay-sdk-registry-types/src/waylay/services/registry/models/update_draft_query.py b/waylay-sdk-registry-types/src/waylay/services/registry/models/update_draft_query.py index 76f27d9e..f51ac936 100644 --- a/waylay-sdk-registry-types/src/waylay/services/registry/models/update_draft_query.py +++ b/waylay-sdk-registry-types/src/waylay/services/registry/models/update_draft_query.py @@ -23,18 +23,32 @@ class UpdateDraftQuery(WaylayBaseModel): """UpdateDraftQuery.""" + scale_to_zero: StrictBool | None = Field( + default=False, + description="If set to true, after successful deployment, the deployed function will be scaled to zero. This saves computing resources when the function is not to be used immediately.", + alias="scaleToZero", + ) + deploy: StrictBool | None = Field( + default=True, + description="Indicates that a function should be _deployed_ when its assets are valid. * If `true` (default), jobs to build and deploy the function will be initiated after it is checked that the assets are valid. Invalid assets lead to a validation error, and the function and its assets are not created or updated. * If `false`, the uploaded assets are stored and the function is created/updated in `registered` state. Asset validation errors are only returned as warning, and stored as `failureReason` on the function entity. Use an _asset update_ or _rebuild_ to initiate a build and deploy at a later stage.", + ) + chown: StrictBool | None = Field( + default=False, + description="If set, ownership of the draft function is transferred to the current user.", + ) comment: StrictStr | None = Field( default=None, description="An optional user-specified comment corresponding to the operation.", ) + author: StrictStr | None = Field( + default=None, + description="Optionally changes the author metadata when updating a function.", + ) var_async: StrictBool | None = Field( default=True, description="Unless this is set to false, the server will start the required job actions asynchronously and return a 202 Accepted response. If false the request will block until the job actions are completed, or a timeout occurs.", alias="async", ) - chown: StrictBool = Field( - description="If set, ownership of the draft function is transferred to the current user." - ) model_config = ConfigDict( populate_by_name=True, diff --git a/waylay-sdk-registry-types/src/waylay/services/registry/models/verify_args.py b/waylay-sdk-registry-types/src/waylay/services/registry/models/verify_args.py index eeac3b04..162509a7 100644 --- a/waylay-sdk-registry-types/src/waylay/services/registry/models/verify_args.py +++ b/waylay-sdk-registry-types/src/waylay/services/registry/models/verify_args.py @@ -37,9 +37,8 @@ class VerifyArgs(WaylayBaseModel): description="A semantic version with _exactly_ a `major`, `minor` and `patch` specifier. No `pre-release` or `build` identifiers are allowed. See https://semver.org", alias="runtimeVersion", ) - revision: StrictStr | None = Field( - default=None, - description="The revision hash of the current (draft) function revision", + revision: StrictStr = Field( + description="The revision hash of the current (draft) function revision" ) @field_validator("runtime_version") diff --git a/waylay-sdk-registry-types/src/waylay/services/registry/models/versions_query.py b/waylay-sdk-registry-types/src/waylay/services/registry/models/versions_query.py deleted file mode 100644 index eff21e33..00000000 --- a/waylay-sdk-registry-types/src/waylay/services/registry/models/versions_query.py +++ /dev/null @@ -1,120 +0,0 @@ -# coding: utf-8 -"""Waylay Function Registry models. - -This code was generated from the OpenAPI documentation of 'Waylay Function Registry' - -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. - -""" - -from __future__ import annotations - -from typing import List - -from pydantic import ( - ConfigDict, - Field, - StrictBool, - StrictStr, -) -from typing_extensions import ( - Annotated, # >=3.11 -) -from waylay.sdk.api._models import BaseModel as WaylayBaseModel - -from ..models.archive_format import ArchiveFormat -from ..models.semantic_version_range import SemanticVersionRange -from ..models.status_filter import StatusFilter -from ..models.timestamp_spec import TimestampSpec - - -class VersionsQuery(WaylayBaseModel): - """Function versions paged query.""" - - limit: ( - Annotated[float, Field(strict=True, ge=0)] - | Annotated[int, Field(strict=True, ge=0)] - | None - ) = Field( - default=None, - description="The maximum number of items to be return from this query. Has a deployment-defined default and maximum value.", - ) - page: ( - Annotated[float, Field(strict=True, ge=0)] - | Annotated[int, Field(strict=True, ge=0)] - | None - ) = Field( - default=None, - description="The number of pages to skip when returning result to this query.", - ) - endpoint: StrictStr | None = Field( - default=None, - description="Filter on the openfaas endpoint. This is case-insensitive and supports wild-cards `?` (any one character) and `*` (any sequence of characters).", - ) - image_name: StrictStr | None = Field( - default=None, - description="Filter on the container image name. This is case-insensitive and supports wild-cards `?` (any one character) and `*` (any sequence of characters).", - alias="imageName", - ) - storage_location: StrictStr | None = Field( - default=None, - description="Filter on the storageLocation. This is case-insensitive and supports wild-cards `?` (any one character) and `*` (any sequence of characters).", - alias="storageLocation", - ) - deprecated: StrictBool | None = Field( - default=None, description="Filter on the deprecation status of the function." - ) - draft: StrictBool | None = Field( - default=None, description="Filter on the draft status of the function." - ) - name_version: List[Annotated[str, Field(strict=True)]] | None = Field( - default=None, - description="Filter on exact `{name}@{version}` functions. Using this filter implies a `latest=false` default, returning multiple versions of the same named versions if they are filtered.", - alias="nameVersion", - ) - version: StrictStr | None = Field( - default=None, - description="Filter on the version of the function (case-sensitive, supports wildcards).", - ) - status: List[StatusFilter] | None = Field( - default=None, - description="Filter on the status of the plug. Filter values with a `-` postfix exclude the status. Use the `any` filter value to include all states. When not specified, a default `undeployed-` filter excludes _undeployed_ functions.", - ) - runtime_version: SemanticVersionRange | None = Field( - default=None, alias="runtimeVersion" - ) - created_by: StrictStr | None = Field( - default=None, - description="Filter on the user that create the plug. You can use the `@me` token to indicate your own plugs.", - alias="createdBy", - ) - updated_by: StrictStr | None = Field( - default=None, - description="Filter on the user that last updated the plug. You can use the `@me` token to indicate your own plugs.", - alias="updatedBy", - ) - created_before: TimestampSpec | None = Field(default=None, alias="createdBefore") - created_after: TimestampSpec | None = Field(default=None, alias="createdAfter") - updated_before: TimestampSpec | None = Field(default=None, alias="updatedBefore") - updated_after: TimestampSpec | None = Field(default=None, alias="updatedAfter") - name: StrictStr | None = Field( - default=None, - description="Filter on the name of the function. This is case-insensitive and supports wild-cards `?` (any one character) and `*` (any sequence of characters).", - ) - archive_format: List[ArchiveFormat] | None = Field( - default=None, - description="Filter on the archive format of the function.", - alias="archiveFormat", - ) - runtime: List[StrictStr] | None = Field( - default=None, description="Filter on the runtime of the function." - ) - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - extra="ignore", - ) diff --git a/waylay-sdk-registry-types/src/waylay/services/registry/models/deprecated_draft_filter.py b/waylay-sdk-registry-types/src/waylay/services/registry/models/with_embedded_alt_versions_i_kfserving_response_v2.py similarity index 61% rename from waylay-sdk-registry-types/src/waylay/services/registry/models/deprecated_draft_filter.py rename to waylay-sdk-registry-types/src/waylay/services/registry/models/with_embedded_alt_versions_i_kfserving_response_v2.py index c344e6d4..c289cb26 100644 --- a/waylay-sdk-registry-types/src/waylay/services/registry/models/deprecated_draft_filter.py +++ b/waylay-sdk-registry-types/src/waylay/services/registry/models/with_embedded_alt_versions_i_kfserving_response_v2.py @@ -14,19 +14,19 @@ from pydantic import ( ConfigDict, Field, - StrictBool, ) from waylay.sdk.api._models import BaseModel as WaylayBaseModel +from ..models.alt_embedded_version_i_kfserving_response_v2 import ( + AltEmbeddedVersionIKfservingResponseV2, +) -class DeprecatedDraftFilter(WaylayBaseModel): - """DeprecatedDraftFilter.""" - deprecated: StrictBool | None = Field( - default=None, description="Filter on the deprecation status of the function." - ) - draft: StrictBool | None = Field( - default=None, description="Filter on the draft status of the function." +class WithEmbeddedAltVersionsIKfservingResponseV2(WaylayBaseModel): + """WithEmbeddedAltVersionsIKfservingResponseV2.""" + + embedded: AltEmbeddedVersionIKfservingResponseV2 | None = Field( + default=None, alias="_embedded" ) model_config = ConfigDict( diff --git a/waylay-sdk-registry-types/src/waylay/services/registry/models/dry_run_query.py b/waylay-sdk-registry-types/src/waylay/services/registry/models/with_embedded_alt_versions_i_plug_response_v2.py similarity index 63% rename from waylay-sdk-registry-types/src/waylay/services/registry/models/dry_run_query.py rename to waylay-sdk-registry-types/src/waylay/services/registry/models/with_embedded_alt_versions_i_plug_response_v2.py index cb1a94d0..108f8c86 100644 --- a/waylay-sdk-registry-types/src/waylay/services/registry/models/dry_run_query.py +++ b/waylay-sdk-registry-types/src/waylay/services/registry/models/with_embedded_alt_versions_i_plug_response_v2.py @@ -14,18 +14,19 @@ from pydantic import ( ConfigDict, Field, - StrictBool, ) from waylay.sdk.api._models import BaseModel as WaylayBaseModel +from ..models.alt_embedded_version_i_plug_response_v2 import ( + AltEmbeddedVersionIPlugResponseV2, +) + -class DryRunQuery(WaylayBaseModel): - """DryRunQuery.""" +class WithEmbeddedAltVersionsIPlugResponseV2(WaylayBaseModel): + """WithEmbeddedAltVersionsIPlugResponseV2.""" - dry_run: StrictBool | None = Field( - default=None, - description="If set to true, validates the deployment conditions, but does not change anything.", - alias="dryRun", + embedded: AltEmbeddedVersionIPlugResponseV2 | None = Field( + default=None, alias="_embedded" ) model_config = ConfigDict( diff --git a/waylay-sdk-registry-types/src/waylay/services/registry/models/limit_query.py b/waylay-sdk-registry-types/src/waylay/services/registry/models/with_embedded_alt_versions_i_webscript_response_with_invoke_link_v2.py similarity index 57% rename from waylay-sdk-registry-types/src/waylay/services/registry/models/limit_query.py rename to waylay-sdk-registry-types/src/waylay/services/registry/models/with_embedded_alt_versions_i_webscript_response_with_invoke_link_v2.py index ce0b21f1..bc9a4c72 100644 --- a/waylay-sdk-registry-types/src/waylay/services/registry/models/limit_query.py +++ b/waylay-sdk-registry-types/src/waylay/services/registry/models/with_embedded_alt_versions_i_webscript_response_with_invoke_link_v2.py @@ -15,22 +15,18 @@ ConfigDict, Field, ) -from typing_extensions import ( - Annotated, # >=3.11 -) from waylay.sdk.api._models import BaseModel as WaylayBaseModel +from ..models.alt_embedded_version_i_webscript_response_with_invoke_link_v2 import ( + AltEmbeddedVersionIWebscriptResponseWithInvokeLinkV2, +) + -class LimitQuery(WaylayBaseModel): - """LimitQuery.""" +class WithEmbeddedAltVersionsIWebscriptResponseWithInvokeLinkV2(WaylayBaseModel): + """WithEmbeddedAltVersionsIWebscriptResponseWithInvokeLinkV2.""" - limit: ( - Annotated[float, Field(strict=True, ge=0)] - | Annotated[int, Field(strict=True, ge=0)] - | None - ) = Field( - default=None, - description="The maximum number of items to be return from this query. Has a deployment-defined default and maximum value.", + embedded: AltEmbeddedVersionIWebscriptResponseWithInvokeLinkV2 | None = Field( + default=None, alias="_embedded" ) model_config = ConfigDict( diff --git a/waylay-sdk-registry-types/src/waylay/services/registry/queries/__init__.py b/waylay-sdk-registry-types/src/waylay/services/registry/queries/__init__.py index 5d5aace8..267dbc30 100644 --- a/waylay-sdk-registry-types/src/waylay/services/registry/queries/__init__.py +++ b/waylay-sdk-registry-types/src/waylay/services/registry/queries/__init__.py @@ -3,7 +3,7 @@ This code was generated from the OpenAPI documentation of 'Waylay Function Registry' -version: 2.12.4 +version: 2.13.0 V2 API to build and deploy Waylay functions (plugs, webscripts, BYOML models). diff --git a/waylay-sdk-registry-types/src/waylay/services/registry/queries/webscript_functions_api.py b/waylay-sdk-registry-types/src/waylay/services/registry/queries/models_api.py similarity index 79% rename from waylay-sdk-registry-types/src/waylay/services/registry/queries/webscript_functions_api.py rename to waylay-sdk-registry-types/src/waylay/services/registry/queries/models_api.py index e70e2f27..33c9a245 100644 --- a/waylay-sdk-registry-types/src/waylay/services/registry/queries/webscript_functions_api.py +++ b/waylay-sdk-registry-types/src/waylay/services/registry/queries/models_api.py @@ -29,30 +29,65 @@ from ..models.job_state_result import JobStateResult from ..models.job_type_schema import JobTypeSchema from ..models.rebuild_policy import RebuildPolicy +from ..models.show_related_type import ShowRelatedType from ..models.status_filter import StatusFilter def _create_query_alias_for(field_name: str) -> str: + if field_name == "deploy": + return "deploy" + if field_name == "author": + return "author" + if field_name == "comment": + return "comment" + if field_name == "scale_to_zero": + return "scaleToZero" if field_name == "deprecate_previous": return "deprecatePrevious" if field_name == "dry_run": return "dryRun" if field_name == "var_async": return "async" - if field_name == "scale_to_zero": - return "scaleToZero" if field_name == "version": return "version" if field_name == "name": return "name" if field_name == "draft": return "draft" + if field_name == "runtime": + return "runtime" + if field_name == "copy_from": + return "copy" return field_name class CreateQuery(WaylayBaseModel): """Model for `create` query parameters.""" + deploy: Annotated[ + StrictBool | None, + Field( + description="Indicates that a function should be _deployed_ when its assets are valid. * If `true` (default), jobs to build and deploy the function will be initiated after it is checked that the assets are valid. Invalid assets lead to a validation error, and the function and its assets are not created or updated. * If `false`, the uploaded assets are stored and the function is created/updated in `registered` state. Asset validation errors are only returned as warning, and stored as `failureReason` on the function entity. Use an _asset update_ or _rebuild_ to initiate a build and deploy at a later stage." + ), + ] = None + author: Annotated[ + StrictStr | None, + Field( + description="Optionally changes the author metadata when updating a function." + ), + ] = None + comment: Annotated[ + StrictStr | None, + Field( + description="An optional user-specified comment corresponding to the operation." + ), + ] = None + scale_to_zero: Annotated[ + StrictBool | None, + Field( + description="If set to true, after successful deployment, the deployed function will be scaled to zero. This saves computing resources when the function is not to be used immediately." + ), + ] = None deprecate_previous: Annotated[ DeprecatePreviousPolicy | None, Field( @@ -71,12 +106,6 @@ class CreateQuery(WaylayBaseModel): description="Unless this is set to false, the server will start the required job actions asynchronously and return a 202 Accepted response. If false the request will block until the job actions are completed, or a timeout occurs." ), ] = None - scale_to_zero: Annotated[ - StrictBool | None, - Field( - description="If set to true, after successful deployment, the deployed function will be scaled to zero. Saves computing resources when the function is not to be used immediately." - ), - ] = None version: Annotated[ Any | None, Field( @@ -95,6 +124,18 @@ class CreateQuery(WaylayBaseModel): description="If set, the created function will be a draft function and its assets are still mutable. A build and deploy is initiated only in the case when all necessary assets are present and valid." ), ] = None + runtime: Annotated[ + Annotated[str, Field(strict=True)] | None, + Field( + description="If set, the created function will use the indicated runtime (latest version within specified range). This takes precedence over the runtime specified in a function manifest (copied or from request body)." + ), + ] = None + copy_from: Annotated[ + Any | None, + Field( + description="Indicates the _source_ of initial assets for a _new function_. When using this query parameter, the request body does not need to contain assets, but any assets in the request body will overwrite the copied assets. #### Selection of _assets_ source * If set as `[@]`, the _new function_ will be created with copied assets of the selected _source function_. * If set as `!example`, a `runtime` query parameter is required, and the _new function_ will be initialized with assets of the _runtime example_. #### Selection of the _source function_ When `` is a range (or is not given), the latest _published_ version (in that range) is used. If no _published_ version exists, the latest _draft_ is selected. If no versions in the range exist, a `404` _Not Found_ error is returned. #### The `name` of the _new function_ If a `name` is NOT specified (either as query parameter, or in an optional manifest asset in the request body), the `name` of the _new function_ will be that of the _source function_. #### The `version` of the _new function_ When the _target_ and _source_ name are equal, the `version` query parameters is defaulted to `` (`~` when it's an exact version) The version of the _new function_ will be: * If a `version` is NOT specified (either as query parameter, in an optional manifest asset, or as `` _default_) * a **patch increment** (`..+1`) of the latest **existing version** with the target `name` * **`1.0.0`** otherwise * If a `version` is specified: * the **lowest version** in that range **if no existing version** is in that range. * an **increment** of the latest existing version, **at the highest level** (_major_,_minor_,_patch_) allowed by that range. * otherwise, if all allowed versions already exist, a **`409` _Duplicate_ error** is raised. #### Deployment overrides The new function will use the deployment overrides of the copied function, unless a _manifest_ was specified in the request body." + ), + ] = None model_config = ConfigDict( validate_assignment=True, @@ -106,30 +147,54 @@ class CreateQuery(WaylayBaseModel): def _delete_asset_query_alias_for(field_name: str) -> str: + if field_name == "scale_to_zero": + return "scaleToZero" + if field_name == "deploy": + return "deploy" + if field_name == "chown": + return "chown" if field_name == "comment": return "comment" + if field_name == "author": + return "author" if field_name == "var_async": return "async" - if field_name == "chown": - return "chown" return field_name class DeleteAssetQuery(WaylayBaseModel): """Model for `delete_asset` query parameters.""" + scale_to_zero: Annotated[ + StrictBool | None, + Field( + description="If set to true, after successful deployment, the deployed function will be scaled to zero. This saves computing resources when the function is not to be used immediately." + ), + ] = None + deploy: Annotated[ + StrictBool | None, + Field( + description="Indicates that a function should be _deployed_ when its assets are valid. * If `true` (default), jobs to build and deploy the function will be initiated after it is checked that the assets are valid. Invalid assets lead to a validation error, and the function and its assets are not created or updated. * If `false`, the uploaded assets are stored and the function is created/updated in `registered` state. Asset validation errors are only returned as warning, and stored as `failureReason` on the function entity. Use an _asset update_ or _rebuild_ to initiate a build and deploy at a later stage." + ), + ] = None chown: Annotated[ - StrictBool, + StrictBool | None, Field( description="If set, ownership of the draft function is transferred to the current user." ), - ] + ] = None comment: Annotated[ StrictStr | None, Field( description="An optional user-specified comment corresponding to the operation." ), ] = None + author: Annotated[ + StrictStr | None, + Field( + description="Optionally changes the author metadata when updating a function." + ), + ] = None var_async: Annotated[ StrictBool | None, Field( @@ -303,15 +368,21 @@ class JobsQuery(WaylayBaseModel): ) -def _list_versions_query_alias_for(field_name: str) -> str: +def _list_query_alias_for(field_name: str) -> str: if field_name == "limit": return "limit" if field_name == "page": return "page" + if field_name == "include_draft": + return "includeDraft" + if field_name == "include_deprecated": + return "includeDeprecated" if field_name == "deprecated": return "deprecated" if field_name == "draft": return "draft" + if field_name == "name_version": + return "nameVersion" if field_name == "version": return "version" if field_name == "status": @@ -330,15 +401,21 @@ def _list_versions_query_alias_for(field_name: str) -> str: return "updatedBefore" if field_name == "updated_after": return "updatedAfter" + if field_name == "name": + return "name" if field_name == "archive_format": return "archiveFormat" if field_name == "runtime": return "runtime" + if field_name == "latest": + return "latest" + if field_name == "show_related": + return "showRelated" return field_name -class ListVersionsQuery(WaylayBaseModel): - """Model for `list_versions` query parameters.""" +class ListQuery(WaylayBaseModel): + """Model for `list` query parameters.""" limit: Annotated[ Annotated[float, Field(strict=True, ge=0)] @@ -356,6 +433,18 @@ class ListVersionsQuery(WaylayBaseModel): description="The number of pages to skip when returning result to this query." ), ] = None + include_draft: Annotated[ + StrictBool | None, + Field( + description="Configures the inclusion of _draft_ versions when selecting latest versions per name. By default, draft versions are only considered when no other versions are available. If set to `true`, draft versions are **included**. If set to `false`, draft versions are **excluded**." + ), + ] = None + include_deprecated: Annotated[ + StrictBool | None, + Field( + description="Configures the inclusion of _deprecated_ versions when selecting latest versions per name. By default, deprecated versions are only considered when no other versions are available. If set to `true`, deprecated versions are **included**. If set to `false`, deprecated versions are **excluded**." + ), + ] = None deprecated: Annotated[ StrictBool | None, Field(description="Filter on the deprecation status of the function."), @@ -364,6 +453,12 @@ class ListVersionsQuery(WaylayBaseModel): StrictBool | None, Field(description="Filter on the draft status of the function."), ] = None + name_version: Annotated[ + List[Annotated[str, Field(strict=True)]] | None, + Field( + description="Filter on exact `{name}@{version}` functions. Using this filter implies a `latest=false` default, returning multiple versions of the same named versions if they are filtered." + ), + ] = None version: Annotated[ StrictStr | None, Field( @@ -415,6 +510,12 @@ class ListVersionsQuery(WaylayBaseModel): description="Filter on funtions that were updated after the given timestamp or age." ), ] = None + name: Annotated[ + StrictStr | None, + Field( + description="Filter on the name of the function. This is case-insensitive and supports wild-cards `?` (any one character) and `*` (any sequence of characters)." + ), + ] = None archive_format: Annotated[ List[ArchiveFormat] | None, Field(description="Filter on the archive format of the function."), @@ -423,31 +524,37 @@ class ListVersionsQuery(WaylayBaseModel): List[StrictStr] | None, Field(description="Filter on the runtime of the function."), ] = None + latest: Annotated[ + StrictBool | None, + Field( + description="When `true`, only the latest version per function name is returned. If set to `false`, multiple versions per named function can be returned. Defaults to `true`, except when specific versions are selected with the `nameVersion` filter." + ), + ] = None + show_related: Annotated[ + ShowRelatedType | None, + Field( + description="Sets the representation of related function versions (like the _latest_ draft and/or published) in the response. - `embed`: as full summary representation (in `_embedded`). - `link`: as HAL link in (in `_links`). - `none`: omitted." + ), + ] = None model_config = ConfigDict( validate_assignment=True, protected_namespaces=(), extra="allow", - alias_generator=_list_versions_query_alias_for, + alias_generator=_list_query_alias_for, populate_by_name=True, ) -def _list_query_alias_for(field_name: str) -> str: +def _list_versions_query_alias_for(field_name: str) -> str: if field_name == "limit": return "limit" if field_name == "page": return "page" - if field_name == "include_draft": - return "includeDraft" - if field_name == "include_deprecated": - return "includeDeprecated" if field_name == "deprecated": return "deprecated" if field_name == "draft": return "draft" - if field_name == "name_version": - return "nameVersion" if field_name == "version": return "version" if field_name == "status": @@ -466,19 +573,15 @@ def _list_query_alias_for(field_name: str) -> str: return "updatedBefore" if field_name == "updated_after": return "updatedAfter" - if field_name == "name": - return "name" if field_name == "archive_format": return "archiveFormat" if field_name == "runtime": return "runtime" - if field_name == "latest": - return "latest" return field_name -class ListQuery(WaylayBaseModel): - """Model for `list` query parameters.""" +class ListVersionsQuery(WaylayBaseModel): + """Model for `list_versions` query parameters.""" limit: Annotated[ Annotated[float, Field(strict=True, ge=0)] @@ -496,18 +599,6 @@ class ListQuery(WaylayBaseModel): description="The number of pages to skip when returning result to this query." ), ] = None - include_draft: Annotated[ - StrictBool | None, - Field( - description="Configures the inclusion of _draft_ versions when selecting latest versions per name. By default, draft versions are only considered when no other versions are available. If set to `true`, draft versions are **included**. If set to `false`, draft versions are **excluded**." - ), - ] = None - include_deprecated: Annotated[ - StrictBool | None, - Field( - description="Configures the inclusion of _deprecated_ versions when selecting latest versions per name. By default, deprecated versions are only considered when no other versions are available. If set to `true`, deprecated versions are **included**. If set to `false`, deprecated versions are **excluded**." - ), - ] = None deprecated: Annotated[ StrictBool | None, Field(description="Filter on the deprecation status of the function."), @@ -516,12 +607,6 @@ class ListQuery(WaylayBaseModel): StrictBool | None, Field(description="Filter on the draft status of the function."), ] = None - name_version: Annotated[ - List[Annotated[str, Field(strict=True)]] | None, - Field( - description="Filter on exact `{name}@{version}` functions. Using this filter implies a `latest=false` default, returning multiple versions of the same named versions if they are filtered." - ), - ] = None version: Annotated[ StrictStr | None, Field( @@ -573,12 +658,6 @@ class ListQuery(WaylayBaseModel): description="Filter on funtions that were updated after the given timestamp or age." ), ] = None - name: Annotated[ - StrictStr | None, - Field( - description="Filter on the name of the function. This is case-insensitive and supports wild-cards `?` (any one character) and `*` (any sequence of characters)." - ), - ] = None archive_format: Annotated[ List[ArchiveFormat] | None, Field(description="Filter on the archive format of the function."), @@ -587,18 +666,12 @@ class ListQuery(WaylayBaseModel): List[StrictStr] | None, Field(description="Filter on the runtime of the function."), ] = None - latest: Annotated[ - StrictBool | None, - Field( - description="When `true`, only the latest version per function name is returned. If set to `false`, multiple versions per named function can be returned. Defaults to `true`, except when specific versions are selected with the `nameVersion` filter." - ), - ] = None model_config = ConfigDict( validate_assignment=True, protected_namespaces=(), extra="allow", - alias_generator=_list_query_alias_for, + alias_generator=_list_versions_query_alias_for, populate_by_name=True, ) @@ -629,8 +702,12 @@ class PatchMetadataQuery(WaylayBaseModel): def _publish_query_alias_for(field_name: str) -> str: + if field_name == "chown": + return "chown" if field_name == "comment": return "comment" + if field_name == "author": + return "author" if field_name == "deprecate_previous": return "deprecatePrevious" if field_name == "var_async": @@ -641,12 +718,24 @@ def _publish_query_alias_for(field_name: str) -> str: class PublishQuery(WaylayBaseModel): """Model for `publish` query parameters.""" + chown: Annotated[ + StrictBool | None, + Field( + description="If set, ownership of the draft function is transferred to the current user." + ), + ] = None comment: Annotated[ StrictStr | None, Field( description="An optional user-specified comment corresponding to the operation." ), ] = None + author: Annotated[ + StrictStr | None, + Field( + description="Optionally changes the author metadata when updating a function." + ), + ] = None deprecate_previous: Annotated[ DeprecatePreviousPolicy | None, Field( @@ -670,6 +759,8 @@ class PublishQuery(WaylayBaseModel): def _rebuild_query_alias_for(field_name: str) -> str: + if field_name == "scale_to_zero": + return "scaleToZero" if field_name == "comment": return "comment" if field_name == "dry_run": @@ -682,8 +773,6 @@ def _rebuild_query_alias_for(field_name: str) -> str: return "forceVersion" if field_name == "ignore_checks": return "ignoreChecks" - if field_name == "scale_to_zero": - return "scaleToZero" if field_name == "skip_rebuild": return "skipRebuild" return field_name @@ -692,6 +781,12 @@ def _rebuild_query_alias_for(field_name: str) -> str: class RebuildQuery(WaylayBaseModel): """Model for `rebuild` query parameters.""" + scale_to_zero: Annotated[ + StrictBool | None, + Field( + description="Indicates whether the function needs to be scaled down after successful verification. If not set, the function is scaled to zero only if it was not active before this command." + ), + ] = None comment: Annotated[ StrictStr | None, Field( @@ -728,12 +823,6 @@ class RebuildQuery(WaylayBaseModel): description="If set to true, checks that normally prevent a rebuild are overriden. These checks include: * function state in `pending`, `running`, `failed` or `undeployed` * backoff period due to recent failures * usage of deprecated dependencies * running jobs on entity * the `dryRun` option" ), ] = None - scale_to_zero: Annotated[ - StrictBool | None, - Field( - description="Indicates whether the function needs to be scaled down after successful (re-)deployment. If not set, the function is scaled to zero only if it was not active before this command." - ), - ] = None skip_rebuild: Annotated[ StrictBool | None, Field( @@ -802,12 +891,12 @@ class RemoveVersionQuery(WaylayBaseModel): def _remove_versions_query_alias_for(field_name: str) -> str: if field_name == "comment": return "comment" - if field_name == "var_async": - return "async" if field_name == "force": return "force" if field_name == "undeploy": return "undeploy" + if field_name == "var_async": + return "async" return field_name @@ -820,12 +909,6 @@ class RemoveVersionsQuery(WaylayBaseModel): description="An optional user-specified comment corresponding to the operation." ), ] = None - var_async: Annotated[ - StrictBool | None, - Field( - description="Unless this is set to false, the server will start the required job actions asynchronously and return a 202 Accepted response. If false the request will block until the job actions are completed, or a timeout occurs." - ), - ] = None force: Annotated[ StrictBool | None, Field( @@ -838,6 +921,12 @@ class RemoveVersionsQuery(WaylayBaseModel): description="If `true`, the `DELETE` operation * undeploys the (openfaas) function: it becomes no longer available for invocation. * does NOT remove the function from registry: it stays in an `undeployed` status. All assets and definitions are retained, so the version can be restored later with a _rebuild_ action. If `false`, the `DELETE` operation * _only_ marks the plug function as _deprecated_, the function remains active but is removed from the default listings. This also applies to _draft_ versions. This parameter is incompatible with `force=true`. If not set the default behaviour applies: * _draft_ versions are _undeployed_ and _removed_ from registry. * non-_draft_ versions are marked _deprecated_ only." ), ] = None + var_async: Annotated[ + StrictBool | None, + Field( + description="Unless this is set to false, the server will start the required job actions asynchronously and return a 202 Accepted response. If false the request will block until the job actions are completed, or a timeout occurs." + ), + ] = None model_config = ConfigDict( validate_assignment=True, @@ -849,30 +938,54 @@ class RemoveVersionsQuery(WaylayBaseModel): def _update_asset_query_alias_for(field_name: str) -> str: + if field_name == "scale_to_zero": + return "scaleToZero" + if field_name == "deploy": + return "deploy" + if field_name == "chown": + return "chown" if field_name == "comment": return "comment" + if field_name == "author": + return "author" if field_name == "var_async": return "async" - if field_name == "chown": - return "chown" return field_name class UpdateAssetQuery(WaylayBaseModel): """Model for `update_asset` query parameters.""" + scale_to_zero: Annotated[ + StrictBool | None, + Field( + description="If set to true, after successful deployment, the deployed function will be scaled to zero. This saves computing resources when the function is not to be used immediately." + ), + ] = None + deploy: Annotated[ + StrictBool | None, + Field( + description="Indicates that a function should be _deployed_ when its assets are valid. * If `true` (default), jobs to build and deploy the function will be initiated after it is checked that the assets are valid. Invalid assets lead to a validation error, and the function and its assets are not created or updated. * If `false`, the uploaded assets are stored and the function is created/updated in `registered` state. Asset validation errors are only returned as warning, and stored as `failureReason` on the function entity. Use an _asset update_ or _rebuild_ to initiate a build and deploy at a later stage." + ), + ] = None chown: Annotated[ - StrictBool, + StrictBool | None, Field( description="If set, ownership of the draft function is transferred to the current user." ), - ] + ] = None comment: Annotated[ StrictStr | None, Field( description="An optional user-specified comment corresponding to the operation." ), ] = None + author: Annotated[ + StrictStr | None, + Field( + description="Optionally changes the author metadata when updating a function." + ), + ] = None var_async: Annotated[ StrictBool | None, Field( @@ -890,30 +1003,54 @@ class UpdateAssetQuery(WaylayBaseModel): def _update_assets_query_alias_for(field_name: str) -> str: + if field_name == "scale_to_zero": + return "scaleToZero" + if field_name == "deploy": + return "deploy" + if field_name == "chown": + return "chown" if field_name == "comment": return "comment" + if field_name == "author": + return "author" if field_name == "var_async": return "async" - if field_name == "chown": - return "chown" return field_name class UpdateAssetsQuery(WaylayBaseModel): """Model for `update_assets` query parameters.""" + scale_to_zero: Annotated[ + StrictBool | None, + Field( + description="If set to true, after successful deployment, the deployed function will be scaled to zero. This saves computing resources when the function is not to be used immediately." + ), + ] = None + deploy: Annotated[ + StrictBool | None, + Field( + description="Indicates that a function should be _deployed_ when its assets are valid. * If `true` (default), jobs to build and deploy the function will be initiated after it is checked that the assets are valid. Invalid assets lead to a validation error, and the function and its assets are not created or updated. * If `false`, the uploaded assets are stored and the function is created/updated in `registered` state. Asset validation errors are only returned as warning, and stored as `failureReason` on the function entity. Use an _asset update_ or _rebuild_ to initiate a build and deploy at a later stage." + ), + ] = None chown: Annotated[ - StrictBool, + StrictBool | None, Field( description="If set, ownership of the draft function is transferred to the current user." ), - ] + ] = None comment: Annotated[ StrictStr | None, Field( description="An optional user-specified comment corresponding to the operation." ), ] = None + author: Annotated[ + StrictStr | None, + Field( + description="Optionally changes the author metadata when updating a function." + ), + ] = None var_async: Annotated[ StrictBool | None, Field( @@ -931,22 +1068,20 @@ class UpdateAssetsQuery(WaylayBaseModel): def _verify_query_alias_for(field_name: str) -> str: - if field_name == "comment": - return "comment" - if field_name == "var_async": - return "async" if field_name == "scale_to_zero": return "scaleToZero" + if field_name == "var_async": + return "async" return field_name class VerifyQuery(WaylayBaseModel): """Model for `verify` query parameters.""" - comment: Annotated[ - StrictStr | None, + scale_to_zero: Annotated[ + StrictBool | None, Field( - description="An optional user-specified comment corresponding to the operation." + description="Indicates whether the function needs to be scaled down after successful verification. If not set, the function is scaled to zero only if it was not active before this command." ), ] = None var_async: Annotated[ @@ -955,12 +1090,6 @@ class VerifyQuery(WaylayBaseModel): description="Unless this is set to false, the server will start the required job actions asynchronously and return a 202 Accepted response. If false the request will block until the job actions are completed, or a timeout occurs." ), ] = None - scale_to_zero: Annotated[ - StrictBool | None, - Field( - description="Indicates whether the function needs to be scaled down after successful verification. If not set, the function is scaled to zero only if it was not active before this command." - ), - ] = None model_config = ConfigDict( validate_assignment=True, diff --git a/waylay-sdk-registry-types/src/waylay/services/registry/queries/plug_functions_api.py b/waylay-sdk-registry-types/src/waylay/services/registry/queries/plugs_api.py similarity index 79% rename from waylay-sdk-registry-types/src/waylay/services/registry/queries/plug_functions_api.py rename to waylay-sdk-registry-types/src/waylay/services/registry/queries/plugs_api.py index 3f2a5211..fc837019 100644 --- a/waylay-sdk-registry-types/src/waylay/services/registry/queries/plug_functions_api.py +++ b/waylay-sdk-registry-types/src/waylay/services/registry/queries/plugs_api.py @@ -30,30 +30,65 @@ from ..models.job_type_schema import JobTypeSchema from ..models.plug_type import PlugType from ..models.rebuild_policy import RebuildPolicy +from ..models.show_related_type import ShowRelatedType from ..models.status_filter import StatusFilter def _create_query_alias_for(field_name: str) -> str: + if field_name == "deploy": + return "deploy" + if field_name == "author": + return "author" + if field_name == "comment": + return "comment" + if field_name == "scale_to_zero": + return "scaleToZero" if field_name == "deprecate_previous": return "deprecatePrevious" if field_name == "dry_run": return "dryRun" if field_name == "var_async": return "async" - if field_name == "scale_to_zero": - return "scaleToZero" if field_name == "version": return "version" if field_name == "name": return "name" if field_name == "draft": return "draft" + if field_name == "runtime": + return "runtime" + if field_name == "copy_from": + return "copy" return field_name class CreateQuery(WaylayBaseModel): """Model for `create` query parameters.""" + deploy: Annotated[ + StrictBool | None, + Field( + description="Indicates that a function should be _deployed_ when its assets are valid. * If `true` (default), jobs to build and deploy the function will be initiated after it is checked that the assets are valid. Invalid assets lead to a validation error, and the function and its assets are not created or updated. * If `false`, the uploaded assets are stored and the function is created/updated in `registered` state. Asset validation errors are only returned as warning, and stored as `failureReason` on the function entity. Use an _asset update_ or _rebuild_ to initiate a build and deploy at a later stage." + ), + ] = None + author: Annotated[ + StrictStr | None, + Field( + description="Optionally changes the author metadata when updating a function." + ), + ] = None + comment: Annotated[ + StrictStr | None, + Field( + description="An optional user-specified comment corresponding to the operation." + ), + ] = None + scale_to_zero: Annotated[ + StrictBool | None, + Field( + description="If set to true, after successful deployment, the deployed function will be scaled to zero. This saves computing resources when the function is not to be used immediately." + ), + ] = None deprecate_previous: Annotated[ DeprecatePreviousPolicy | None, Field( @@ -72,12 +107,6 @@ class CreateQuery(WaylayBaseModel): description="Unless this is set to false, the server will start the required job actions asynchronously and return a 202 Accepted response. If false the request will block until the job actions are completed, or a timeout occurs." ), ] = None - scale_to_zero: Annotated[ - StrictBool | None, - Field( - description="If set to true, after successful deployment, the deployed function will be scaled to zero. Saves computing resources when the function is not to be used immediately." - ), - ] = None version: Annotated[ Any | None, Field( @@ -96,6 +125,18 @@ class CreateQuery(WaylayBaseModel): description="If set, the created function will be a draft function and its assets are still mutable. A build and deploy is initiated only in the case when all necessary assets are present and valid." ), ] = None + runtime: Annotated[ + Annotated[str, Field(strict=True)] | None, + Field( + description="If set, the created function will use the indicated runtime (latest version within specified range). This takes precedence over the runtime specified in a function manifest (copied or from request body)." + ), + ] = None + copy_from: Annotated[ + Any | None, + Field( + description="Indicates the _source_ of initial assets for a _new function_. When using this query parameter, the request body does not need to contain assets, but any assets in the request body will overwrite the copied assets. #### Selection of _assets_ source * If set as `[@]`, the _new function_ will be created with copied assets of the selected _source function_. * If set as `!example`, a `runtime` query parameter is required, and the _new function_ will be initialized with assets of the _runtime example_. #### Selection of the _source function_ When `` is a range (or is not given), the latest _published_ version (in that range) is used. If no _published_ version exists, the latest _draft_ is selected. If no versions in the range exist, a `404` _Not Found_ error is returned. #### The `name` of the _new function_ If a `name` is NOT specified (either as query parameter, or in an optional manifest asset in the request body), the `name` of the _new function_ will be that of the _source function_. #### The `version` of the _new function_ When the _target_ and _source_ name are equal, the `version` query parameters is defaulted to `` (`~` when it's an exact version) The version of the _new function_ will be: * If a `version` is NOT specified (either as query parameter, in an optional manifest asset, or as `` _default_) * a **patch increment** (`..+1`) of the latest **existing version** with the target `name` * **`1.0.0`** otherwise * If a `version` is specified: * the **lowest version** in that range **if no existing version** is in that range. * an **increment** of the latest existing version, **at the highest level** (_major_,_minor_,_patch_) allowed by that range. * otherwise, if all allowed versions already exist, a **`409` _Duplicate_ error** is raised. #### Deployment overrides The new function will use the deployment overrides of the copied function, unless a _manifest_ was specified in the request body." + ), + ] = None model_config = ConfigDict( validate_assignment=True, @@ -107,30 +148,54 @@ class CreateQuery(WaylayBaseModel): def _delete_asset_query_alias_for(field_name: str) -> str: + if field_name == "scale_to_zero": + return "scaleToZero" + if field_name == "deploy": + return "deploy" + if field_name == "chown": + return "chown" if field_name == "comment": return "comment" + if field_name == "author": + return "author" if field_name == "var_async": return "async" - if field_name == "chown": - return "chown" return field_name class DeleteAssetQuery(WaylayBaseModel): """Model for `delete_asset` query parameters.""" + scale_to_zero: Annotated[ + StrictBool | None, + Field( + description="If set to true, after successful deployment, the deployed function will be scaled to zero. This saves computing resources when the function is not to be used immediately." + ), + ] = None + deploy: Annotated[ + StrictBool | None, + Field( + description="Indicates that a function should be _deployed_ when its assets are valid. * If `true` (default), jobs to build and deploy the function will be initiated after it is checked that the assets are valid. Invalid assets lead to a validation error, and the function and its assets are not created or updated. * If `false`, the uploaded assets are stored and the function is created/updated in `registered` state. Asset validation errors are only returned as warning, and stored as `failureReason` on the function entity. Use an _asset update_ or _rebuild_ to initiate a build and deploy at a later stage." + ), + ] = None chown: Annotated[ - StrictBool, + StrictBool | None, Field( description="If set, ownership of the draft function is transferred to the current user." ), - ] + ] = None comment: Annotated[ StrictStr | None, Field( description="An optional user-specified comment corresponding to the operation." ), ] = None + author: Annotated[ + StrictStr | None, + Field( + description="Optionally changes the author metadata when updating a function." + ), + ] = None var_async: Annotated[ StrictBool | None, Field( @@ -354,6 +419,8 @@ def _list_query_alias_for(field_name: str) -> str: return "runtime" if field_name == "latest": return "latest" + if field_name == "show_related": + return "showRelated" return field_name @@ -482,6 +549,12 @@ class ListQuery(WaylayBaseModel): description="When `true`, only the latest version per function name is returned. If set to `false`, multiple versions per named function can be returned. Defaults to `true`, except when specific versions are selected with the `nameVersion` filter." ), ] = None + show_related: Annotated[ + ShowRelatedType | None, + Field( + description="Sets the representation of related function versions (like the _latest_ draft and/or published) in the response. - `embed`: as full summary representation (in `_embedded`). - `link`: as HAL link in (in `_links`). - `none`: omitted." + ), + ] = None model_config = ConfigDict( validate_assignment=True, @@ -681,8 +754,12 @@ class PatchMetadataQuery(WaylayBaseModel): def _publish_query_alias_for(field_name: str) -> str: + if field_name == "chown": + return "chown" if field_name == "comment": return "comment" + if field_name == "author": + return "author" if field_name == "deprecate_previous": return "deprecatePrevious" if field_name == "var_async": @@ -693,12 +770,24 @@ def _publish_query_alias_for(field_name: str) -> str: class PublishQuery(WaylayBaseModel): """Model for `publish` query parameters.""" + chown: Annotated[ + StrictBool | None, + Field( + description="If set, ownership of the draft function is transferred to the current user." + ), + ] = None comment: Annotated[ StrictStr | None, Field( description="An optional user-specified comment corresponding to the operation." ), ] = None + author: Annotated[ + StrictStr | None, + Field( + description="Optionally changes the author metadata when updating a function." + ), + ] = None deprecate_previous: Annotated[ DeprecatePreviousPolicy | None, Field( @@ -722,6 +811,8 @@ class PublishQuery(WaylayBaseModel): def _rebuild_query_alias_for(field_name: str) -> str: + if field_name == "scale_to_zero": + return "scaleToZero" if field_name == "comment": return "comment" if field_name == "dry_run": @@ -734,8 +825,6 @@ def _rebuild_query_alias_for(field_name: str) -> str: return "forceVersion" if field_name == "ignore_checks": return "ignoreChecks" - if field_name == "scale_to_zero": - return "scaleToZero" if field_name == "skip_rebuild": return "skipRebuild" return field_name @@ -744,6 +833,12 @@ def _rebuild_query_alias_for(field_name: str) -> str: class RebuildQuery(WaylayBaseModel): """Model for `rebuild` query parameters.""" + scale_to_zero: Annotated[ + StrictBool | None, + Field( + description="Indicates whether the function needs to be scaled down after successful verification. If not set, the function is scaled to zero only if it was not active before this command." + ), + ] = None comment: Annotated[ StrictStr | None, Field( @@ -780,12 +875,6 @@ class RebuildQuery(WaylayBaseModel): description="If set to true, checks that normally prevent a rebuild are overriden. These checks include: * function state in `pending`, `running`, `failed` or `undeployed` * backoff period due to recent failures * usage of deprecated dependencies * running jobs on entity * the `dryRun` option" ), ] = None - scale_to_zero: Annotated[ - StrictBool | None, - Field( - description="Indicates whether the function needs to be scaled down after successful (re-)deployment. If not set, the function is scaled to zero only if it was not active before this command." - ), - ] = None skip_rebuild: Annotated[ StrictBool | None, Field( @@ -901,30 +990,54 @@ class RemoveVersionsQuery(WaylayBaseModel): def _update_asset_query_alias_for(field_name: str) -> str: + if field_name == "scale_to_zero": + return "scaleToZero" + if field_name == "deploy": + return "deploy" + if field_name == "chown": + return "chown" if field_name == "comment": return "comment" + if field_name == "author": + return "author" if field_name == "var_async": return "async" - if field_name == "chown": - return "chown" return field_name class UpdateAssetQuery(WaylayBaseModel): """Model for `update_asset` query parameters.""" + scale_to_zero: Annotated[ + StrictBool | None, + Field( + description="If set to true, after successful deployment, the deployed function will be scaled to zero. This saves computing resources when the function is not to be used immediately." + ), + ] = None + deploy: Annotated[ + StrictBool | None, + Field( + description="Indicates that a function should be _deployed_ when its assets are valid. * If `true` (default), jobs to build and deploy the function will be initiated after it is checked that the assets are valid. Invalid assets lead to a validation error, and the function and its assets are not created or updated. * If `false`, the uploaded assets are stored and the function is created/updated in `registered` state. Asset validation errors are only returned as warning, and stored as `failureReason` on the function entity. Use an _asset update_ or _rebuild_ to initiate a build and deploy at a later stage." + ), + ] = None chown: Annotated[ - StrictBool, + StrictBool | None, Field( description="If set, ownership of the draft function is transferred to the current user." ), - ] + ] = None comment: Annotated[ StrictStr | None, Field( description="An optional user-specified comment corresponding to the operation." ), ] = None + author: Annotated[ + StrictStr | None, + Field( + description="Optionally changes the author metadata when updating a function." + ), + ] = None var_async: Annotated[ StrictBool | None, Field( @@ -942,30 +1055,54 @@ class UpdateAssetQuery(WaylayBaseModel): def _update_assets_query_alias_for(field_name: str) -> str: + if field_name == "scale_to_zero": + return "scaleToZero" + if field_name == "deploy": + return "deploy" + if field_name == "chown": + return "chown" if field_name == "comment": return "comment" + if field_name == "author": + return "author" if field_name == "var_async": return "async" - if field_name == "chown": - return "chown" return field_name class UpdateAssetsQuery(WaylayBaseModel): """Model for `update_assets` query parameters.""" + scale_to_zero: Annotated[ + StrictBool | None, + Field( + description="If set to true, after successful deployment, the deployed function will be scaled to zero. This saves computing resources when the function is not to be used immediately." + ), + ] = None + deploy: Annotated[ + StrictBool | None, + Field( + description="Indicates that a function should be _deployed_ when its assets are valid. * If `true` (default), jobs to build and deploy the function will be initiated after it is checked that the assets are valid. Invalid assets lead to a validation error, and the function and its assets are not created or updated. * If `false`, the uploaded assets are stored and the function is created/updated in `registered` state. Asset validation errors are only returned as warning, and stored as `failureReason` on the function entity. Use an _asset update_ or _rebuild_ to initiate a build and deploy at a later stage." + ), + ] = None chown: Annotated[ - StrictBool, + StrictBool | None, Field( description="If set, ownership of the draft function is transferred to the current user." ), - ] + ] = None comment: Annotated[ StrictStr | None, Field( description="An optional user-specified comment corresponding to the operation." ), ] = None + author: Annotated[ + StrictStr | None, + Field( + description="Optionally changes the author metadata when updating a function." + ), + ] = None var_async: Annotated[ StrictBool | None, Field( @@ -983,22 +1120,20 @@ class UpdateAssetsQuery(WaylayBaseModel): def _verify_query_alias_for(field_name: str) -> str: - if field_name == "comment": - return "comment" - if field_name == "var_async": - return "async" if field_name == "scale_to_zero": return "scaleToZero" + if field_name == "var_async": + return "async" return field_name class VerifyQuery(WaylayBaseModel): """Model for `verify` query parameters.""" - comment: Annotated[ - StrictStr | None, + scale_to_zero: Annotated[ + StrictBool | None, Field( - description="An optional user-specified comment corresponding to the operation." + description="Indicates whether the function needs to be scaled down after successful verification. If not set, the function is scaled to zero only if it was not active before this command." ), ] = None var_async: Annotated[ @@ -1007,12 +1142,6 @@ class VerifyQuery(WaylayBaseModel): description="Unless this is set to false, the server will start the required job actions asynchronously and return a 202 Accepted response. If false the request will block until the job actions are completed, or a timeout occurs." ), ] = None - scale_to_zero: Annotated[ - StrictBool | None, - Field( - description="Indicates whether the function needs to be scaled down after successful verification. If not set, the function is scaled to zero only if it was not active before this command." - ), - ] = None model_config = ConfigDict( validate_assignment=True, diff --git a/waylay-sdk-registry-types/src/waylay/services/registry/queries/model_functions_api.py b/waylay-sdk-registry-types/src/waylay/services/registry/queries/webscripts_api.py similarity index 79% rename from waylay-sdk-registry-types/src/waylay/services/registry/queries/model_functions_api.py rename to waylay-sdk-registry-types/src/waylay/services/registry/queries/webscripts_api.py index c833b348..6769fb8d 100644 --- a/waylay-sdk-registry-types/src/waylay/services/registry/queries/model_functions_api.py +++ b/waylay-sdk-registry-types/src/waylay/services/registry/queries/webscripts_api.py @@ -29,30 +29,65 @@ from ..models.job_state_result import JobStateResult from ..models.job_type_schema import JobTypeSchema from ..models.rebuild_policy import RebuildPolicy +from ..models.show_related_type import ShowRelatedType from ..models.status_filter import StatusFilter def _create_query_alias_for(field_name: str) -> str: + if field_name == "deploy": + return "deploy" + if field_name == "author": + return "author" + if field_name == "comment": + return "comment" + if field_name == "scale_to_zero": + return "scaleToZero" if field_name == "deprecate_previous": return "deprecatePrevious" if field_name == "dry_run": return "dryRun" if field_name == "var_async": return "async" - if field_name == "scale_to_zero": - return "scaleToZero" if field_name == "version": return "version" if field_name == "name": return "name" if field_name == "draft": return "draft" + if field_name == "runtime": + return "runtime" + if field_name == "copy_from": + return "copy" return field_name class CreateQuery(WaylayBaseModel): """Model for `create` query parameters.""" + deploy: Annotated[ + StrictBool | None, + Field( + description="Indicates that a function should be _deployed_ when its assets are valid. * If `true` (default), jobs to build and deploy the function will be initiated after it is checked that the assets are valid. Invalid assets lead to a validation error, and the function and its assets are not created or updated. * If `false`, the uploaded assets are stored and the function is created/updated in `registered` state. Asset validation errors are only returned as warning, and stored as `failureReason` on the function entity. Use an _asset update_ or _rebuild_ to initiate a build and deploy at a later stage." + ), + ] = None + author: Annotated[ + StrictStr | None, + Field( + description="Optionally changes the author metadata when updating a function." + ), + ] = None + comment: Annotated[ + StrictStr | None, + Field( + description="An optional user-specified comment corresponding to the operation." + ), + ] = None + scale_to_zero: Annotated[ + StrictBool | None, + Field( + description="If set to true, after successful deployment, the deployed function will be scaled to zero. This saves computing resources when the function is not to be used immediately." + ), + ] = None deprecate_previous: Annotated[ DeprecatePreviousPolicy | None, Field( @@ -71,12 +106,6 @@ class CreateQuery(WaylayBaseModel): description="Unless this is set to false, the server will start the required job actions asynchronously and return a 202 Accepted response. If false the request will block until the job actions are completed, or a timeout occurs." ), ] = None - scale_to_zero: Annotated[ - StrictBool | None, - Field( - description="If set to true, after successful deployment, the deployed function will be scaled to zero. Saves computing resources when the function is not to be used immediately." - ), - ] = None version: Annotated[ Any | None, Field( @@ -95,6 +124,18 @@ class CreateQuery(WaylayBaseModel): description="If set, the created function will be a draft function and its assets are still mutable. A build and deploy is initiated only in the case when all necessary assets are present and valid." ), ] = None + runtime: Annotated[ + Annotated[str, Field(strict=True)] | None, + Field( + description="If set, the created function will use the indicated runtime (latest version within specified range). This takes precedence over the runtime specified in a function manifest (copied or from request body)." + ), + ] = None + copy_from: Annotated[ + Any | None, + Field( + description="Indicates the _source_ of initial assets for a _new function_. When using this query parameter, the request body does not need to contain assets, but any assets in the request body will overwrite the copied assets. #### Selection of _assets_ source * If set as `[@]`, the _new function_ will be created with copied assets of the selected _source function_. * If set as `!example`, a `runtime` query parameter is required, and the _new function_ will be initialized with assets of the _runtime example_. #### Selection of the _source function_ When `` is a range (or is not given), the latest _published_ version (in that range) is used. If no _published_ version exists, the latest _draft_ is selected. If no versions in the range exist, a `404` _Not Found_ error is returned. #### The `name` of the _new function_ If a `name` is NOT specified (either as query parameter, or in an optional manifest asset in the request body), the `name` of the _new function_ will be that of the _source function_. #### The `version` of the _new function_ When the _target_ and _source_ name are equal, the `version` query parameters is defaulted to `` (`~` when it's an exact version) The version of the _new function_ will be: * If a `version` is NOT specified (either as query parameter, in an optional manifest asset, or as `` _default_) * a **patch increment** (`..+1`) of the latest **existing version** with the target `name` * **`1.0.0`** otherwise * If a `version` is specified: * the **lowest version** in that range **if no existing version** is in that range. * an **increment** of the latest existing version, **at the highest level** (_major_,_minor_,_patch_) allowed by that range. * otherwise, if all allowed versions already exist, a **`409` _Duplicate_ error** is raised. #### Deployment overrides The new function will use the deployment overrides of the copied function, unless a _manifest_ was specified in the request body." + ), + ] = None model_config = ConfigDict( validate_assignment=True, @@ -106,30 +147,54 @@ class CreateQuery(WaylayBaseModel): def _delete_asset_query_alias_for(field_name: str) -> str: + if field_name == "scale_to_zero": + return "scaleToZero" + if field_name == "deploy": + return "deploy" + if field_name == "chown": + return "chown" if field_name == "comment": return "comment" + if field_name == "author": + return "author" if field_name == "var_async": return "async" - if field_name == "chown": - return "chown" return field_name class DeleteAssetQuery(WaylayBaseModel): """Model for `delete_asset` query parameters.""" + scale_to_zero: Annotated[ + StrictBool | None, + Field( + description="If set to true, after successful deployment, the deployed function will be scaled to zero. This saves computing resources when the function is not to be used immediately." + ), + ] = None + deploy: Annotated[ + StrictBool | None, + Field( + description="Indicates that a function should be _deployed_ when its assets are valid. * If `true` (default), jobs to build and deploy the function will be initiated after it is checked that the assets are valid. Invalid assets lead to a validation error, and the function and its assets are not created or updated. * If `false`, the uploaded assets are stored and the function is created/updated in `registered` state. Asset validation errors are only returned as warning, and stored as `failureReason` on the function entity. Use an _asset update_ or _rebuild_ to initiate a build and deploy at a later stage." + ), + ] = None chown: Annotated[ - StrictBool, + StrictBool | None, Field( description="If set, ownership of the draft function is transferred to the current user." ), - ] + ] = None comment: Annotated[ StrictStr | None, Field( description="An optional user-specified comment corresponding to the operation." ), ] = None + author: Annotated[ + StrictStr | None, + Field( + description="Optionally changes the author metadata when updating a function." + ), + ] = None var_async: Annotated[ StrictBool | None, Field( @@ -303,21 +368,15 @@ class JobsQuery(WaylayBaseModel): ) -def _list_query_alias_for(field_name: str) -> str: +def _list_versions_query_alias_for(field_name: str) -> str: if field_name == "limit": return "limit" if field_name == "page": return "page" - if field_name == "include_draft": - return "includeDraft" - if field_name == "include_deprecated": - return "includeDeprecated" if field_name == "deprecated": return "deprecated" if field_name == "draft": return "draft" - if field_name == "name_version": - return "nameVersion" if field_name == "version": return "version" if field_name == "status": @@ -336,19 +395,15 @@ def _list_query_alias_for(field_name: str) -> str: return "updatedBefore" if field_name == "updated_after": return "updatedAfter" - if field_name == "name": - return "name" if field_name == "archive_format": return "archiveFormat" if field_name == "runtime": return "runtime" - if field_name == "latest": - return "latest" return field_name -class ListQuery(WaylayBaseModel): - """Model for `list` query parameters.""" +class ListVersionsQuery(WaylayBaseModel): + """Model for `list_versions` query parameters.""" limit: Annotated[ Annotated[float, Field(strict=True, ge=0)] @@ -366,18 +421,6 @@ class ListQuery(WaylayBaseModel): description="The number of pages to skip when returning result to this query." ), ] = None - include_draft: Annotated[ - StrictBool | None, - Field( - description="Configures the inclusion of _draft_ versions when selecting latest versions per name. By default, draft versions are only considered when no other versions are available. If set to `true`, draft versions are **included**. If set to `false`, draft versions are **excluded**." - ), - ] = None - include_deprecated: Annotated[ - StrictBool | None, - Field( - description="Configures the inclusion of _deprecated_ versions when selecting latest versions per name. By default, deprecated versions are only considered when no other versions are available. If set to `true`, deprecated versions are **included**. If set to `false`, deprecated versions are **excluded**." - ), - ] = None deprecated: Annotated[ StrictBool | None, Field(description="Filter on the deprecation status of the function."), @@ -386,12 +429,6 @@ class ListQuery(WaylayBaseModel): StrictBool | None, Field(description="Filter on the draft status of the function."), ] = None - name_version: Annotated[ - List[Annotated[str, Field(strict=True)]] | None, - Field( - description="Filter on exact `{name}@{version}` functions. Using this filter implies a `latest=false` default, returning multiple versions of the same named versions if they are filtered." - ), - ] = None version: Annotated[ StrictStr | None, Field( @@ -443,12 +480,6 @@ class ListQuery(WaylayBaseModel): description="Filter on funtions that were updated after the given timestamp or age." ), ] = None - name: Annotated[ - StrictStr | None, - Field( - description="Filter on the name of the function. This is case-insensitive and supports wild-cards `?` (any one character) and `*` (any sequence of characters)." - ), - ] = None archive_format: Annotated[ List[ArchiveFormat] | None, Field(description="Filter on the archive format of the function."), @@ -457,31 +488,31 @@ class ListQuery(WaylayBaseModel): List[StrictStr] | None, Field(description="Filter on the runtime of the function."), ] = None - latest: Annotated[ - StrictBool | None, - Field( - description="When `true`, only the latest version per function name is returned. If set to `false`, multiple versions per named function can be returned. Defaults to `true`, except when specific versions are selected with the `nameVersion` filter." - ), - ] = None model_config = ConfigDict( validate_assignment=True, protected_namespaces=(), extra="allow", - alias_generator=_list_query_alias_for, + alias_generator=_list_versions_query_alias_for, populate_by_name=True, ) -def _list_versions_query_alias_for(field_name: str) -> str: +def _list_query_alias_for(field_name: str) -> str: if field_name == "limit": return "limit" if field_name == "page": return "page" + if field_name == "include_draft": + return "includeDraft" + if field_name == "include_deprecated": + return "includeDeprecated" if field_name == "deprecated": return "deprecated" if field_name == "draft": return "draft" + if field_name == "name_version": + return "nameVersion" if field_name == "version": return "version" if field_name == "status": @@ -500,15 +531,21 @@ def _list_versions_query_alias_for(field_name: str) -> str: return "updatedBefore" if field_name == "updated_after": return "updatedAfter" + if field_name == "name": + return "name" if field_name == "archive_format": return "archiveFormat" if field_name == "runtime": return "runtime" + if field_name == "latest": + return "latest" + if field_name == "show_related": + return "showRelated" return field_name -class ListVersionsQuery(WaylayBaseModel): - """Model for `list_versions` query parameters.""" +class ListQuery(WaylayBaseModel): + """Model for `list` query parameters.""" limit: Annotated[ Annotated[float, Field(strict=True, ge=0)] @@ -526,6 +563,18 @@ class ListVersionsQuery(WaylayBaseModel): description="The number of pages to skip when returning result to this query." ), ] = None + include_draft: Annotated[ + StrictBool | None, + Field( + description="Configures the inclusion of _draft_ versions when selecting latest versions per name. By default, draft versions are only considered when no other versions are available. If set to `true`, draft versions are **included**. If set to `false`, draft versions are **excluded**." + ), + ] = None + include_deprecated: Annotated[ + StrictBool | None, + Field( + description="Configures the inclusion of _deprecated_ versions when selecting latest versions per name. By default, deprecated versions are only considered when no other versions are available. If set to `true`, deprecated versions are **included**. If set to `false`, deprecated versions are **excluded**." + ), + ] = None deprecated: Annotated[ StrictBool | None, Field(description="Filter on the deprecation status of the function."), @@ -534,6 +583,12 @@ class ListVersionsQuery(WaylayBaseModel): StrictBool | None, Field(description="Filter on the draft status of the function."), ] = None + name_version: Annotated[ + List[Annotated[str, Field(strict=True)]] | None, + Field( + description="Filter on exact `{name}@{version}` functions. Using this filter implies a `latest=false` default, returning multiple versions of the same named versions if they are filtered." + ), + ] = None version: Annotated[ StrictStr | None, Field( @@ -585,6 +640,12 @@ class ListVersionsQuery(WaylayBaseModel): description="Filter on funtions that were updated after the given timestamp or age." ), ] = None + name: Annotated[ + StrictStr | None, + Field( + description="Filter on the name of the function. This is case-insensitive and supports wild-cards `?` (any one character) and `*` (any sequence of characters)." + ), + ] = None archive_format: Annotated[ List[ArchiveFormat] | None, Field(description="Filter on the archive format of the function."), @@ -593,12 +654,24 @@ class ListVersionsQuery(WaylayBaseModel): List[StrictStr] | None, Field(description="Filter on the runtime of the function."), ] = None + latest: Annotated[ + StrictBool | None, + Field( + description="When `true`, only the latest version per function name is returned. If set to `false`, multiple versions per named function can be returned. Defaults to `true`, except when specific versions are selected with the `nameVersion` filter." + ), + ] = None + show_related: Annotated[ + ShowRelatedType | None, + Field( + description="Sets the representation of related function versions (like the _latest_ draft and/or published) in the response. - `embed`: as full summary representation (in `_embedded`). - `link`: as HAL link in (in `_links`). - `none`: omitted." + ), + ] = None model_config = ConfigDict( validate_assignment=True, protected_namespaces=(), extra="allow", - alias_generator=_list_versions_query_alias_for, + alias_generator=_list_query_alias_for, populate_by_name=True, ) @@ -629,8 +702,12 @@ class PatchMetadataQuery(WaylayBaseModel): def _publish_query_alias_for(field_name: str) -> str: + if field_name == "chown": + return "chown" if field_name == "comment": return "comment" + if field_name == "author": + return "author" if field_name == "deprecate_previous": return "deprecatePrevious" if field_name == "var_async": @@ -641,12 +718,24 @@ def _publish_query_alias_for(field_name: str) -> str: class PublishQuery(WaylayBaseModel): """Model for `publish` query parameters.""" + chown: Annotated[ + StrictBool | None, + Field( + description="If set, ownership of the draft function is transferred to the current user." + ), + ] = None comment: Annotated[ StrictStr | None, Field( description="An optional user-specified comment corresponding to the operation." ), ] = None + author: Annotated[ + StrictStr | None, + Field( + description="Optionally changes the author metadata when updating a function." + ), + ] = None deprecate_previous: Annotated[ DeprecatePreviousPolicy | None, Field( @@ -670,6 +759,8 @@ class PublishQuery(WaylayBaseModel): def _rebuild_query_alias_for(field_name: str) -> str: + if field_name == "scale_to_zero": + return "scaleToZero" if field_name == "comment": return "comment" if field_name == "dry_run": @@ -682,8 +773,6 @@ def _rebuild_query_alias_for(field_name: str) -> str: return "forceVersion" if field_name == "ignore_checks": return "ignoreChecks" - if field_name == "scale_to_zero": - return "scaleToZero" if field_name == "skip_rebuild": return "skipRebuild" return field_name @@ -692,6 +781,12 @@ def _rebuild_query_alias_for(field_name: str) -> str: class RebuildQuery(WaylayBaseModel): """Model for `rebuild` query parameters.""" + scale_to_zero: Annotated[ + StrictBool | None, + Field( + description="Indicates whether the function needs to be scaled down after successful verification. If not set, the function is scaled to zero only if it was not active before this command." + ), + ] = None comment: Annotated[ StrictStr | None, Field( @@ -728,12 +823,6 @@ class RebuildQuery(WaylayBaseModel): description="If set to true, checks that normally prevent a rebuild are overriden. These checks include: * function state in `pending`, `running`, `failed` or `undeployed` * backoff period due to recent failures * usage of deprecated dependencies * running jobs on entity * the `dryRun` option" ), ] = None - scale_to_zero: Annotated[ - StrictBool | None, - Field( - description="Indicates whether the function needs to be scaled down after successful (re-)deployment. If not set, the function is scaled to zero only if it was not active before this command." - ), - ] = None skip_rebuild: Annotated[ StrictBool | None, Field( @@ -802,12 +891,12 @@ class RemoveVersionQuery(WaylayBaseModel): def _remove_versions_query_alias_for(field_name: str) -> str: if field_name == "comment": return "comment" + if field_name == "var_async": + return "async" if field_name == "force": return "force" if field_name == "undeploy": return "undeploy" - if field_name == "var_async": - return "async" return field_name @@ -820,22 +909,22 @@ class RemoveVersionsQuery(WaylayBaseModel): description="An optional user-specified comment corresponding to the operation." ), ] = None - force: Annotated[ + var_async: Annotated[ StrictBool | None, Field( - description="If true, the function version will be immediately undeployed and removed. Otherwise, the removal will be delayed to allow current invocations to end. During that period, the function is marked _deprecated_." + description="Unless this is set to false, the server will start the required job actions asynchronously and return a 202 Accepted response. If false the request will block until the job actions are completed, or a timeout occurs." ), ] = None - undeploy: Annotated[ + force: Annotated[ StrictBool | None, Field( - description="If `true`, the `DELETE` operation * undeploys the (openfaas) function: it becomes no longer available for invocation. * does NOT remove the function from registry: it stays in an `undeployed` status. All assets and definitions are retained, so the version can be restored later with a _rebuild_ action. If `false`, the `DELETE` operation * _only_ marks the plug function as _deprecated_, the function remains active but is removed from the default listings. This also applies to _draft_ versions. This parameter is incompatible with `force=true`. If not set the default behaviour applies: * _draft_ versions are _undeployed_ and _removed_ from registry. * non-_draft_ versions are marked _deprecated_ only." + description="If true, the function version will be immediately undeployed and removed. Otherwise, the removal will be delayed to allow current invocations to end. During that period, the function is marked _deprecated_." ), ] = None - var_async: Annotated[ + undeploy: Annotated[ StrictBool | None, Field( - description="Unless this is set to false, the server will start the required job actions asynchronously and return a 202 Accepted response. If false the request will block until the job actions are completed, or a timeout occurs." + description="If `true`, the `DELETE` operation * undeploys the (openfaas) function: it becomes no longer available for invocation. * does NOT remove the function from registry: it stays in an `undeployed` status. All assets and definitions are retained, so the version can be restored later with a _rebuild_ action. If `false`, the `DELETE` operation * _only_ marks the plug function as _deprecated_, the function remains active but is removed from the default listings. This also applies to _draft_ versions. This parameter is incompatible with `force=true`. If not set the default behaviour applies: * _draft_ versions are _undeployed_ and _removed_ from registry. * non-_draft_ versions are marked _deprecated_ only." ), ] = None @@ -849,30 +938,54 @@ class RemoveVersionsQuery(WaylayBaseModel): def _update_asset_query_alias_for(field_name: str) -> str: + if field_name == "scale_to_zero": + return "scaleToZero" + if field_name == "deploy": + return "deploy" + if field_name == "chown": + return "chown" if field_name == "comment": return "comment" + if field_name == "author": + return "author" if field_name == "var_async": return "async" - if field_name == "chown": - return "chown" return field_name class UpdateAssetQuery(WaylayBaseModel): """Model for `update_asset` query parameters.""" + scale_to_zero: Annotated[ + StrictBool | None, + Field( + description="If set to true, after successful deployment, the deployed function will be scaled to zero. This saves computing resources when the function is not to be used immediately." + ), + ] = None + deploy: Annotated[ + StrictBool | None, + Field( + description="Indicates that a function should be _deployed_ when its assets are valid. * If `true` (default), jobs to build and deploy the function will be initiated after it is checked that the assets are valid. Invalid assets lead to a validation error, and the function and its assets are not created or updated. * If `false`, the uploaded assets are stored and the function is created/updated in `registered` state. Asset validation errors are only returned as warning, and stored as `failureReason` on the function entity. Use an _asset update_ or _rebuild_ to initiate a build and deploy at a later stage." + ), + ] = None chown: Annotated[ - StrictBool, + StrictBool | None, Field( description="If set, ownership of the draft function is transferred to the current user." ), - ] + ] = None comment: Annotated[ StrictStr | None, Field( description="An optional user-specified comment corresponding to the operation." ), ] = None + author: Annotated[ + StrictStr | None, + Field( + description="Optionally changes the author metadata when updating a function." + ), + ] = None var_async: Annotated[ StrictBool | None, Field( @@ -890,30 +1003,54 @@ class UpdateAssetQuery(WaylayBaseModel): def _update_assets_query_alias_for(field_name: str) -> str: + if field_name == "scale_to_zero": + return "scaleToZero" + if field_name == "deploy": + return "deploy" + if field_name == "chown": + return "chown" if field_name == "comment": return "comment" + if field_name == "author": + return "author" if field_name == "var_async": return "async" - if field_name == "chown": - return "chown" return field_name class UpdateAssetsQuery(WaylayBaseModel): """Model for `update_assets` query parameters.""" + scale_to_zero: Annotated[ + StrictBool | None, + Field( + description="If set to true, after successful deployment, the deployed function will be scaled to zero. This saves computing resources when the function is not to be used immediately." + ), + ] = None + deploy: Annotated[ + StrictBool | None, + Field( + description="Indicates that a function should be _deployed_ when its assets are valid. * If `true` (default), jobs to build and deploy the function will be initiated after it is checked that the assets are valid. Invalid assets lead to a validation error, and the function and its assets are not created or updated. * If `false`, the uploaded assets are stored and the function is created/updated in `registered` state. Asset validation errors are only returned as warning, and stored as `failureReason` on the function entity. Use an _asset update_ or _rebuild_ to initiate a build and deploy at a later stage." + ), + ] = None chown: Annotated[ - StrictBool, + StrictBool | None, Field( description="If set, ownership of the draft function is transferred to the current user." ), - ] + ] = None comment: Annotated[ StrictStr | None, Field( description="An optional user-specified comment corresponding to the operation." ), ] = None + author: Annotated[ + StrictStr | None, + Field( + description="Optionally changes the author metadata when updating a function." + ), + ] = None var_async: Annotated[ StrictBool | None, Field( @@ -931,22 +1068,20 @@ class UpdateAssetsQuery(WaylayBaseModel): def _verify_query_alias_for(field_name: str) -> str: - if field_name == "comment": - return "comment" - if field_name == "var_async": - return "async" if field_name == "scale_to_zero": return "scaleToZero" + if field_name == "var_async": + return "async" return field_name class VerifyQuery(WaylayBaseModel): """Model for `verify` query parameters.""" - comment: Annotated[ - StrictStr | None, + scale_to_zero: Annotated[ + StrictBool | None, Field( - description="An optional user-specified comment corresponding to the operation." + description="Indicates whether the function needs to be scaled down after successful verification. If not set, the function is scaled to zero only if it was not active before this command." ), ] = None var_async: Annotated[ @@ -955,12 +1090,6 @@ class VerifyQuery(WaylayBaseModel): description="Unless this is set to false, the server will start the required job actions asynchronously and return a 202 Accepted response. If false the request will block until the job actions are completed, or a timeout occurs." ), ] = None - scale_to_zero: Annotated[ - StrictBool | None, - Field( - description="Indicates whether the function needs to be scaled down after successful verification. If not set, the function is scaled to zero only if it was not active before this command." - ), - ] = None model_config = ConfigDict( validate_assignment=True, diff --git a/waylay-sdk-registry/.openapi-generator/FILES b/waylay-sdk-registry/.openapi-generator/FILES index 3cbe7582..220ed1b1 100644 --- a/waylay-sdk-registry/.openapi-generator/FILES +++ b/waylay-sdk-registry/.openapi-generator/FILES @@ -3,12 +3,12 @@ pyproject.toml src/waylay/services/registry/api/__init__.py src/waylay/services/registry/api/about_api.py src/waylay/services/registry/api/jobs_api.py -src/waylay/services/registry/api/model_functions_api.py -src/waylay/services/registry/api/plug_functions_api.py +src/waylay/services/registry/api/models_api.py +src/waylay/services/registry/api/plugs_api.py src/waylay/services/registry/api/py.typed src/waylay/services/registry/api/runtimes_api.py src/waylay/services/registry/api/schemas_api.py -src/waylay/services/registry/api/webscript_functions_api.py +src/waylay/services/registry/api/webscripts_api.py src/waylay/services/registry/service/__init__.py src/waylay/services/registry/service/py.typed src/waylay/services/registry/service/service.py diff --git a/waylay-sdk-registry/README.md b/waylay-sdk-registry/README.md index 340cc3c9..6fe14a51 100644 --- a/waylay-sdk-registry/README.md +++ b/waylay-sdk-registry/README.md @@ -2,7 +2,7 @@ V2 API to build and deploy Waylay functions (plugs, webscripts, BYOML models). This Python package is automatically generated based on the -Waylay Registry OpenAPI specification (API version: 2.12.4) +Waylay Registry OpenAPI specification (API version: 2.13.0) For more information, please visit [the openapi specification](https://docs.waylay.io/openapi/public/redocly/registry.html). It consists of a plugin for the waylay-sdk-core package, and contains the Registry api methods. diff --git a/waylay-sdk-registry/pyproject.toml b/waylay-sdk-registry/pyproject.toml index a52699ff..175d20c3 100644 --- a/waylay-sdk-registry/pyproject.toml +++ b/waylay-sdk-registry/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "waylay-sdk-registry" -version = "2.12.4.20240415" +version = "2.13.0b20240415" description = "Waylay Function Registry" authors = [ { name = "Waylay", email = "info@waylay.io"} diff --git a/waylay-sdk-registry/src/waylay/services/registry/api/__init__.py b/waylay-sdk-registry/src/waylay/services/registry/api/__init__.py index b6c2ce1e..63c3a61c 100644 --- a/waylay-sdk-registry/src/waylay/services/registry/api/__init__.py +++ b/waylay-sdk-registry/src/waylay/services/registry/api/__init__.py @@ -3,18 +3,18 @@ # import apis into api package from .about_api import AboutApi from .jobs_api import JobsApi -from .model_functions_api import ModelFunctionsApi -from .plug_functions_api import PlugFunctionsApi +from .models_api import ModelsApi +from .plugs_api import PlugsApi from .runtimes_api import RuntimesApi from .schemas_api import SchemasApi -from .webscript_functions_api import WebscriptFunctionsApi +from .webscripts_api import WebscriptsApi __all__ = [ "AboutApi", "JobsApi", - "ModelFunctionsApi", - "PlugFunctionsApi", + "ModelsApi", + "PlugsApi", "RuntimesApi", "SchemasApi", - "WebscriptFunctionsApi", + "WebscriptsApi", ] diff --git a/waylay-sdk-registry/src/waylay/services/registry/api/model_functions_api.py b/waylay-sdk-registry/src/waylay/services/registry/api/models_api.py similarity index 82% rename from waylay-sdk-registry/src/waylay/services/registry/api/model_functions_api.py rename to waylay-sdk-registry/src/waylay/services/registry/api/models_api.py index 71a575bf..7b128535 100644 --- a/waylay-sdk-registry/src/waylay/services/registry/api/model_functions_api.py +++ b/waylay-sdk-registry/src/waylay/services/registry/api/models_api.py @@ -17,12 +17,14 @@ Literal, Optional, TypeVar, + Union, overload, ) from pydantic import ( Field, StrictBool, + StrictBytes, StrictStr, TypeAdapter, ) @@ -47,16 +49,16 @@ JobsForModelResponseV2, LatestModelsResponseV2, ModelVersionsResponseV2, - MultipartFileUpload, PostModelJobAsyncResponseV2, PostModelJobSyncResponseV2, RebuildModelAsyncResponseV2, RebuildModelSyncResponseV2, + RegistryErrorResponse, UndeployedResponseV2, UndeploySubmittedResponseV2, VerifyModelSyncResponseV2, ) - from waylay.services.registry.queries.model_functions_api import ( + from waylay.services.registry.queries.models_api import ( CreateQuery, DeleteAssetQuery, GetArchiveQuery, @@ -85,16 +87,16 @@ JobsForModelResponseV2, LatestModelsResponseV2, ModelVersionsResponseV2, - MultipartFileUpload, PostModelJobAsyncResponseV2, PostModelJobSyncResponseV2, RebuildModelAsyncResponseV2, RebuildModelSyncResponseV2, + RegistryErrorResponse, UndeployedResponseV2, UndeploySubmittedResponseV2, VerifyModelSyncResponseV2, ) - from waylay.services.registry.queries.model_functions_api import ( + from waylay.services.registry.queries.models_api import ( CreateQuery, DeleteAssetQuery, GetArchiveQuery, @@ -119,8 +121,6 @@ MODELS_AVAILABLE = False if not TYPE_CHECKING: - MultipartFileUpload = Model - CreateQuery = dict PostModelJobSyncResponseV2 = Model @@ -131,6 +131,8 @@ PostModelJobAsyncResponseV2 = Model + RegistryErrorResponse = Model + GetArchiveQuery = dict GetAssetQuery = dict @@ -182,13 +184,15 @@ PostModelJobAsyncResponseV2 = Model - MultipartFileUpload = Model + RegistryErrorResponse = Model UpdateAssetsQuery = dict PostModelJobSyncResponseV2 = Model PostModelJobAsyncResponseV2 = Model + RegistryErrorResponse = Model + VerifyQuery = dict VerifyModelSyncResponseV2 = Model @@ -198,8 +202,8 @@ T = TypeVar("T") -class ModelFunctionsApi(WithApiClient): - """ModelFunctionsApi service methods. +class ModelsApi(WithApiClient): + """ModelsApi service methods. NOTE: This class is auto generated by OpenAPI Generator Ref: https://openapi-generator.tech @@ -211,10 +215,16 @@ class ModelFunctionsApi(WithApiClient): async def create( self, *, + json: Annotated[ + StrictBytes | StrictStr | None, + Field( + description="The assets for a model function can be provided as
    • A single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • Separate files in a multipart/form-data request
    • A reference to the assets of another model in the copy argument
    The required model.json json file contains the function metadata, and must have a runtime attribute that is one of the supported runtimes (see GET /registry/v2/runtimes?functionType=kfserving). For each runtime other files will be required or supported. " + ), + ] = None, content: Annotated[ RequestContent | None, Field( - description="The assets for a model function can be provided as either
    • a single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • separate files in a multipart/form-data request
    The required model.json json file contains the function metadata, and must have a runtime attribute that is one of the supported runtimes (see GET /registry/v2/runtimes?functionType=kfserving). For each runtime other files will be required or supported. " + description="The assets for a model function can be provided as
    • A single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • Separate files in a multipart/form-data request
    • A reference to the assets of another model in the copy argument
    The required model.json json file contains the function metadata, and must have a runtime attribute that is one of the supported runtimes (see GET /registry/v2/runtimes?functionType=kfserving). For each runtime other files will be required or supported. " ), ] = None, files: Annotated[ @@ -232,10 +242,16 @@ async def create( async def create( self, *, + json: Annotated[ + StrictBytes | StrictStr | None, + Field( + description="The assets for a model function can be provided as
    • A single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • Separate files in a multipart/form-data request
    • A reference to the assets of another model in the copy argument
    The required model.json json file contains the function metadata, and must have a runtime attribute that is one of the supported runtimes (see GET /registry/v2/runtimes?functionType=kfserving). For each runtime other files will be required or supported. " + ), + ] = None, content: Annotated[ RequestContent | None, Field( - description="The assets for a model function can be provided as either
    • a single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • separate files in a multipart/form-data request
    The required model.json json file contains the function metadata, and must have a runtime attribute that is one of the supported runtimes (see GET /registry/v2/runtimes?functionType=kfserving). For each runtime other files will be required or supported. " + description="The assets for a model function can be provided as
    • A single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • Separate files in a multipart/form-data request
    • A reference to the assets of another model in the copy argument
    The required model.json json file contains the function metadata, and must have a runtime attribute that is one of the supported runtimes (see GET /registry/v2/runtimes?functionType=kfserving). For each runtime other files will be required or supported. " ), ] = None, files: Annotated[ @@ -253,10 +269,16 @@ async def create( async def create( self, *, + json: Annotated[ + StrictBytes | StrictStr | None, + Field( + description="The assets for a model function can be provided as
    • A single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • Separate files in a multipart/form-data request
    • A reference to the assets of another model in the copy argument
    The required model.json json file contains the function metadata, and must have a runtime attribute that is one of the supported runtimes (see GET /registry/v2/runtimes?functionType=kfserving). For each runtime other files will be required or supported. " + ), + ] = None, content: Annotated[ RequestContent | None, Field( - description="The assets for a model function can be provided as either
    • a single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • separate files in a multipart/form-data request
    The required model.json json file contains the function metadata, and must have a runtime attribute that is one of the supported runtimes (see GET /registry/v2/runtimes?functionType=kfserving). For each runtime other files will be required or supported. " + description="The assets for a model function can be provided as
    • A single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • Separate files in a multipart/form-data request
    • A reference to the assets of another model in the copy argument
    The required model.json json file contains the function metadata, and must have a runtime attribute that is one of the supported runtimes (see GET /registry/v2/runtimes?functionType=kfserving). For each runtime other files will be required or supported. " ), ] = None, files: Annotated[ @@ -274,10 +296,16 @@ async def create( async def create( self, *, + json: Annotated[ + StrictBytes | StrictStr | None, + Field( + description="The assets for a model function can be provided as
    • A single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • Separate files in a multipart/form-data request
    • A reference to the assets of another model in the copy argument
    The required model.json json file contains the function metadata, and must have a runtime attribute that is one of the supported runtimes (see GET /registry/v2/runtimes?functionType=kfserving). For each runtime other files will be required or supported. " + ), + ] = None, content: Annotated[ RequestContent | None, Field( - description="The assets for a model function can be provided as either
    • a single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • separate files in a multipart/form-data request
    The required model.json json file contains the function metadata, and must have a runtime attribute that is one of the supported runtimes (see GET /registry/v2/runtimes?functionType=kfserving). For each runtime other files will be required or supported. " + description="The assets for a model function can be provided as
    • A single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • Separate files in a multipart/form-data request
    • A reference to the assets of another model in the copy argument
    The required model.json json file contains the function metadata, and must have a runtime attribute that is one of the supported runtimes (see GET /registry/v2/runtimes?functionType=kfserving). For each runtime other files will be required or supported. " ), ] = None, files: Annotated[ @@ -295,10 +323,16 @@ async def create( async def create( self, *, + json: Annotated[ + StrictBytes | StrictStr | None, + Field( + description="The assets for a model function can be provided as
    • A single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • Separate files in a multipart/form-data request
    • A reference to the assets of another model in the copy argument
    The required model.json json file contains the function metadata, and must have a runtime attribute that is one of the supported runtimes (see GET /registry/v2/runtimes?functionType=kfserving). For each runtime other files will be required or supported. " + ), + ] = None, content: Annotated[ RequestContent | None, Field( - description="The assets for a model function can be provided as either
    • a single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • separate files in a multipart/form-data request
    The required model.json json file contains the function metadata, and must have a runtime attribute that is one of the supported runtimes (see GET /registry/v2/runtimes?functionType=kfserving). For each runtime other files will be required or supported. " + description="The assets for a model function can be provided as
    • A single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • Separate files in a multipart/form-data request
    • A reference to the assets of another model in the copy argument
    The required model.json json file contains the function metadata, and must have a runtime attribute that is one of the supported runtimes (see GET /registry/v2/runtimes?functionType=kfserving). For each runtime other files will be required or supported. " ), ] = None, files: Annotated[ @@ -315,10 +349,16 @@ async def create( async def create( self, *, + json: Annotated[ + StrictBytes | StrictStr | None, + Field( + description="The assets for a model function can be provided as
    • A single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • Separate files in a multipart/form-data request
    • A reference to the assets of another model in the copy argument
    The required model.json json file contains the function metadata, and must have a runtime attribute that is one of the supported runtimes (see GET /registry/v2/runtimes?functionType=kfserving). For each runtime other files will be required or supported. " + ), + ] = None, content: Annotated[ RequestContent | None, Field( - description="The assets for a model function can be provided as either
    • a single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • separate files in a multipart/form-data request
    The required model.json json file contains the function metadata, and must have a runtime attribute that is one of the supported runtimes (see GET /registry/v2/runtimes?functionType=kfserving). For each runtime other files will be required or supported. " + description="The assets for a model function can be provided as
    • A single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • Separate files in a multipart/form-data request
    • A reference to the assets of another model in the copy argument
    The required model.json json file contains the function metadata, and must have a runtime attribute that is one of the supported runtimes (see GET /registry/v2/runtimes?functionType=kfserving). For each runtime other files will be required or supported. " ), ] = None, files: Annotated[ @@ -335,27 +375,39 @@ async def create( ): """Create Model. - Creates a new model function by uploading its assets. The assets for a model function can be provided as either
    • a single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • separate files in a multipart/form-data request
    The required model.json json file contains the function metadata, and must have a runtime attribute that is one of the supported runtimes (see GET /registry/v2/runtimes?functionType=kfserving). For each runtime other files will be required or supported. - :param content: The assets for a model function can be provided as either
    • a single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • separate files in a multipart/form-data request
    The required model.json json file contains the function metadata, and must have a runtime attribute that is one of the supported runtimes (see GET /registry/v2/runtimes?functionType=kfserving). For each runtime other files will be required or supported. + Creates a new model function by uploading its assets. The assets for a model function can be provided as
    • A single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • Separate files in a multipart/form-data request
    • A reference to the assets of another model in the copy argument
    The required model.json json file contains the function metadata, and must have a runtime attribute that is one of the supported runtimes (see GET /registry/v2/runtimes?functionType=kfserving). For each runtime other files will be required or supported. + :param json: The assets for a model function can be provided as
    • A single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • Separate files in a multipart/form-data request
    • A reference to the assets of another model in the copy argument
    The required model.json json file contains the function metadata, and must have a runtime attribute that is one of the supported runtimes (see GET /registry/v2/runtimes?functionType=kfserving). For each runtime other files will be required or supported. + :type json: bytearray, optional + :param content: The assets for a model function can be provided as
    • A single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • Separate files in a multipart/form-data request
    • A reference to the assets of another model in the copy argument
    The required model.json json file contains the function metadata, and must have a runtime attribute that is one of the supported runtimes (see GET /registry/v2/runtimes?functionType=kfserving). For each runtime other files will be required or supported. :type content: ContentRequest, optional :param files: The files of a `content-type: multipart/form-data` request. :type files: FilesRequest, optional :param query: URL Query parameters. :type query: CreateQuery | QueryParamTypes, optional + :param query['deploy'] (dict)
    query.deploy (Query) : Indicates that a function should be _deployed_ when its assets are valid. * If `true` (default), jobs to build and deploy the function will be initiated after it is checked that the assets are valid. Invalid assets lead to a validation error, and the function and its assets are not created or updated. * If `false`, the uploaded assets are stored and the function is created/updated in `registered` state. Asset validation errors are only returned as warning, and stored as `failureReason` on the function entity. Use an _asset update_ or _rebuild_ to initiate a build and deploy at a later stage. + :type query['deploy']: bool + :param query['author'] (dict)
    query.author (Query) : Optionally changes the author metadata when updating a function. + :type query['author']: str + :param query['comment'] (dict)
    query.comment (Query) : An optional user-specified comment corresponding to the operation. + :type query['comment']: str + :param query['scaleToZero'] (dict)
    query.scale_to_zero (Query) : If set to true, after successful deployment, the deployed function will be scaled to zero. This saves computing resources when the function is not to be used immediately. + :type query['scaleToZero']: bool :param query['deprecatePrevious'] (dict)
    query.deprecate_previous (Query) : Set the cleanup policy used to automatically deprecate/delete previous versions. :type query['deprecatePrevious']: DeprecatePreviousPolicy :param query['dryRun'] (dict)
    query.dry_run (Query) : If set to true, validates the deployment conditions, but does not change anything. :type query['dryRun']: bool :param query['async'] (dict)
    query.var_async (Query) : Unless this is set to false, the server will start the required job actions asynchronously and return a 202 Accepted response. If false the request will block until the job actions are completed, or a timeout occurs. :type query['async']: bool - :param query['scaleToZero'] (dict)
    query.scale_to_zero (Query) : If set to true, after successful deployment, the deployed function will be scaled to zero. Saves computing resources when the function is not to be used immediately. - :type query['scaleToZero']: bool :param query['version'] (dict)
    query.version (Query) : If set, the function version will be an increment of the latest existing version that satisfies the `version` range. Note that this increment always takes precedence over an explicit `version` in the function manifest. :type query['version']: SemanticVersionRange :param query['name'] (dict)
    query.name (Query) : If set, the value will be used as the function name instead of the one specified in the manifest. :type query['name']: str :param query['draft'] (dict)
    query.draft (Query) : If set, the created function will be a draft function and its assets are still mutable. A build and deploy is initiated only in the case when all necessary assets are present and valid. :type query['draft']: bool + :param query['runtime'] (dict)
    query.runtime (Query) : If set, the created function will use the indicated runtime (latest version within specified range). This takes precedence over the runtime specified in a function manifest (copied or from request body). + :type query['runtime']: str + :param query['copy'] (dict)
    query.copy_from (Query) : Indicates the _source_ of initial assets for a _new function_. When using this query parameter, the request body does not need to contain assets, but any assets in the request body will overwrite the copied assets. #### Selection of _assets_ source * If set as `[@]`, the _new function_ will be created with copied assets of the selected _source function_. * If set as `!example`, a `runtime` query parameter is required, and the _new function_ will be initialized with assets of the _runtime example_. #### Selection of the _source function_ When `` is a range (or is not given), the latest _published_ version (in that range) is used. If no _published_ version exists, the latest _draft_ is selected. If no versions in the range exist, a `404` _Not Found_ error is returned. #### The `name` of the _new function_ If a `name` is NOT specified (either as query parameter, or in an optional manifest asset in the request body), the `name` of the _new function_ will be that of the _source function_. #### The `version` of the _new function_ When the _target_ and _source_ name are equal, the `version` query parameters is defaulted to `` (`~` when it's an exact version) The version of the _new function_ will be: * If a `version` is NOT specified (either as query parameter, in an optional manifest asset, or as `` _default_) * a **patch increment** (`..+1`) of the latest **existing version** with the target `name` * **`1.0.0`** otherwise * If a `version` is specified: * the **lowest version** in that range **if no existing version** is in that range. * an **increment** of the latest existing version, **at the highest level** (_major_,_minor_,_patch_) allowed by that range. * otherwise, if all allowed versions already exist, a **`409` _Duplicate_ error** is raised. #### Deployment overrides The new function will use the deployment overrides of the copied function, unless a _manifest_ was specified in the request body. + :type query['copy']: CreateWebscriptsCopyParameter :param raw_response: If true, return the http Response object instead of returning an api model object, or throwing an ApiError. :param select_path: Denotes the json path applied to the response object before returning it. Set it to the empty string `""` to receive the full response object. @@ -387,6 +439,17 @@ async def create( ## named body parameters body_args: Dict[str, Any] = {} + if json is not None and should_validate: + body_adapter = TypeAdapter( + Annotated[ + Optional[Union[StrictBytes, StrictStr]], + Field( + description="The assets for a model function can be provided as
    • A single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • Separate files in a multipart/form-data request
    • A reference to the assets of another model in the copy argument
    The required model.json json file contains the function metadata, and must have a runtime attribute that is one of the supported runtimes (see GET /registry/v2/runtimes?functionType=kfserving). For each runtime other files will be required or supported. " + ), + ] + ) + json = body_adapter.validate_python(json) # type: ignore # https://github.com/pydantic/pydantic/discussions/7094 + body_args["json"] = json body_args["content"] = content body_args["files"] = files @@ -562,12 +625,18 @@ async def delete_asset( :type wildcard: str :param query: URL Query parameters. :type query: DeleteAssetQuery | QueryParamTypes, optional + :param query['scaleToZero'] (dict)
    query.scale_to_zero (Query) : If set to true, after successful deployment, the deployed function will be scaled to zero. This saves computing resources when the function is not to be used immediately. + :type query['scaleToZero']: bool + :param query['deploy'] (dict)
    query.deploy (Query) : Indicates that a function should be _deployed_ when its assets are valid. * If `true` (default), jobs to build and deploy the function will be initiated after it is checked that the assets are valid. Invalid assets lead to a validation error, and the function and its assets are not created or updated. * If `false`, the uploaded assets are stored and the function is created/updated in `registered` state. Asset validation errors are only returned as warning, and stored as `failureReason` on the function entity. Use an _asset update_ or _rebuild_ to initiate a build and deploy at a later stage. + :type query['deploy']: bool + :param query['chown'] (dict)
    query.chown (Query) : If set, ownership of the draft function is transferred to the current user. + :type query['chown']: bool :param query['comment'] (dict)
    query.comment (Query) : An optional user-specified comment corresponding to the operation. :type query['comment']: str + :param query['author'] (dict)
    query.author (Query) : Optionally changes the author metadata when updating a function. + :type query['author']: str :param query['async'] (dict)
    query.var_async (Query) : Unless this is set to false, the server will start the required job actions asynchronously and return a 202 Accepted response. If false the request will block until the job actions are completed, or a timeout occurs. :type query['async']: bool - :param query['chown'] (dict)
    query.chown (Query) : If set, ownership of the draft function is transferred to the current user. (required) - :type query['chown']: bool :param raw_response: If true, return the http Response object instead of returning an api model object, or throwing an ApiError. :param select_path: Denotes the json path applied to the response object before returning it. Set it to the empty string `""` to receive the full response object. @@ -616,7 +685,9 @@ async def delete_asset( "202": PostModelJobAsyncResponseV2 if not select_path else Model, } ) - non_200_response_types_map: Dict[str, Any] = {} + non_200_response_types_map: Dict[str, Any] = { + "403": RegistryErrorResponse, + } response_types_map.update(non_200_response_types_map) ## peform request @@ -1573,7 +1644,7 @@ async def list( ) -> LatestModelsResponseV2 | T | Response | Model: """List Models. - List the (latest) versions of available models. ### List Latest Model Versions By default, the result includes the latest non-deprecated, non-draft version for each model name. If there is no such version, the latest _deprecated_ or the latest _draft_ version is included, with the former taking precedence. Use the boolean query parameters includeDeprecated or includeDraft to change this behaviour:
    • includeDeprecated=true: do not prefer non-deprecated versions as a latest version: if the latest version is a deprecated one, it will be shown, even if there are older non-deprecated versions.
    • includeDraft=true: do not prefer non-draft versions as a latest version: if the latest version is a draft, it will be shown, even if there are older non-draft versions.
    As long as no _version filters_ are used, each listed model version item will contain a HAL **link to the latest** _draft_ (`entities[]._links.draft`) or latest _published_ (`entities[]._links.publisned`) version (if existing and different). ### List Latest Model Versions (with filter) When any of the _version filter_ query parameters are used, the response contains the _latest_ version per named model that satisfy the filters, but **without links**. ### List All Model Versions When using `latest=false` (default when using the `namedVersion` filter), the listing contains _all_ models versions that satisfy the query, possibly multiple versions per named models. No HAL links are provided. #### Filter on _status_ By default model versions with status `undeployed` are **excluded** in all cases. Use the _version filter_ `status` to include/exclude a status from the results. By example, > `?status=any&includeDeprecated=true&includeDraft=true&latest=false` will list _ALL_ versions known to the function registry. #### Version filter parameters The following query parameters are _version filters_ for the model listing: > `version`, `status`, `runtimeVersion`, `createdBy`, `createdBefore`, `createdAfter`, `updatedBy`, `updatedBefore`, `updatedAfter`, `nameVersion`, `deprecated`, `draft` + List the (latest) versions of available models. ### List Latest Model Versions By default, the result includes the latest non-deprecated, non-draft version for each model name. If there is no such version, the latest _deprecated_ or the latest _draft_ version is included, with the former taking precedence. Use the boolean query parameters includeDeprecated or includeDraft to change this behaviour:
    • includeDeprecated=true: do not prefer non-deprecated versions as a latest version: if the latest version is a deprecated one, it will be shown, even if there are older non-deprecated versions.
    • includeDraft=true: do not prefer non-draft versions as a latest version: if the latest version is a draft, it will be shown, even if there are older non-draft versions.
    As long as no version filters are used, each listed model version contains representations of the latest draft (`entities[]._links.draft`) or latest published (`entities[]._links.published`) version (if existing and different). Use the query parameter `showRelated` to include only a link (default `showRelated=link`) or a full representation (`showRelated=embed`). ### List Latest Model Versions (with filter) When any of the _version filter_ query parameters are used, the response contains the _latest_ version per named model that satisfy the filters, but **without links**. ### List All Model Versions When using `latest=false` (default when using the `namedVersion` filter), the listing contains _all_ models versions that satisfy the query, possibly multiple versions per named models. No HAL links are provided. #### Filter on _status_ By default model versions with status `undeployed` are **excluded** in all cases. Use the _version filter_ `status` to include/exclude a status from the results. By example, > `?status=any&includeDeprecated=true&includeDraft=true&latest=false` will list _ALL_ versions known to the function registry. #### Version filter parameters The following query parameters are _version filters_ for the model listing: > `version`, `status`, `runtimeVersion`, `createdBy`, `createdBefore`, `createdAfter`, `updatedBy`, `updatedBefore`, `updatedAfter`, `nameVersion`, `deprecated`, `draft` :param query: URL Query parameters. :type query: ListQuery | QueryParamTypes, optional :param query['limit'] (dict)
    query.limit (Query) : The maximum number of items to be return from this query. Has a deployment-defined default and maximum value. @@ -1616,6 +1687,8 @@ async def list( :type query['runtime']: List[str] :param query['latest'] (dict)
    query.latest (Query) : When `true`, only the latest version per function name is returned. If set to `false`, multiple versions per named function can be returned. Defaults to `true`, except when specific versions are selected with the `nameVersion` filter. :type query['latest']: bool + :param query['showRelated'] (dict)
    query.show_related (Query) : Sets the representation of related function versions (like the _latest_ draft and/or published) in the response. - `embed`: as full summary representation (in `_embedded`). - `link`: as HAL link in (in `_links`). - `none`: omitted. + :type query['showRelated']: ShowRelatedType :param raw_response: If true, return the http Response object instead of returning an api model object, or throwing an ApiError. :param select_path: Denotes the json path applied to the response object before returning it. Set it to the empty string `""` to receive the full response object. @@ -2136,8 +2209,12 @@ async def publish( :type version: str :param query: URL Query parameters. :type query: PublishQuery | QueryParamTypes, optional + :param query['chown'] (dict)
    query.chown (Query) : If set, ownership of the draft function is transferred to the current user. + :type query['chown']: bool :param query['comment'] (dict)
    query.comment (Query) : An optional user-specified comment corresponding to the operation. :type query['comment']: str + :param query['author'] (dict)
    query.author (Query) : Optionally changes the author metadata when updating a function. + :type query['author']: str :param query['deprecatePrevious'] (dict)
    query.deprecate_previous (Query) : Set the cleanup policy used to automatically deprecate/delete previous versions. :type query['deprecatePrevious']: DeprecatePreviousPolicy :param query['async'] (dict)
    query.var_async (Query) : Unless this is set to false, the server will start the required job actions asynchronously and return a 202 Accepted response. If false the request will block until the job actions are completed, or a timeout occurs. @@ -2311,6 +2388,8 @@ async def rebuild( :type version: str :param query: URL Query parameters. :type query: RebuildQuery | QueryParamTypes, optional + :param query['scaleToZero'] (dict)
    query.scale_to_zero (Query) : Indicates whether the function needs to be scaled down after successful verification. If not set, the function is scaled to zero only if it was not active before this command. + :type query['scaleToZero']: bool :param query['comment'] (dict)
    query.comment (Query) : An optional user-specified comment corresponding to the operation. :type query['comment']: str :param query['dryRun'] (dict)
    query.dry_run (Query) : If set to true, checks whether rebuild jobs are needed, but do not start any jobs. @@ -2323,8 +2402,6 @@ async def rebuild( :type query['forceVersion']: str :param query['ignoreChecks'] (dict)
    query.ignore_checks (Query) : If set to true, checks that normally prevent a rebuild are overriden. These checks include: * function state in `pending`, `running`, `failed` or `undeployed` * backoff period due to recent failures * usage of deprecated dependencies * running jobs on entity * the `dryRun` option :type query['ignoreChecks']: bool - :param query['scaleToZero'] (dict)
    query.scale_to_zero (Query) : Indicates whether the function needs to be scaled down after successful (re-)deployment. If not set, the function is scaled to zero only if it was not active before this command. - :type query['scaleToZero']: bool :param query['skipRebuild'] (dict)
    query.skip_rebuild (Query) : If set, the function will not be rebuild. Always uses the current runtime version when re-deploying/re-verifying the function. :type query['skipRebuild']: bool :param raw_response: If true, return the http Response object instead of returning an api model object, or throwing an ApiError. @@ -2883,12 +2960,18 @@ async def update_asset( :type content: ContentRequest, optional :param query: URL Query parameters. :type query: UpdateAssetQuery | QueryParamTypes, optional + :param query['scaleToZero'] (dict)
    query.scale_to_zero (Query) : If set to true, after successful deployment, the deployed function will be scaled to zero. This saves computing resources when the function is not to be used immediately. + :type query['scaleToZero']: bool + :param query['deploy'] (dict)
    query.deploy (Query) : Indicates that a function should be _deployed_ when its assets are valid. * If `true` (default), jobs to build and deploy the function will be initiated after it is checked that the assets are valid. Invalid assets lead to a validation error, and the function and its assets are not created or updated. * If `false`, the uploaded assets are stored and the function is created/updated in `registered` state. Asset validation errors are only returned as warning, and stored as `failureReason` on the function entity. Use an _asset update_ or _rebuild_ to initiate a build and deploy at a later stage. + :type query['deploy']: bool + :param query['chown'] (dict)
    query.chown (Query) : If set, ownership of the draft function is transferred to the current user. + :type query['chown']: bool :param query['comment'] (dict)
    query.comment (Query) : An optional user-specified comment corresponding to the operation. :type query['comment']: str + :param query['author'] (dict)
    query.author (Query) : Optionally changes the author metadata when updating a function. + :type query['author']: str :param query['async'] (dict)
    query.var_async (Query) : Unless this is set to false, the server will start the required job actions asynchronously and return a 202 Accepted response. If false the request will block until the job actions are completed, or a timeout occurs. :type query['async']: bool - :param query['chown'] (dict)
    query.chown (Query) : If set, ownership of the draft function is transferred to the current user. (required) - :type query['chown']: bool :param raw_response: If true, return the http Response object instead of returning an api model object, or throwing an ApiError. :param select_path: Denotes the json path applied to the response object before returning it. Set it to the empty string `""` to receive the full response object. @@ -2938,7 +3021,9 @@ async def update_asset( "202": PostModelJobAsyncResponseV2 if not select_path else Model, } ) - non_200_response_types_map: Dict[str, Any] = {} + non_200_response_types_map: Dict[str, Any] = { + "403": RegistryErrorResponse, + } response_types_map.update(non_200_response_types_map) ## peform request @@ -2966,7 +3051,7 @@ async def update_assets( content: Annotated[ RequestContent | None, Field( - description="The assets for a model function can be provided as either
    • a single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • separate files in a multipart/form-data request
    The provided assets will be added to the model function's collection of existing assets, replacing any existing assets with the same name. Please note that it is not allowed to update the model.json json file with a changed value for any of the name, version and/or runtime attributes. For each runtime other files are supported. " + description="The assets for a model function can be provided as either
    • a single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • separate files in a multipart/form-data request
    The provided assets will be added to the model function's collection of existing assets, replacing any existing assets with the same name. Please note that it is not allowed to update the model.json json file with a changed value for any of the name, version and/or runtime attributes. For each runtime other files are supported. " ), ] = None, files: Annotated[ @@ -2991,7 +3076,7 @@ async def update_assets( content: Annotated[ RequestContent | None, Field( - description="The assets for a model function can be provided as either
    • a single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • separate files in a multipart/form-data request
    The provided assets will be added to the model function's collection of existing assets, replacing any existing assets with the same name. Please note that it is not allowed to update the model.json json file with a changed value for any of the name, version and/or runtime attributes. For each runtime other files are supported. " + description="The assets for a model function can be provided as either
    • a single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • separate files in a multipart/form-data request
    The provided assets will be added to the model function's collection of existing assets, replacing any existing assets with the same name. Please note that it is not allowed to update the model.json json file with a changed value for any of the name, version and/or runtime attributes. For each runtime other files are supported. " ), ] = None, files: Annotated[ @@ -3016,7 +3101,7 @@ async def update_assets( content: Annotated[ RequestContent | None, Field( - description="The assets for a model function can be provided as either
    • a single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • separate files in a multipart/form-data request
    The provided assets will be added to the model function's collection of existing assets, replacing any existing assets with the same name. Please note that it is not allowed to update the model.json json file with a changed value for any of the name, version and/or runtime attributes. For each runtime other files are supported. " + description="The assets for a model function can be provided as either
    • a single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • separate files in a multipart/form-data request
    The provided assets will be added to the model function's collection of existing assets, replacing any existing assets with the same name. Please note that it is not allowed to update the model.json json file with a changed value for any of the name, version and/or runtime attributes. For each runtime other files are supported. " ), ] = None, files: Annotated[ @@ -3041,7 +3126,7 @@ async def update_assets( content: Annotated[ RequestContent | None, Field( - description="The assets for a model function can be provided as either
    • a single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • separate files in a multipart/form-data request
    The provided assets will be added to the model function's collection of existing assets, replacing any existing assets with the same name. Please note that it is not allowed to update the model.json json file with a changed value for any of the name, version and/or runtime attributes. For each runtime other files are supported. " + description="The assets for a model function can be provided as either
    • a single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • separate files in a multipart/form-data request
    The provided assets will be added to the model function's collection of existing assets, replacing any existing assets with the same name. Please note that it is not allowed to update the model.json json file with a changed value for any of the name, version and/or runtime attributes. For each runtime other files are supported. " ), ] = None, files: Annotated[ @@ -3066,7 +3151,7 @@ async def update_assets( content: Annotated[ RequestContent | None, Field( - description="The assets for a model function can be provided as either
    • a single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • separate files in a multipart/form-data request
    The provided assets will be added to the model function's collection of existing assets, replacing any existing assets with the same name. Please note that it is not allowed to update the model.json json file with a changed value for any of the name, version and/or runtime attributes. For each runtime other files are supported. " + description="The assets for a model function can be provided as either
    • a single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • separate files in a multipart/form-data request
    The provided assets will be added to the model function's collection of existing assets, replacing any existing assets with the same name. Please note that it is not allowed to update the model.json json file with a changed value for any of the name, version and/or runtime attributes. For each runtime other files are supported. " ), ] = None, files: Annotated[ @@ -3090,7 +3175,7 @@ async def update_assets( content: Annotated[ RequestContent | None, Field( - description="The assets for a model function can be provided as either
    • a single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • separate files in a multipart/form-data request
    The provided assets will be added to the model function's collection of existing assets, replacing any existing assets with the same name. Please note that it is not allowed to update the model.json json file with a changed value for any of the name, version and/or runtime attributes. For each runtime other files are supported. " + description="The assets for a model function can be provided as either
    • a single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • separate files in a multipart/form-data request
    The provided assets will be added to the model function's collection of existing assets, replacing any existing assets with the same name. Please note that it is not allowed to update the model.json json file with a changed value for any of the name, version and/or runtime attributes. For each runtime other files are supported. " ), ] = None, files: Annotated[ @@ -3107,23 +3192,29 @@ async def update_assets( ): """Update Model Assets. - Update a draft model function by updating its assets. The assets for a model function can be provided as either
    • a single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • separate files in a multipart/form-data request
    The provided assets will be added to the model function's collection of existing assets, replacing any existing assets with the same name. Please note that it is not allowed to update the model.json json file with a changed value for any of the name, version and/or runtime attributes. For each runtime other files are supported. + Update a draft model function by updating its assets. The assets for a model function can be provided as either
    • a single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • separate files in a multipart/form-data request
    The provided assets will be added to the model function's collection of existing assets, replacing any existing assets with the same name. Please note that it is not allowed to update the model.json json file with a changed value for any of the name, version and/or runtime attributes. For each runtime other files are supported. :param name: The name of the function. (required) :type name: str :param version: The version of the function. (required) :type version: str - :param content: The assets for a model function can be provided as either
    • a single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • separate files in a multipart/form-data request
    The provided assets will be added to the model function's collection of existing assets, replacing any existing assets with the same name. Please note that it is not allowed to update the model.json json file with a changed value for any of the name, version and/or runtime attributes. For each runtime other files are supported. + :param content: The assets for a model function can be provided as either
    • a single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • separate files in a multipart/form-data request
    The provided assets will be added to the model function's collection of existing assets, replacing any existing assets with the same name. Please note that it is not allowed to update the model.json json file with a changed value for any of the name, version and/or runtime attributes. For each runtime other files are supported. :type content: ContentRequest, optional :param files: The files of a `content-type: multipart/form-data` request. :type files: FilesRequest, optional :param query: URL Query parameters. :type query: UpdateAssetsQuery | QueryParamTypes, optional + :param query['scaleToZero'] (dict)
    query.scale_to_zero (Query) : If set to true, after successful deployment, the deployed function will be scaled to zero. This saves computing resources when the function is not to be used immediately. + :type query['scaleToZero']: bool + :param query['deploy'] (dict)
    query.deploy (Query) : Indicates that a function should be _deployed_ when its assets are valid. * If `true` (default), jobs to build and deploy the function will be initiated after it is checked that the assets are valid. Invalid assets lead to a validation error, and the function and its assets are not created or updated. * If `false`, the uploaded assets are stored and the function is created/updated in `registered` state. Asset validation errors are only returned as warning, and stored as `failureReason` on the function entity. Use an _asset update_ or _rebuild_ to initiate a build and deploy at a later stage. + :type query['deploy']: bool + :param query['chown'] (dict)
    query.chown (Query) : If set, ownership of the draft function is transferred to the current user. + :type query['chown']: bool :param query['comment'] (dict)
    query.comment (Query) : An optional user-specified comment corresponding to the operation. :type query['comment']: str + :param query['author'] (dict)
    query.author (Query) : Optionally changes the author metadata when updating a function. + :type query['author']: str :param query['async'] (dict)
    query.var_async (Query) : Unless this is set to false, the server will start the required job actions asynchronously and return a 202 Accepted response. If false the request will block until the job actions are completed, or a timeout occurs. :type query['async']: bool - :param query['chown'] (dict)
    query.chown (Query) : If set, ownership of the draft function is transferred to the current user. (required) - :type query['chown']: bool :param raw_response: If true, return the http Response object instead of returning an api model object, or throwing an ApiError. :param select_path: Denotes the json path applied to the response object before returning it. Set it to the empty string `""` to receive the full response object. @@ -3173,7 +3264,9 @@ async def update_assets( "202": PostModelJobAsyncResponseV2 if not select_path else Model, } ) - non_200_response_types_map: Dict[str, Any] = {} + non_200_response_types_map: Dict[str, Any] = { + "403": RegistryErrorResponse, + } response_types_map.update(non_200_response_types_map) ## peform request @@ -3293,12 +3386,10 @@ async def verify( :type version: str :param query: URL Query parameters. :type query: VerifyQuery | QueryParamTypes, optional - :param query['comment'] (dict)
    query.comment (Query) : An optional user-specified comment corresponding to the operation. - :type query['comment']: str - :param query['async'] (dict)
    query.var_async (Query) : Unless this is set to false, the server will start the required job actions asynchronously and return a 202 Accepted response. If false the request will block until the job actions are completed, or a timeout occurs. - :type query['async']: bool :param query['scaleToZero'] (dict)
    query.scale_to_zero (Query) : Indicates whether the function needs to be scaled down after successful verification. If not set, the function is scaled to zero only if it was not active before this command. :type query['scaleToZero']: bool + :param query['async'] (dict)
    query.var_async (Query) : Unless this is set to false, the server will start the required job actions asynchronously and return a 202 Accepted response. If false the request will block until the job actions are completed, or a timeout occurs. + :type query['async']: bool :param raw_response: If true, return the http Response object instead of returning an api model object, or throwing an ApiError. :param select_path: Denotes the json path applied to the response object before returning it. Set it to the empty string `""` to receive the full response object. diff --git a/waylay-sdk-registry/src/waylay/services/registry/api/plug_functions_api.py b/waylay-sdk-registry/src/waylay/services/registry/api/plugs_api.py similarity index 83% rename from waylay-sdk-registry/src/waylay/services/registry/api/plug_functions_api.py rename to waylay-sdk-registry/src/waylay/services/registry/api/plugs_api.py index 75074e71..534093d0 100644 --- a/waylay-sdk-registry/src/waylay/services/registry/api/plug_functions_api.py +++ b/waylay-sdk-registry/src/waylay/services/registry/api/plugs_api.py @@ -17,12 +17,14 @@ Literal, Optional, TypeVar, + Union, overload, ) from pydantic import ( Field, StrictBool, + StrictBytes, StrictStr, TypeAdapter, ) @@ -46,18 +48,18 @@ GetPlugResponseV2, JobsForPlugResponseV2, LatestPlugsResponseV2, - MultipartFileUpload, PlugVersionsResponseV2, PostPlugJobAsyncResponseV2, PostPlugJobSyncResponseV2, RebuildPlugAsyncResponseV2, RebuildPlugSyncResponseV2, + RegistryErrorResponse, UndeployedResponseV2, UndeploySubmittedResponseV2, UpdateMetadataRequestV2, VerifyPlugSyncResponseV2, ) - from waylay.services.registry.queries.plug_functions_api import ( + from waylay.services.registry.queries.plugs_api import ( CreateQuery, DeleteAssetQuery, GetArchiveQuery, @@ -86,18 +88,18 @@ GetPlugResponseV2, JobsForPlugResponseV2, LatestPlugsResponseV2, - MultipartFileUpload, PlugVersionsResponseV2, PostPlugJobAsyncResponseV2, PostPlugJobSyncResponseV2, RebuildPlugAsyncResponseV2, RebuildPlugSyncResponseV2, + RegistryErrorResponse, UndeployedResponseV2, UndeploySubmittedResponseV2, UpdateMetadataRequestV2, VerifyPlugSyncResponseV2, ) - from waylay.services.registry.queries.plug_functions_api import ( + from waylay.services.registry.queries.plugs_api import ( CreateQuery, DeleteAssetQuery, GetArchiveQuery, @@ -123,8 +125,6 @@ MODELS_AVAILABLE = False if not TYPE_CHECKING: - MultipartFileUpload = Model - CreateQuery = dict PostPlugJobSyncResponseV2 = Model @@ -135,6 +135,8 @@ PostPlugJobAsyncResponseV2 = Model + RegistryErrorResponse = Model + GetArchiveQuery = dict GetAssetQuery = dict @@ -191,13 +193,15 @@ PostPlugJobAsyncResponseV2 = Model - MultipartFileUpload = Model + RegistryErrorResponse = Model UpdateAssetsQuery = dict PostPlugJobSyncResponseV2 = Model PostPlugJobAsyncResponseV2 = Model + RegistryErrorResponse = Model + VerifyQuery = dict VerifyPlugSyncResponseV2 = Model @@ -207,8 +211,8 @@ T = TypeVar("T") -class PlugFunctionsApi(WithApiClient): - """PlugFunctionsApi service methods. +class PlugsApi(WithApiClient): + """PlugsApi service methods. NOTE: This class is auto generated by OpenAPI Generator Ref: https://openapi-generator.tech @@ -220,10 +224,16 @@ class PlugFunctionsApi(WithApiClient): async def create( self, *, + json: Annotated[ + StrictBytes | StrictStr | None, + Field( + description="The assets for a plug function can be provided as
    • A single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • Separate files in a multipart/form-data request
    • A reference to the assets of another plug in the copy argument
    The required plug.json json file contains the function metadata, and must have a runtime attribute that is one of the supported runtimes (see GET /registry/v2/runtimes?functionType=plugs). For each runtime other files will be required or supported. " + ), + ] = None, content: Annotated[ RequestContent | None, Field( - description="The assets for a plug function can be provided as either
    • a single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • separate files in a multipart/form-data request
    The required plug.json json file contains the function metadata, and must have a runtime attribute that is one of the supported runtimes (see GET /registry/v2/runtimes?functionType=plugs). For each runtime other files will be required or supported. " + description="The assets for a plug function can be provided as
    • A single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • Separate files in a multipart/form-data request
    • A reference to the assets of another plug in the copy argument
    The required plug.json json file contains the function metadata, and must have a runtime attribute that is one of the supported runtimes (see GET /registry/v2/runtimes?functionType=plugs). For each runtime other files will be required or supported. " ), ] = None, files: Annotated[ @@ -241,10 +251,16 @@ async def create( async def create( self, *, + json: Annotated[ + StrictBytes | StrictStr | None, + Field( + description="The assets for a plug function can be provided as
    • A single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • Separate files in a multipart/form-data request
    • A reference to the assets of another plug in the copy argument
    The required plug.json json file contains the function metadata, and must have a runtime attribute that is one of the supported runtimes (see GET /registry/v2/runtimes?functionType=plugs). For each runtime other files will be required or supported. " + ), + ] = None, content: Annotated[ RequestContent | None, Field( - description="The assets for a plug function can be provided as either
    • a single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • separate files in a multipart/form-data request
    The required plug.json json file contains the function metadata, and must have a runtime attribute that is one of the supported runtimes (see GET /registry/v2/runtimes?functionType=plugs). For each runtime other files will be required or supported. " + description="The assets for a plug function can be provided as
    • A single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • Separate files in a multipart/form-data request
    • A reference to the assets of another plug in the copy argument
    The required plug.json json file contains the function metadata, and must have a runtime attribute that is one of the supported runtimes (see GET /registry/v2/runtimes?functionType=plugs). For each runtime other files will be required or supported. " ), ] = None, files: Annotated[ @@ -262,10 +278,16 @@ async def create( async def create( self, *, + json: Annotated[ + StrictBytes | StrictStr | None, + Field( + description="The assets for a plug function can be provided as
    • A single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • Separate files in a multipart/form-data request
    • A reference to the assets of another plug in the copy argument
    The required plug.json json file contains the function metadata, and must have a runtime attribute that is one of the supported runtimes (see GET /registry/v2/runtimes?functionType=plugs). For each runtime other files will be required or supported. " + ), + ] = None, content: Annotated[ RequestContent | None, Field( - description="The assets for a plug function can be provided as either
    • a single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • separate files in a multipart/form-data request
    The required plug.json json file contains the function metadata, and must have a runtime attribute that is one of the supported runtimes (see GET /registry/v2/runtimes?functionType=plugs). For each runtime other files will be required or supported. " + description="The assets for a plug function can be provided as
    • A single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • Separate files in a multipart/form-data request
    • A reference to the assets of another plug in the copy argument
    The required plug.json json file contains the function metadata, and must have a runtime attribute that is one of the supported runtimes (see GET /registry/v2/runtimes?functionType=plugs). For each runtime other files will be required or supported. " ), ] = None, files: Annotated[ @@ -283,10 +305,16 @@ async def create( async def create( self, *, + json: Annotated[ + StrictBytes | StrictStr | None, + Field( + description="The assets for a plug function can be provided as
    • A single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • Separate files in a multipart/form-data request
    • A reference to the assets of another plug in the copy argument
    The required plug.json json file contains the function metadata, and must have a runtime attribute that is one of the supported runtimes (see GET /registry/v2/runtimes?functionType=plugs). For each runtime other files will be required or supported. " + ), + ] = None, content: Annotated[ RequestContent | None, Field( - description="The assets for a plug function can be provided as either
    • a single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • separate files in a multipart/form-data request
    The required plug.json json file contains the function metadata, and must have a runtime attribute that is one of the supported runtimes (see GET /registry/v2/runtimes?functionType=plugs). For each runtime other files will be required or supported. " + description="The assets for a plug function can be provided as
    • A single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • Separate files in a multipart/form-data request
    • A reference to the assets of another plug in the copy argument
    The required plug.json json file contains the function metadata, and must have a runtime attribute that is one of the supported runtimes (see GET /registry/v2/runtimes?functionType=plugs). For each runtime other files will be required or supported. " ), ] = None, files: Annotated[ @@ -304,10 +332,16 @@ async def create( async def create( self, *, + json: Annotated[ + StrictBytes | StrictStr | None, + Field( + description="The assets for a plug function can be provided as
    • A single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • Separate files in a multipart/form-data request
    • A reference to the assets of another plug in the copy argument
    The required plug.json json file contains the function metadata, and must have a runtime attribute that is one of the supported runtimes (see GET /registry/v2/runtimes?functionType=plugs). For each runtime other files will be required or supported. " + ), + ] = None, content: Annotated[ RequestContent | None, Field( - description="The assets for a plug function can be provided as either
    • a single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • separate files in a multipart/form-data request
    The required plug.json json file contains the function metadata, and must have a runtime attribute that is one of the supported runtimes (see GET /registry/v2/runtimes?functionType=plugs). For each runtime other files will be required or supported. " + description="The assets for a plug function can be provided as
    • A single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • Separate files in a multipart/form-data request
    • A reference to the assets of another plug in the copy argument
    The required plug.json json file contains the function metadata, and must have a runtime attribute that is one of the supported runtimes (see GET /registry/v2/runtimes?functionType=plugs). For each runtime other files will be required or supported. " ), ] = None, files: Annotated[ @@ -324,10 +358,16 @@ async def create( async def create( self, *, + json: Annotated[ + StrictBytes | StrictStr | None, + Field( + description="The assets for a plug function can be provided as
    • A single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • Separate files in a multipart/form-data request
    • A reference to the assets of another plug in the copy argument
    The required plug.json json file contains the function metadata, and must have a runtime attribute that is one of the supported runtimes (see GET /registry/v2/runtimes?functionType=plugs). For each runtime other files will be required or supported. " + ), + ] = None, content: Annotated[ RequestContent | None, Field( - description="The assets for a plug function can be provided as either
    • a single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • separate files in a multipart/form-data request
    The required plug.json json file contains the function metadata, and must have a runtime attribute that is one of the supported runtimes (see GET /registry/v2/runtimes?functionType=plugs). For each runtime other files will be required or supported. " + description="The assets for a plug function can be provided as
    • A single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • Separate files in a multipart/form-data request
    • A reference to the assets of another plug in the copy argument
    The required plug.json json file contains the function metadata, and must have a runtime attribute that is one of the supported runtimes (see GET /registry/v2/runtimes?functionType=plugs). For each runtime other files will be required or supported. " ), ] = None, files: Annotated[ @@ -342,27 +382,39 @@ async def create( ) -> PostPlugJobSyncResponseV2 | PostPlugJobAsyncResponseV2 | T | Response | Model: """Create Plug. - Creates a new plug function by uploading its assets. The assets for a plug function can be provided as either
    • a single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • separate files in a multipart/form-data request
    The required plug.json json file contains the function metadata, and must have a runtime attribute that is one of the supported runtimes (see GET /registry/v2/runtimes?functionType=plugs). For each runtime other files will be required or supported. - :param content: The assets for a plug function can be provided as either
    • a single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • separate files in a multipart/form-data request
    The required plug.json json file contains the function metadata, and must have a runtime attribute that is one of the supported runtimes (see GET /registry/v2/runtimes?functionType=plugs). For each runtime other files will be required or supported. + Creates a new plug function by uploading its assets. The assets for a plug function can be provided as
    • A single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • Separate files in a multipart/form-data request
    • A reference to the assets of another plug in the copy argument
    The required plug.json json file contains the function metadata, and must have a runtime attribute that is one of the supported runtimes (see GET /registry/v2/runtimes?functionType=plugs). For each runtime other files will be required or supported. + :param json: The assets for a plug function can be provided as
    • A single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • Separate files in a multipart/form-data request
    • A reference to the assets of another plug in the copy argument
    The required plug.json json file contains the function metadata, and must have a runtime attribute that is one of the supported runtimes (see GET /registry/v2/runtimes?functionType=plugs). For each runtime other files will be required or supported. + :type json: bytearray, optional + :param content: The assets for a plug function can be provided as
    • A single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • Separate files in a multipart/form-data request
    • A reference to the assets of another plug in the copy argument
    The required plug.json json file contains the function metadata, and must have a runtime attribute that is one of the supported runtimes (see GET /registry/v2/runtimes?functionType=plugs). For each runtime other files will be required or supported. :type content: ContentRequest, optional :param files: The files of a `content-type: multipart/form-data` request. :type files: FilesRequest, optional :param query: URL Query parameters. :type query: CreateQuery | QueryParamTypes, optional + :param query['deploy'] (dict)
    query.deploy (Query) : Indicates that a function should be _deployed_ when its assets are valid. * If `true` (default), jobs to build and deploy the function will be initiated after it is checked that the assets are valid. Invalid assets lead to a validation error, and the function and its assets are not created or updated. * If `false`, the uploaded assets are stored and the function is created/updated in `registered` state. Asset validation errors are only returned as warning, and stored as `failureReason` on the function entity. Use an _asset update_ or _rebuild_ to initiate a build and deploy at a later stage. + :type query['deploy']: bool + :param query['author'] (dict)
    query.author (Query) : Optionally changes the author metadata when updating a function. + :type query['author']: str + :param query['comment'] (dict)
    query.comment (Query) : An optional user-specified comment corresponding to the operation. + :type query['comment']: str + :param query['scaleToZero'] (dict)
    query.scale_to_zero (Query) : If set to true, after successful deployment, the deployed function will be scaled to zero. This saves computing resources when the function is not to be used immediately. + :type query['scaleToZero']: bool :param query['deprecatePrevious'] (dict)
    query.deprecate_previous (Query) : Set the cleanup policy used to automatically deprecate/delete previous versions. :type query['deprecatePrevious']: DeprecatePreviousPolicy :param query['dryRun'] (dict)
    query.dry_run (Query) : If set to true, validates the deployment conditions, but does not change anything. :type query['dryRun']: bool :param query['async'] (dict)
    query.var_async (Query) : Unless this is set to false, the server will start the required job actions asynchronously and return a 202 Accepted response. If false the request will block until the job actions are completed, or a timeout occurs. :type query['async']: bool - :param query['scaleToZero'] (dict)
    query.scale_to_zero (Query) : If set to true, after successful deployment, the deployed function will be scaled to zero. Saves computing resources when the function is not to be used immediately. - :type query['scaleToZero']: bool :param query['version'] (dict)
    query.version (Query) : If set, the function version will be an increment of the latest existing version that satisfies the `version` range. Note that this increment always takes precedence over an explicit `version` in the function manifest. :type query['version']: SemanticVersionRange :param query['name'] (dict)
    query.name (Query) : If set, the value will be used as the function name instead of the one specified in the manifest. :type query['name']: str :param query['draft'] (dict)
    query.draft (Query) : If set, the created function will be a draft function and its assets are still mutable. A build and deploy is initiated only in the case when all necessary assets are present and valid. :type query['draft']: bool + :param query['runtime'] (dict)
    query.runtime (Query) : If set, the created function will use the indicated runtime (latest version within specified range). This takes precedence over the runtime specified in a function manifest (copied or from request body). + :type query['runtime']: str + :param query['copy'] (dict)
    query.copy_from (Query) : Indicates the _source_ of initial assets for a _new function_. When using this query parameter, the request body does not need to contain assets, but any assets in the request body will overwrite the copied assets. #### Selection of _assets_ source * If set as `[@]`, the _new function_ will be created with copied assets of the selected _source function_. * If set as `!example`, a `runtime` query parameter is required, and the _new function_ will be initialized with assets of the _runtime example_. #### Selection of the _source function_ When `` is a range (or is not given), the latest _published_ version (in that range) is used. If no _published_ version exists, the latest _draft_ is selected. If no versions in the range exist, a `404` _Not Found_ error is returned. #### The `name` of the _new function_ If a `name` is NOT specified (either as query parameter, or in an optional manifest asset in the request body), the `name` of the _new function_ will be that of the _source function_. #### The `version` of the _new function_ When the _target_ and _source_ name are equal, the `version` query parameters is defaulted to `` (`~` when it's an exact version) The version of the _new function_ will be: * If a `version` is NOT specified (either as query parameter, in an optional manifest asset, or as `` _default_) * a **patch increment** (`..+1`) of the latest **existing version** with the target `name` * **`1.0.0`** otherwise * If a `version` is specified: * the **lowest version** in that range **if no existing version** is in that range. * an **increment** of the latest existing version, **at the highest level** (_major_,_minor_,_patch_) allowed by that range. * otherwise, if all allowed versions already exist, a **`409` _Duplicate_ error** is raised. #### Deployment overrides The new function will use the deployment overrides of the copied function, unless a _manifest_ was specified in the request body. + :type query['copy']: CreateWebscriptsCopyParameter :param raw_response: If true, return the http Response object instead of returning an api model object, or throwing an ApiError. :param select_path: Denotes the json path applied to the response object before returning it. Set it to the empty string `""` to receive the full response object. @@ -394,6 +446,17 @@ async def create( ## named body parameters body_args: Dict[str, Any] = {} + if json is not None and should_validate: + body_adapter = TypeAdapter( + Annotated[ + Optional[Union[StrictBytes, StrictStr]], + Field( + description="The assets for a plug function can be provided as
    • A single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • Separate files in a multipart/form-data request
    • A reference to the assets of another plug in the copy argument
    The required plug.json json file contains the function metadata, and must have a runtime attribute that is one of the supported runtimes (see GET /registry/v2/runtimes?functionType=plugs). For each runtime other files will be required or supported. " + ), + ] + ) + json = body_adapter.validate_python(json) # type: ignore # https://github.com/pydantic/pydantic/discussions/7094 + body_args["json"] = json body_args["content"] = content body_args["files"] = files @@ -567,12 +630,18 @@ async def delete_asset( :type wildcard: str :param query: URL Query parameters. :type query: DeleteAssetQuery | QueryParamTypes, optional + :param query['scaleToZero'] (dict)
    query.scale_to_zero (Query) : If set to true, after successful deployment, the deployed function will be scaled to zero. This saves computing resources when the function is not to be used immediately. + :type query['scaleToZero']: bool + :param query['deploy'] (dict)
    query.deploy (Query) : Indicates that a function should be _deployed_ when its assets are valid. * If `true` (default), jobs to build and deploy the function will be initiated after it is checked that the assets are valid. Invalid assets lead to a validation error, and the function and its assets are not created or updated. * If `false`, the uploaded assets are stored and the function is created/updated in `registered` state. Asset validation errors are only returned as warning, and stored as `failureReason` on the function entity. Use an _asset update_ or _rebuild_ to initiate a build and deploy at a later stage. + :type query['deploy']: bool + :param query['chown'] (dict)
    query.chown (Query) : If set, ownership of the draft function is transferred to the current user. + :type query['chown']: bool :param query['comment'] (dict)
    query.comment (Query) : An optional user-specified comment corresponding to the operation. :type query['comment']: str + :param query['author'] (dict)
    query.author (Query) : Optionally changes the author metadata when updating a function. + :type query['author']: str :param query['async'] (dict)
    query.var_async (Query) : Unless this is set to false, the server will start the required job actions asynchronously and return a 202 Accepted response. If false the request will block until the job actions are completed, or a timeout occurs. :type query['async']: bool - :param query['chown'] (dict)
    query.chown (Query) : If set, ownership of the draft function is transferred to the current user. (required) - :type query['chown']: bool :param raw_response: If true, return the http Response object instead of returning an api model object, or throwing an ApiError. :param select_path: Denotes the json path applied to the response object before returning it. Set it to the empty string `""` to receive the full response object. @@ -621,7 +690,9 @@ async def delete_asset( "202": PostPlugJobAsyncResponseV2 if not select_path else Model, } ) - non_200_response_types_map: Dict[str, Any] = {} + non_200_response_types_map: Dict[str, Any] = { + "403": RegistryErrorResponse, + } response_types_map.update(non_200_response_types_map) ## peform request @@ -1580,7 +1651,7 @@ async def list( ) -> LatestPlugsResponseV2 | T | Response | Model: """List Plugs. - List the (latest) versions of available plugs. ### List Latest Plug Versions By default, the result includes the latest non-deprecated, non-draft version for each plug name. If there is no such version, the latest _deprecated_ or the latest _draft_ version is included, with the former taking precedence. Use the boolean query parameters includeDeprecated or includeDraft to change this behaviour:
    • includeDeprecated=true: do not prefer non-deprecated versions as a latest version: if the latest version is a deprecated one, it will be shown, even if there are older non-deprecated versions.
    • includeDraft=true: do not prefer non-draft versions as a latest version: if the latest version is a draft, it will be shown, even if there are older non-draft versions.
    As long as no _version filters_ are used, each listed plug version item will contain a HAL **link to the latest** _draft_ (`entities[]._links.draft`) or latest _published_ (`entities[]._links.publisned`) version (if existing and different). ### List Latest Plug Versions (with filter) When any of the _version filter_ query parameters are used, the response contains the _latest_ version per named plug that satisfy the filters, but **without links**. ### List All Plug Versions When using `latest=false` (default when using the `namedVersion` filter), the listing contains _all_ plugs versions that satisfy the query, possibly multiple versions per named plugs. No HAL links are provided. #### Filter on _status_ By default plug versions with status `undeployed` are **excluded** in all cases. Use the _version filter_ `status` to include/exclude a status from the results. By example, > `?status=any&includeDeprecated=true&includeDraft=true&latest=false` will list _ALL_ versions known to the function registry. #### Version filter parameters The following query parameters are _version filters_ for the plug listing: > `version`, `status`, `runtimeVersion`, `createdBy`, `createdBefore`, `createdAfter`, `updatedBy`, `updatedBefore`, `updatedAfter`, `nameVersion`, `deprecated`, `draft`, `tags` + List the (latest) versions of available plugs. ### List Latest Plug Versions By default, the result includes the latest non-deprecated, non-draft version for each plug name. If there is no such version, the latest _deprecated_ or the latest _draft_ version is included, with the former taking precedence. Use the boolean query parameters includeDeprecated or includeDraft to change this behaviour:
    • includeDeprecated=true: do not prefer non-deprecated versions as a latest version: if the latest version is a deprecated one, it will be shown, even if there are older non-deprecated versions.
    • includeDraft=true: do not prefer non-draft versions as a latest version: if the latest version is a draft, it will be shown, even if there are older non-draft versions.
    As long as no version filters are used, each listed plug version contains representations of the latest draft (`entities[]._links.draft`) or latest published (`entities[]._links.published`) version (if existing and different). Use the query parameter `showRelated` to include only a link (default `showRelated=link`) or a full representation (`showRelated=embed`). ### List Latest Plug Versions (with filter) When any of the _version filter_ query parameters are used, the response contains the _latest_ version per named plug that satisfy the filters, but **without links**. ### List All Plug Versions When using `latest=false` (default when using the `namedVersion` filter), the listing contains _all_ plugs versions that satisfy the query, possibly multiple versions per named plugs. No HAL links are provided. #### Filter on _status_ By default plug versions with status `undeployed` are **excluded** in all cases. Use the _version filter_ `status` to include/exclude a status from the results. By example, > `?status=any&includeDeprecated=true&includeDraft=true&latest=false` will list _ALL_ versions known to the function registry. #### Version filter parameters The following query parameters are _version filters_ for the plug listing: > `version`, `status`, `runtimeVersion`, `createdBy`, `createdBefore`, `createdAfter`, `updatedBy`, `updatedBefore`, `updatedAfter`, `nameVersion`, `deprecated`, `draft`, `tags` :param query: URL Query parameters. :type query: ListQuery | QueryParamTypes, optional :param query['tags'] (dict)
    query.tags (Query) : Filter on the tags of the item. Can be a single tag, or a list of tags. When multiple tags are specified, an item must have all of the tags to be selected. @@ -1627,6 +1698,8 @@ async def list( :type query['runtime']: List[str] :param query['latest'] (dict)
    query.latest (Query) : When `true`, only the latest version per function name is returned. If set to `false`, multiple versions per named function can be returned. Defaults to `true`, except when specific versions are selected with the `nameVersion` filter. :type query['latest']: bool + :param query['showRelated'] (dict)
    query.show_related (Query) : Sets the representation of related function versions (like the _latest_ draft and/or published) in the response. - `embed`: as full summary representation (in `_embedded`). - `link`: as HAL link in (in `_links`). - `none`: omitted. + :type query['showRelated']: ShowRelatedType :param raw_response: If true, return the http Response object instead of returning an api model object, or throwing an ApiError. :param select_path: Denotes the json path applied to the response object before returning it. Set it to the empty string `""` to receive the full response object. @@ -2327,8 +2400,12 @@ async def publish( :type version: str :param query: URL Query parameters. :type query: PublishQuery | QueryParamTypes, optional + :param query['chown'] (dict)
    query.chown (Query) : If set, ownership of the draft function is transferred to the current user. + :type query['chown']: bool :param query['comment'] (dict)
    query.comment (Query) : An optional user-specified comment corresponding to the operation. :type query['comment']: str + :param query['author'] (dict)
    query.author (Query) : Optionally changes the author metadata when updating a function. + :type query['author']: str :param query['deprecatePrevious'] (dict)
    query.deprecate_previous (Query) : Set the cleanup policy used to automatically deprecate/delete previous versions. :type query['deprecatePrevious']: DeprecatePreviousPolicy :param query['async'] (dict)
    query.var_async (Query) : Unless this is set to false, the server will start the required job actions asynchronously and return a 202 Accepted response. If false the request will block until the job actions are completed, or a timeout occurs. @@ -2500,6 +2577,8 @@ async def rebuild( :type version: str :param query: URL Query parameters. :type query: RebuildQuery | QueryParamTypes, optional + :param query['scaleToZero'] (dict)
    query.scale_to_zero (Query) : Indicates whether the function needs to be scaled down after successful verification. If not set, the function is scaled to zero only if it was not active before this command. + :type query['scaleToZero']: bool :param query['comment'] (dict)
    query.comment (Query) : An optional user-specified comment corresponding to the operation. :type query['comment']: str :param query['dryRun'] (dict)
    query.dry_run (Query) : If set to true, checks whether rebuild jobs are needed, but do not start any jobs. @@ -2512,8 +2591,6 @@ async def rebuild( :type query['forceVersion']: str :param query['ignoreChecks'] (dict)
    query.ignore_checks (Query) : If set to true, checks that normally prevent a rebuild are overriden. These checks include: * function state in `pending`, `running`, `failed` or `undeployed` * backoff period due to recent failures * usage of deprecated dependencies * running jobs on entity * the `dryRun` option :type query['ignoreChecks']: bool - :param query['scaleToZero'] (dict)
    query.scale_to_zero (Query) : Indicates whether the function needs to be scaled down after successful (re-)deployment. If not set, the function is scaled to zero only if it was not active before this command. - :type query['scaleToZero']: bool :param query['skipRebuild'] (dict)
    query.skip_rebuild (Query) : If set, the function will not be rebuild. Always uses the current runtime version when re-deploying/re-verifying the function. :type query['skipRebuild']: bool :param raw_response: If true, return the http Response object instead of returning an api model object, or throwing an ApiError. @@ -3070,12 +3147,18 @@ async def update_asset( :type content: ContentRequest, optional :param query: URL Query parameters. :type query: UpdateAssetQuery | QueryParamTypes, optional + :param query['scaleToZero'] (dict)
    query.scale_to_zero (Query) : If set to true, after successful deployment, the deployed function will be scaled to zero. This saves computing resources when the function is not to be used immediately. + :type query['scaleToZero']: bool + :param query['deploy'] (dict)
    query.deploy (Query) : Indicates that a function should be _deployed_ when its assets are valid. * If `true` (default), jobs to build and deploy the function will be initiated after it is checked that the assets are valid. Invalid assets lead to a validation error, and the function and its assets are not created or updated. * If `false`, the uploaded assets are stored and the function is created/updated in `registered` state. Asset validation errors are only returned as warning, and stored as `failureReason` on the function entity. Use an _asset update_ or _rebuild_ to initiate a build and deploy at a later stage. + :type query['deploy']: bool + :param query['chown'] (dict)
    query.chown (Query) : If set, ownership of the draft function is transferred to the current user. + :type query['chown']: bool :param query['comment'] (dict)
    query.comment (Query) : An optional user-specified comment corresponding to the operation. :type query['comment']: str + :param query['author'] (dict)
    query.author (Query) : Optionally changes the author metadata when updating a function. + :type query['author']: str :param query['async'] (dict)
    query.var_async (Query) : Unless this is set to false, the server will start the required job actions asynchronously and return a 202 Accepted response. If false the request will block until the job actions are completed, or a timeout occurs. :type query['async']: bool - :param query['chown'] (dict)
    query.chown (Query) : If set, ownership of the draft function is transferred to the current user. (required) - :type query['chown']: bool :param raw_response: If true, return the http Response object instead of returning an api model object, or throwing an ApiError. :param select_path: Denotes the json path applied to the response object before returning it. Set it to the empty string `""` to receive the full response object. @@ -3125,7 +3208,9 @@ async def update_asset( "202": PostPlugJobAsyncResponseV2 if not select_path else Model, } ) - non_200_response_types_map: Dict[str, Any] = {} + non_200_response_types_map: Dict[str, Any] = { + "403": RegistryErrorResponse, + } response_types_map.update(non_200_response_types_map) ## peform request @@ -3153,7 +3238,7 @@ async def update_assets( content: Annotated[ RequestContent | None, Field( - description="The assets for a plug function can be provided as either
    • a single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • separate files in a multipart/form-data request
    The provided assets will be added to the plug function's collection of existing assets, replacing any existing assets with the same name. Please note that it is not allowed to update the plug.json json file with a changed value for any of the name, version and/or runtime attributes. For each runtime other files are supported. " + description="The assets for a plug function can be provided as either
    • a single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • separate files in a multipart/form-data request
    The provided assets will be added to the plug function's collection of existing assets, replacing any existing assets with the same name. Please note that it is not allowed to update the plug.json json file with a changed value for any of the name, version and/or runtime attributes. For each runtime other files are supported. " ), ] = None, files: Annotated[ @@ -3178,7 +3263,7 @@ async def update_assets( content: Annotated[ RequestContent | None, Field( - description="The assets for a plug function can be provided as either
    • a single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • separate files in a multipart/form-data request
    The provided assets will be added to the plug function's collection of existing assets, replacing any existing assets with the same name. Please note that it is not allowed to update the plug.json json file with a changed value for any of the name, version and/or runtime attributes. For each runtime other files are supported. " + description="The assets for a plug function can be provided as either
    • a single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • separate files in a multipart/form-data request
    The provided assets will be added to the plug function's collection of existing assets, replacing any existing assets with the same name. Please note that it is not allowed to update the plug.json json file with a changed value for any of the name, version and/or runtime attributes. For each runtime other files are supported. " ), ] = None, files: Annotated[ @@ -3203,7 +3288,7 @@ async def update_assets( content: Annotated[ RequestContent | None, Field( - description="The assets for a plug function can be provided as either
    • a single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • separate files in a multipart/form-data request
    The provided assets will be added to the plug function's collection of existing assets, replacing any existing assets with the same name. Please note that it is not allowed to update the plug.json json file with a changed value for any of the name, version and/or runtime attributes. For each runtime other files are supported. " + description="The assets for a plug function can be provided as either
    • a single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • separate files in a multipart/form-data request
    The provided assets will be added to the plug function's collection of existing assets, replacing any existing assets with the same name. Please note that it is not allowed to update the plug.json json file with a changed value for any of the name, version and/or runtime attributes. For each runtime other files are supported. " ), ] = None, files: Annotated[ @@ -3228,7 +3313,7 @@ async def update_assets( content: Annotated[ RequestContent | None, Field( - description="The assets for a plug function can be provided as either
    • a single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • separate files in a multipart/form-data request
    The provided assets will be added to the plug function's collection of existing assets, replacing any existing assets with the same name. Please note that it is not allowed to update the plug.json json file with a changed value for any of the name, version and/or runtime attributes. For each runtime other files are supported. " + description="The assets for a plug function can be provided as either
    • a single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • separate files in a multipart/form-data request
    The provided assets will be added to the plug function's collection of existing assets, replacing any existing assets with the same name. Please note that it is not allowed to update the plug.json json file with a changed value for any of the name, version and/or runtime attributes. For each runtime other files are supported. " ), ] = None, files: Annotated[ @@ -3253,7 +3338,7 @@ async def update_assets( content: Annotated[ RequestContent | None, Field( - description="The assets for a plug function can be provided as either
    • a single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • separate files in a multipart/form-data request
    The provided assets will be added to the plug function's collection of existing assets, replacing any existing assets with the same name. Please note that it is not allowed to update the plug.json json file with a changed value for any of the name, version and/or runtime attributes. For each runtime other files are supported. " + description="The assets for a plug function can be provided as either
    • a single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • separate files in a multipart/form-data request
    The provided assets will be added to the plug function's collection of existing assets, replacing any existing assets with the same name. Please note that it is not allowed to update the plug.json json file with a changed value for any of the name, version and/or runtime attributes. For each runtime other files are supported. " ), ] = None, files: Annotated[ @@ -3277,7 +3362,7 @@ async def update_assets( content: Annotated[ RequestContent | None, Field( - description="The assets for a plug function can be provided as either
    • a single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • separate files in a multipart/form-data request
    The provided assets will be added to the plug function's collection of existing assets, replacing any existing assets with the same name. Please note that it is not allowed to update the plug.json json file with a changed value for any of the name, version and/or runtime attributes. For each runtime other files are supported. " + description="The assets for a plug function can be provided as either
    • a single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • separate files in a multipart/form-data request
    The provided assets will be added to the plug function's collection of existing assets, replacing any existing assets with the same name. Please note that it is not allowed to update the plug.json json file with a changed value for any of the name, version and/or runtime attributes. For each runtime other files are supported. " ), ] = None, files: Annotated[ @@ -3292,23 +3377,29 @@ async def update_assets( ) -> PostPlugJobSyncResponseV2 | PostPlugJobAsyncResponseV2 | T | Response | Model: """Update Plug Assets. - Update a draft plug function by updating its assets. The assets for a plug function can be provided as either
    • a single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • separate files in a multipart/form-data request
    The provided assets will be added to the plug function's collection of existing assets, replacing any existing assets with the same name. Please note that it is not allowed to update the plug.json json file with a changed value for any of the name, version and/or runtime attributes. For each runtime other files are supported. + Update a draft plug function by updating its assets. The assets for a plug function can be provided as either
    • a single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • separate files in a multipart/form-data request
    The provided assets will be added to the plug function's collection of existing assets, replacing any existing assets with the same name. Please note that it is not allowed to update the plug.json json file with a changed value for any of the name, version and/or runtime attributes. For each runtime other files are supported. :param name: The name of the function. (required) :type name: str :param version: The version of the function. (required) :type version: str - :param content: The assets for a plug function can be provided as either
    • a single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • separate files in a multipart/form-data request
    The provided assets will be added to the plug function's collection of existing assets, replacing any existing assets with the same name. Please note that it is not allowed to update the plug.json json file with a changed value for any of the name, version and/or runtime attributes. For each runtime other files are supported. + :param content: The assets for a plug function can be provided as either
    • a single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • separate files in a multipart/form-data request
    The provided assets will be added to the plug function's collection of existing assets, replacing any existing assets with the same name. Please note that it is not allowed to update the plug.json json file with a changed value for any of the name, version and/or runtime attributes. For each runtime other files are supported. :type content: ContentRequest, optional :param files: The files of a `content-type: multipart/form-data` request. :type files: FilesRequest, optional :param query: URL Query parameters. :type query: UpdateAssetsQuery | QueryParamTypes, optional + :param query['scaleToZero'] (dict)
    query.scale_to_zero (Query) : If set to true, after successful deployment, the deployed function will be scaled to zero. This saves computing resources when the function is not to be used immediately. + :type query['scaleToZero']: bool + :param query['deploy'] (dict)
    query.deploy (Query) : Indicates that a function should be _deployed_ when its assets are valid. * If `true` (default), jobs to build and deploy the function will be initiated after it is checked that the assets are valid. Invalid assets lead to a validation error, and the function and its assets are not created or updated. * If `false`, the uploaded assets are stored and the function is created/updated in `registered` state. Asset validation errors are only returned as warning, and stored as `failureReason` on the function entity. Use an _asset update_ or _rebuild_ to initiate a build and deploy at a later stage. + :type query['deploy']: bool + :param query['chown'] (dict)
    query.chown (Query) : If set, ownership of the draft function is transferred to the current user. + :type query['chown']: bool :param query['comment'] (dict)
    query.comment (Query) : An optional user-specified comment corresponding to the operation. :type query['comment']: str + :param query['author'] (dict)
    query.author (Query) : Optionally changes the author metadata when updating a function. + :type query['author']: str :param query['async'] (dict)
    query.var_async (Query) : Unless this is set to false, the server will start the required job actions asynchronously and return a 202 Accepted response. If false the request will block until the job actions are completed, or a timeout occurs. :type query['async']: bool - :param query['chown'] (dict)
    query.chown (Query) : If set, ownership of the draft function is transferred to the current user. (required) - :type query['chown']: bool :param raw_response: If true, return the http Response object instead of returning an api model object, or throwing an ApiError. :param select_path: Denotes the json path applied to the response object before returning it. Set it to the empty string `""` to receive the full response object. @@ -3358,7 +3449,9 @@ async def update_assets( "202": PostPlugJobAsyncResponseV2 if not select_path else Model, } ) - non_200_response_types_map: Dict[str, Any] = {} + non_200_response_types_map: Dict[str, Any] = { + "403": RegistryErrorResponse, + } response_types_map.update(non_200_response_types_map) ## peform request @@ -3478,12 +3571,10 @@ async def verify( :type version: str :param query: URL Query parameters. :type query: VerifyQuery | QueryParamTypes, optional - :param query['comment'] (dict)
    query.comment (Query) : An optional user-specified comment corresponding to the operation. - :type query['comment']: str - :param query['async'] (dict)
    query.var_async (Query) : Unless this is set to false, the server will start the required job actions asynchronously and return a 202 Accepted response. If false the request will block until the job actions are completed, or a timeout occurs. - :type query['async']: bool :param query['scaleToZero'] (dict)
    query.scale_to_zero (Query) : Indicates whether the function needs to be scaled down after successful verification. If not set, the function is scaled to zero only if it was not active before this command. :type query['scaleToZero']: bool + :param query['async'] (dict)
    query.var_async (Query) : Unless this is set to false, the server will start the required job actions asynchronously and return a 202 Accepted response. If false the request will block until the job actions are completed, or a timeout occurs. + :type query['async']: bool :param raw_response: If true, return the http Response object instead of returning an api model object, or throwing an ApiError. :param select_path: Denotes the json path applied to the response object before returning it. Set it to the empty string `""` to receive the full response object. diff --git a/waylay-sdk-registry/src/waylay/services/registry/api/webscript_functions_api.py b/waylay-sdk-registry/src/waylay/services/registry/api/webscripts_api.py similarity index 82% rename from waylay-sdk-registry/src/waylay/services/registry/api/webscript_functions_api.py rename to waylay-sdk-registry/src/waylay/services/registry/api/webscripts_api.py index f6e9b6d2..a9e91b2f 100644 --- a/waylay-sdk-registry/src/waylay/services/registry/api/webscript_functions_api.py +++ b/waylay-sdk-registry/src/waylay/services/registry/api/webscripts_api.py @@ -17,12 +17,14 @@ Literal, Optional, TypeVar, + Union, overload, ) from pydantic import ( Field, StrictBool, + StrictBytes, StrictStr, TypeAdapter, ) @@ -46,17 +48,17 @@ GetWebscriptResponseV2, JobsForWebscriptResponseV2, LatestWebscriptsResponseV2, - MultipartFileUpload, PostWebscriptJobAsyncResponseV2, PostWebscriptJobSyncResponseV2, RebuildWebscriptAsyncResponseV2, RebuildWebscriptSyncResponseV2, + RegistryErrorResponse, UndeployedResponseV2, UndeploySubmittedResponseV2, VerifyWebscriptSyncResponseV2, WebscriptVersionsResponseV2, ) - from waylay.services.registry.queries.webscript_functions_api import ( + from waylay.services.registry.queries.webscripts_api import ( CreateQuery, DeleteAssetQuery, GetArchiveQuery, @@ -84,17 +86,17 @@ GetWebscriptResponseV2, JobsForWebscriptResponseV2, LatestWebscriptsResponseV2, - MultipartFileUpload, PostWebscriptJobAsyncResponseV2, PostWebscriptJobSyncResponseV2, RebuildWebscriptAsyncResponseV2, RebuildWebscriptSyncResponseV2, + RegistryErrorResponse, UndeployedResponseV2, UndeploySubmittedResponseV2, VerifyWebscriptSyncResponseV2, WebscriptVersionsResponseV2, ) - from waylay.services.registry.queries.webscript_functions_api import ( + from waylay.services.registry.queries.webscripts_api import ( CreateQuery, DeleteAssetQuery, GetArchiveQuery, @@ -119,8 +121,6 @@ MODELS_AVAILABLE = False if not TYPE_CHECKING: - MultipartFileUpload = Model - CreateQuery = dict PostWebscriptJobSyncResponseV2 = Model @@ -131,6 +131,8 @@ PostWebscriptJobAsyncResponseV2 = Model + RegistryErrorResponse = Model + GetArchiveQuery = dict GetAssetQuery = dict @@ -182,13 +184,15 @@ PostWebscriptJobAsyncResponseV2 = Model - MultipartFileUpload = Model + RegistryErrorResponse = Model UpdateAssetsQuery = dict PostWebscriptJobSyncResponseV2 = Model PostWebscriptJobAsyncResponseV2 = Model + RegistryErrorResponse = Model + VerifyQuery = dict VerifyWebscriptSyncResponseV2 = Model @@ -198,8 +202,8 @@ T = TypeVar("T") -class WebscriptFunctionsApi(WithApiClient): - """WebscriptFunctionsApi service methods. +class WebscriptsApi(WithApiClient): + """WebscriptsApi service methods. NOTE: This class is auto generated by OpenAPI Generator Ref: https://openapi-generator.tech @@ -211,10 +215,16 @@ class WebscriptFunctionsApi(WithApiClient): async def create( self, *, + json: Annotated[ + StrictBytes | StrictStr | None, + Field( + description="The assets for a webscript function can be provided as
    • A single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • Separate files in a multipart/form-data request
    • A reference to the assets of another webscript in the copy argument
    The required webscript.json json file contains the function metadata, and must have a runtime attribute that is one of the supported runtimes (see GET /registry/v2/runtimes?functionType=webscripts). For each runtime other files will be required or supported. " + ), + ] = None, content: Annotated[ RequestContent | None, Field( - description="The assets for a webscript function can be provided as either
    • a single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • separate files in a multipart/form-data request
    The required webscript.json json file contains the function metadata, and must have a runtime attribute that is one of the supported runtimes (see GET /registry/v2/runtimes?functionType=webscripts). For each runtime other files will be required or supported. " + description="The assets for a webscript function can be provided as
    • A single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • Separate files in a multipart/form-data request
    • A reference to the assets of another webscript in the copy argument
    The required webscript.json json file contains the function metadata, and must have a runtime attribute that is one of the supported runtimes (see GET /registry/v2/runtimes?functionType=webscripts). For each runtime other files will be required or supported. " ), ] = None, files: Annotated[ @@ -232,10 +242,16 @@ async def create( async def create( self, *, + json: Annotated[ + StrictBytes | StrictStr | None, + Field( + description="The assets for a webscript function can be provided as
    • A single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • Separate files in a multipart/form-data request
    • A reference to the assets of another webscript in the copy argument
    The required webscript.json json file contains the function metadata, and must have a runtime attribute that is one of the supported runtimes (see GET /registry/v2/runtimes?functionType=webscripts). For each runtime other files will be required or supported. " + ), + ] = None, content: Annotated[ RequestContent | None, Field( - description="The assets for a webscript function can be provided as either
    • a single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • separate files in a multipart/form-data request
    The required webscript.json json file contains the function metadata, and must have a runtime attribute that is one of the supported runtimes (see GET /registry/v2/runtimes?functionType=webscripts). For each runtime other files will be required or supported. " + description="The assets for a webscript function can be provided as
    • A single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • Separate files in a multipart/form-data request
    • A reference to the assets of another webscript in the copy argument
    The required webscript.json json file contains the function metadata, and must have a runtime attribute that is one of the supported runtimes (see GET /registry/v2/runtimes?functionType=webscripts). For each runtime other files will be required or supported. " ), ] = None, files: Annotated[ @@ -253,10 +269,16 @@ async def create( async def create( self, *, + json: Annotated[ + StrictBytes | StrictStr | None, + Field( + description="The assets for a webscript function can be provided as
    • A single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • Separate files in a multipart/form-data request
    • A reference to the assets of another webscript in the copy argument
    The required webscript.json json file contains the function metadata, and must have a runtime attribute that is one of the supported runtimes (see GET /registry/v2/runtimes?functionType=webscripts). For each runtime other files will be required or supported. " + ), + ] = None, content: Annotated[ RequestContent | None, Field( - description="The assets for a webscript function can be provided as either
    • a single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • separate files in a multipart/form-data request
    The required webscript.json json file contains the function metadata, and must have a runtime attribute that is one of the supported runtimes (see GET /registry/v2/runtimes?functionType=webscripts). For each runtime other files will be required or supported. " + description="The assets for a webscript function can be provided as
    • A single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • Separate files in a multipart/form-data request
    • A reference to the assets of another webscript in the copy argument
    The required webscript.json json file contains the function metadata, and must have a runtime attribute that is one of the supported runtimes (see GET /registry/v2/runtimes?functionType=webscripts). For each runtime other files will be required or supported. " ), ] = None, files: Annotated[ @@ -274,10 +296,16 @@ async def create( async def create( self, *, + json: Annotated[ + StrictBytes | StrictStr | None, + Field( + description="The assets for a webscript function can be provided as
    • A single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • Separate files in a multipart/form-data request
    • A reference to the assets of another webscript in the copy argument
    The required webscript.json json file contains the function metadata, and must have a runtime attribute that is one of the supported runtimes (see GET /registry/v2/runtimes?functionType=webscripts). For each runtime other files will be required or supported. " + ), + ] = None, content: Annotated[ RequestContent | None, Field( - description="The assets for a webscript function can be provided as either
    • a single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • separate files in a multipart/form-data request
    The required webscript.json json file contains the function metadata, and must have a runtime attribute that is one of the supported runtimes (see GET /registry/v2/runtimes?functionType=webscripts). For each runtime other files will be required or supported. " + description="The assets for a webscript function can be provided as
    • A single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • Separate files in a multipart/form-data request
    • A reference to the assets of another webscript in the copy argument
    The required webscript.json json file contains the function metadata, and must have a runtime attribute that is one of the supported runtimes (see GET /registry/v2/runtimes?functionType=webscripts). For each runtime other files will be required or supported. " ), ] = None, files: Annotated[ @@ -295,10 +323,16 @@ async def create( async def create( self, *, + json: Annotated[ + StrictBytes | StrictStr | None, + Field( + description="The assets for a webscript function can be provided as
    • A single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • Separate files in a multipart/form-data request
    • A reference to the assets of another webscript in the copy argument
    The required webscript.json json file contains the function metadata, and must have a runtime attribute that is one of the supported runtimes (see GET /registry/v2/runtimes?functionType=webscripts). For each runtime other files will be required or supported. " + ), + ] = None, content: Annotated[ RequestContent | None, Field( - description="The assets for a webscript function can be provided as either
    • a single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • separate files in a multipart/form-data request
    The required webscript.json json file contains the function metadata, and must have a runtime attribute that is one of the supported runtimes (see GET /registry/v2/runtimes?functionType=webscripts). For each runtime other files will be required or supported. " + description="The assets for a webscript function can be provided as
    • A single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • Separate files in a multipart/form-data request
    • A reference to the assets of another webscript in the copy argument
    The required webscript.json json file contains the function metadata, and must have a runtime attribute that is one of the supported runtimes (see GET /registry/v2/runtimes?functionType=webscripts). For each runtime other files will be required or supported. " ), ] = None, files: Annotated[ @@ -315,10 +349,16 @@ async def create( async def create( self, *, + json: Annotated[ + StrictBytes | StrictStr | None, + Field( + description="The assets for a webscript function can be provided as
    • A single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • Separate files in a multipart/form-data request
    • A reference to the assets of another webscript in the copy argument
    The required webscript.json json file contains the function metadata, and must have a runtime attribute that is one of the supported runtimes (see GET /registry/v2/runtimes?functionType=webscripts). For each runtime other files will be required or supported. " + ), + ] = None, content: Annotated[ RequestContent | None, Field( - description="The assets for a webscript function can be provided as either
    • a single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • separate files in a multipart/form-data request
    The required webscript.json json file contains the function metadata, and must have a runtime attribute that is one of the supported runtimes (see GET /registry/v2/runtimes?functionType=webscripts). For each runtime other files will be required or supported. " + description="The assets for a webscript function can be provided as
    • A single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • Separate files in a multipart/form-data request
    • A reference to the assets of another webscript in the copy argument
    The required webscript.json json file contains the function metadata, and must have a runtime attribute that is one of the supported runtimes (see GET /registry/v2/runtimes?functionType=webscripts). For each runtime other files will be required or supported. " ), ] = None, files: Annotated[ @@ -339,27 +379,39 @@ async def create( ): """Create Webscript Version. - Creates a new webscript function by uploading its assets. The assets for a webscript function can be provided as either
    • a single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • separate files in a multipart/form-data request
    The required webscript.json json file contains the function metadata, and must have a runtime attribute that is one of the supported runtimes (see GET /registry/v2/runtimes?functionType=webscripts). For each runtime other files will be required or supported. - :param content: The assets for a webscript function can be provided as either
    • a single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • separate files in a multipart/form-data request
    The required webscript.json json file contains the function metadata, and must have a runtime attribute that is one of the supported runtimes (see GET /registry/v2/runtimes?functionType=webscripts). For each runtime other files will be required or supported. + Creates a new webscript function by uploading its assets. The assets for a webscript function can be provided as
    • A single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • Separate files in a multipart/form-data request
    • A reference to the assets of another webscript in the copy argument
    The required webscript.json json file contains the function metadata, and must have a runtime attribute that is one of the supported runtimes (see GET /registry/v2/runtimes?functionType=webscripts). For each runtime other files will be required or supported. + :param json: The assets for a webscript function can be provided as
    • A single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • Separate files in a multipart/form-data request
    • A reference to the assets of another webscript in the copy argument
    The required webscript.json json file contains the function metadata, and must have a runtime attribute that is one of the supported runtimes (see GET /registry/v2/runtimes?functionType=webscripts). For each runtime other files will be required or supported. + :type json: bytearray, optional + :param content: The assets for a webscript function can be provided as
    • A single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • Separate files in a multipart/form-data request
    • A reference to the assets of another webscript in the copy argument
    The required webscript.json json file contains the function metadata, and must have a runtime attribute that is one of the supported runtimes (see GET /registry/v2/runtimes?functionType=webscripts). For each runtime other files will be required or supported. :type content: ContentRequest, optional :param files: The files of a `content-type: multipart/form-data` request. :type files: FilesRequest, optional :param query: URL Query parameters. :type query: CreateQuery | QueryParamTypes, optional + :param query['deploy'] (dict)
    query.deploy (Query) : Indicates that a function should be _deployed_ when its assets are valid. * If `true` (default), jobs to build and deploy the function will be initiated after it is checked that the assets are valid. Invalid assets lead to a validation error, and the function and its assets are not created or updated. * If `false`, the uploaded assets are stored and the function is created/updated in `registered` state. Asset validation errors are only returned as warning, and stored as `failureReason` on the function entity. Use an _asset update_ or _rebuild_ to initiate a build and deploy at a later stage. + :type query['deploy']: bool + :param query['author'] (dict)
    query.author (Query) : Optionally changes the author metadata when updating a function. + :type query['author']: str + :param query['comment'] (dict)
    query.comment (Query) : An optional user-specified comment corresponding to the operation. + :type query['comment']: str + :param query['scaleToZero'] (dict)
    query.scale_to_zero (Query) : If set to true, after successful deployment, the deployed function will be scaled to zero. This saves computing resources when the function is not to be used immediately. + :type query['scaleToZero']: bool :param query['deprecatePrevious'] (dict)
    query.deprecate_previous (Query) : Set the cleanup policy used to automatically deprecate/delete previous versions. :type query['deprecatePrevious']: DeprecatePreviousPolicy :param query['dryRun'] (dict)
    query.dry_run (Query) : If set to true, validates the deployment conditions, but does not change anything. :type query['dryRun']: bool :param query['async'] (dict)
    query.var_async (Query) : Unless this is set to false, the server will start the required job actions asynchronously and return a 202 Accepted response. If false the request will block until the job actions are completed, or a timeout occurs. :type query['async']: bool - :param query['scaleToZero'] (dict)
    query.scale_to_zero (Query) : If set to true, after successful deployment, the deployed function will be scaled to zero. Saves computing resources when the function is not to be used immediately. - :type query['scaleToZero']: bool :param query['version'] (dict)
    query.version (Query) : If set, the function version will be an increment of the latest existing version that satisfies the `version` range. Note that this increment always takes precedence over an explicit `version` in the function manifest. :type query['version']: SemanticVersionRange :param query['name'] (dict)
    query.name (Query) : If set, the value will be used as the function name instead of the one specified in the manifest. :type query['name']: str :param query['draft'] (dict)
    query.draft (Query) : If set, the created function will be a draft function and its assets are still mutable. A build and deploy is initiated only in the case when all necessary assets are present and valid. :type query['draft']: bool + :param query['runtime'] (dict)
    query.runtime (Query) : If set, the created function will use the indicated runtime (latest version within specified range). This takes precedence over the runtime specified in a function manifest (copied or from request body). + :type query['runtime']: str + :param query['copy'] (dict)
    query.copy_from (Query) : Indicates the _source_ of initial assets for a _new function_. When using this query parameter, the request body does not need to contain assets, but any assets in the request body will overwrite the copied assets. #### Selection of _assets_ source * If set as `[@]`, the _new function_ will be created with copied assets of the selected _source function_. * If set as `!example`, a `runtime` query parameter is required, and the _new function_ will be initialized with assets of the _runtime example_. #### Selection of the _source function_ When `` is a range (or is not given), the latest _published_ version (in that range) is used. If no _published_ version exists, the latest _draft_ is selected. If no versions in the range exist, a `404` _Not Found_ error is returned. #### The `name` of the _new function_ If a `name` is NOT specified (either as query parameter, or in an optional manifest asset in the request body), the `name` of the _new function_ will be that of the _source function_. #### The `version` of the _new function_ When the _target_ and _source_ name are equal, the `version` query parameters is defaulted to `` (`~` when it's an exact version) The version of the _new function_ will be: * If a `version` is NOT specified (either as query parameter, in an optional manifest asset, or as `` _default_) * a **patch increment** (`..+1`) of the latest **existing version** with the target `name` * **`1.0.0`** otherwise * If a `version` is specified: * the **lowest version** in that range **if no existing version** is in that range. * an **increment** of the latest existing version, **at the highest level** (_major_,_minor_,_patch_) allowed by that range. * otherwise, if all allowed versions already exist, a **`409` _Duplicate_ error** is raised. #### Deployment overrides The new function will use the deployment overrides of the copied function, unless a _manifest_ was specified in the request body. + :type query['copy']: CreateWebscriptsCopyParameter :param raw_response: If true, return the http Response object instead of returning an api model object, or throwing an ApiError. :param select_path: Denotes the json path applied to the response object before returning it. Set it to the empty string `""` to receive the full response object. @@ -391,6 +443,17 @@ async def create( ## named body parameters body_args: Dict[str, Any] = {} + if json is not None and should_validate: + body_adapter = TypeAdapter( + Annotated[ + Optional[Union[StrictBytes, StrictStr]], + Field( + description="The assets for a webscript function can be provided as
    • A single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • Separate files in a multipart/form-data request
    • A reference to the assets of another webscript in the copy argument
    The required webscript.json json file contains the function metadata, and must have a runtime attribute that is one of the supported runtimes (see GET /registry/v2/runtimes?functionType=webscripts). For each runtime other files will be required or supported. " + ), + ] + ) + json = body_adapter.validate_python(json) # type: ignore # https://github.com/pydantic/pydantic/discussions/7094 + body_args["json"] = json body_args["content"] = content body_args["files"] = files @@ -570,12 +633,18 @@ async def delete_asset( :type wildcard: str :param query: URL Query parameters. :type query: DeleteAssetQuery | QueryParamTypes, optional + :param query['scaleToZero'] (dict)
    query.scale_to_zero (Query) : If set to true, after successful deployment, the deployed function will be scaled to zero. This saves computing resources when the function is not to be used immediately. + :type query['scaleToZero']: bool + :param query['deploy'] (dict)
    query.deploy (Query) : Indicates that a function should be _deployed_ when its assets are valid. * If `true` (default), jobs to build and deploy the function will be initiated after it is checked that the assets are valid. Invalid assets lead to a validation error, and the function and its assets are not created or updated. * If `false`, the uploaded assets are stored and the function is created/updated in `registered` state. Asset validation errors are only returned as warning, and stored as `failureReason` on the function entity. Use an _asset update_ or _rebuild_ to initiate a build and deploy at a later stage. + :type query['deploy']: bool + :param query['chown'] (dict)
    query.chown (Query) : If set, ownership of the draft function is transferred to the current user. + :type query['chown']: bool :param query['comment'] (dict)
    query.comment (Query) : An optional user-specified comment corresponding to the operation. :type query['comment']: str + :param query['author'] (dict)
    query.author (Query) : Optionally changes the author metadata when updating a function. + :type query['author']: str :param query['async'] (dict)
    query.var_async (Query) : Unless this is set to false, the server will start the required job actions asynchronously and return a 202 Accepted response. If false the request will block until the job actions are completed, or a timeout occurs. :type query['async']: bool - :param query['chown'] (dict)
    query.chown (Query) : If set, ownership of the draft function is transferred to the current user. (required) - :type query['chown']: bool :param raw_response: If true, return the http Response object instead of returning an api model object, or throwing an ApiError. :param select_path: Denotes the json path applied to the response object before returning it. Set it to the empty string `""` to receive the full response object. @@ -624,7 +693,9 @@ async def delete_asset( "202": PostWebscriptJobAsyncResponseV2 if not select_path else Model, } ) - non_200_response_types_map: Dict[str, Any] = {} + non_200_response_types_map: Dict[str, Any] = { + "403": RegistryErrorResponse, + } response_types_map.update(non_200_response_types_map) ## peform request @@ -1756,7 +1827,7 @@ async def list( ) -> LatestWebscriptsResponseV2 | T | Response | Model: """List Webscripts. - List the (latest) versions of available webscripts. ### List Latest Webscript Versions By default, the result includes the latest non-deprecated, non-draft version for each webscript name. If there is no such version, the latest _deprecated_ or the latest _draft_ version is included, with the former taking precedence. Use the boolean query parameters includeDeprecated or includeDraft to change this behaviour:
    • includeDeprecated=true: do not prefer non-deprecated versions as a latest version: if the latest version is a deprecated one, it will be shown, even if there are older non-deprecated versions.
    • includeDraft=true: do not prefer non-draft versions as a latest version: if the latest version is a draft, it will be shown, even if there are older non-draft versions.
    As long as no _version filters_ are used, each listed webscript version item will contain a HAL **link to the latest** _draft_ (`entities[]._links.draft`) or latest _published_ (`entities[]._links.publisned`) version (if existing and different). ### List Latest Webscript Versions (with filter) When any of the _version filter_ query parameters are used, the response contains the _latest_ version per named webscript that satisfy the filters, but **without links**. ### List All Webscript Versions When using `latest=false` (default when using the `namedVersion` filter), the listing contains _all_ webscripts versions that satisfy the query, possibly multiple versions per named webscripts. No HAL links are provided. #### Filter on _status_ By default webscript versions with status `undeployed` are **excluded** in all cases. Use the _version filter_ `status` to include/exclude a status from the results. By example, > `?status=any&includeDeprecated=true&includeDraft=true&latest=false` will list _ALL_ versions known to the function registry. #### Version filter parameters The following query parameters are _version filters_ for the webscript listing: > `version`, `status`, `runtimeVersion`, `createdBy`, `createdBefore`, `createdAfter`, `updatedBy`, `updatedBefore`, `updatedAfter`, `nameVersion`, `deprecated`, `draft` + List the (latest) versions of available webscripts. ### List Latest Webscript Versions By default, the result includes the latest non-deprecated, non-draft version for each webscript name. If there is no such version, the latest _deprecated_ or the latest _draft_ version is included, with the former taking precedence. Use the boolean query parameters includeDeprecated or includeDraft to change this behaviour:
    • includeDeprecated=true: do not prefer non-deprecated versions as a latest version: if the latest version is a deprecated one, it will be shown, even if there are older non-deprecated versions.
    • includeDraft=true: do not prefer non-draft versions as a latest version: if the latest version is a draft, it will be shown, even if there are older non-draft versions.
    As long as no version filters are used, each listed webscript version contains representations of the latest draft (`entities[]._links.draft`) or latest published (`entities[]._links.published`) version (if existing and different). Use the query parameter `showRelated` to include only a link (default `showRelated=link`) or a full representation (`showRelated=embed`). ### List Latest Webscript Versions (with filter) When any of the _version filter_ query parameters are used, the response contains the _latest_ version per named webscript that satisfy the filters, but **without links**. ### List All Webscript Versions When using `latest=false` (default when using the `namedVersion` filter), the listing contains _all_ webscripts versions that satisfy the query, possibly multiple versions per named webscripts. No HAL links are provided. #### Filter on _status_ By default webscript versions with status `undeployed` are **excluded** in all cases. Use the _version filter_ `status` to include/exclude a status from the results. By example, > `?status=any&includeDeprecated=true&includeDraft=true&latest=false` will list _ALL_ versions known to the function registry. #### Version filter parameters The following query parameters are _version filters_ for the webscript listing: > `version`, `status`, `runtimeVersion`, `createdBy`, `createdBefore`, `createdAfter`, `updatedBy`, `updatedBefore`, `updatedAfter`, `nameVersion`, `deprecated`, `draft` :param query: URL Query parameters. :type query: ListQuery | QueryParamTypes, optional :param query['limit'] (dict)
    query.limit (Query) : The maximum number of items to be return from this query. Has a deployment-defined default and maximum value. @@ -1799,6 +1870,8 @@ async def list( :type query['runtime']: List[str] :param query['latest'] (dict)
    query.latest (Query) : When `true`, only the latest version per function name is returned. If set to `false`, multiple versions per named function can be returned. Defaults to `true`, except when specific versions are selected with the `nameVersion` filter. :type query['latest']: bool + :param query['showRelated'] (dict)
    query.show_related (Query) : Sets the representation of related function versions (like the _latest_ draft and/or published) in the response. - `embed`: as full summary representation (in `_embedded`). - `link`: as HAL link in (in `_links`). - `none`: omitted. + :type query['showRelated']: ShowRelatedType :param raw_response: If true, return the http Response object instead of returning an api model object, or throwing an ApiError. :param select_path: Denotes the json path applied to the response object before returning it. Set it to the empty string `""` to receive the full response object. @@ -2148,8 +2221,12 @@ async def publish( :type version: str :param query: URL Query parameters. :type query: PublishQuery | QueryParamTypes, optional + :param query['chown'] (dict)
    query.chown (Query) : If set, ownership of the draft function is transferred to the current user. + :type query['chown']: bool :param query['comment'] (dict)
    query.comment (Query) : An optional user-specified comment corresponding to the operation. :type query['comment']: str + :param query['author'] (dict)
    query.author (Query) : Optionally changes the author metadata when updating a function. + :type query['author']: str :param query['deprecatePrevious'] (dict)
    query.deprecate_previous (Query) : Set the cleanup policy used to automatically deprecate/delete previous versions. :type query['deprecatePrevious']: DeprecatePreviousPolicy :param query['async'] (dict)
    query.var_async (Query) : Unless this is set to false, the server will start the required job actions asynchronously and return a 202 Accepted response. If false the request will block until the job actions are completed, or a timeout occurs. @@ -2327,6 +2404,8 @@ async def rebuild( :type version: str :param query: URL Query parameters. :type query: RebuildQuery | QueryParamTypes, optional + :param query['scaleToZero'] (dict)
    query.scale_to_zero (Query) : Indicates whether the function needs to be scaled down after successful verification. If not set, the function is scaled to zero only if it was not active before this command. + :type query['scaleToZero']: bool :param query['comment'] (dict)
    query.comment (Query) : An optional user-specified comment corresponding to the operation. :type query['comment']: str :param query['dryRun'] (dict)
    query.dry_run (Query) : If set to true, checks whether rebuild jobs are needed, but do not start any jobs. @@ -2339,8 +2418,6 @@ async def rebuild( :type query['forceVersion']: str :param query['ignoreChecks'] (dict)
    query.ignore_checks (Query) : If set to true, checks that normally prevent a rebuild are overriden. These checks include: * function state in `pending`, `running`, `failed` or `undeployed` * backoff period due to recent failures * usage of deprecated dependencies * running jobs on entity * the `dryRun` option :type query['ignoreChecks']: bool - :param query['scaleToZero'] (dict)
    query.scale_to_zero (Query) : Indicates whether the function needs to be scaled down after successful (re-)deployment. If not set, the function is scaled to zero only if it was not active before this command. - :type query['scaleToZero']: bool :param query['skipRebuild'] (dict)
    query.skip_rebuild (Query) : If set, the function will not be rebuild. Always uses the current runtime version when re-deploying/re-verifying the function. :type query['skipRebuild']: bool :param raw_response: If true, return the http Response object instead of returning an api model object, or throwing an ApiError. @@ -2903,12 +2980,18 @@ async def update_asset( :type content: ContentRequest, optional :param query: URL Query parameters. :type query: UpdateAssetQuery | QueryParamTypes, optional + :param query['scaleToZero'] (dict)
    query.scale_to_zero (Query) : If set to true, after successful deployment, the deployed function will be scaled to zero. This saves computing resources when the function is not to be used immediately. + :type query['scaleToZero']: bool + :param query['deploy'] (dict)
    query.deploy (Query) : Indicates that a function should be _deployed_ when its assets are valid. * If `true` (default), jobs to build and deploy the function will be initiated after it is checked that the assets are valid. Invalid assets lead to a validation error, and the function and its assets are not created or updated. * If `false`, the uploaded assets are stored and the function is created/updated in `registered` state. Asset validation errors are only returned as warning, and stored as `failureReason` on the function entity. Use an _asset update_ or _rebuild_ to initiate a build and deploy at a later stage. + :type query['deploy']: bool + :param query['chown'] (dict)
    query.chown (Query) : If set, ownership of the draft function is transferred to the current user. + :type query['chown']: bool :param query['comment'] (dict)
    query.comment (Query) : An optional user-specified comment corresponding to the operation. :type query['comment']: str + :param query['author'] (dict)
    query.author (Query) : Optionally changes the author metadata when updating a function. + :type query['author']: str :param query['async'] (dict)
    query.var_async (Query) : Unless this is set to false, the server will start the required job actions asynchronously and return a 202 Accepted response. If false the request will block until the job actions are completed, or a timeout occurs. :type query['async']: bool - :param query['chown'] (dict)
    query.chown (Query) : If set, ownership of the draft function is transferred to the current user. (required) - :type query['chown']: bool :param raw_response: If true, return the http Response object instead of returning an api model object, or throwing an ApiError. :param select_path: Denotes the json path applied to the response object before returning it. Set it to the empty string `""` to receive the full response object. @@ -2958,7 +3041,9 @@ async def update_asset( "202": PostWebscriptJobAsyncResponseV2 if not select_path else Model, } ) - non_200_response_types_map: Dict[str, Any] = {} + non_200_response_types_map: Dict[str, Any] = { + "403": RegistryErrorResponse, + } response_types_map.update(non_200_response_types_map) ## peform request @@ -2986,7 +3071,7 @@ async def update_assets( content: Annotated[ RequestContent | None, Field( - description="The assets for a webscript function can be provided as either
    • a single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • separate files in a multipart/form-data request
    The provided assets will be added to the webscript function's collection of existing assets, replacing any existing assets with the same name. Please note that it is not allowed to update the webscript.json json file with a changed value for any of the name, version and/or runtime attributes. For each runtime other files are supported. " + description="The assets for a webscript function can be provided as either
    • a single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • separate files in a multipart/form-data request
    The provided assets will be added to the webscript function's collection of existing assets, replacing any existing assets with the same name. Please note that it is not allowed to update the webscript.json json file with a changed value for any of the name, version and/or runtime attributes. For each runtime other files are supported. " ), ] = None, files: Annotated[ @@ -3011,7 +3096,7 @@ async def update_assets( content: Annotated[ RequestContent | None, Field( - description="The assets for a webscript function can be provided as either
    • a single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • separate files in a multipart/form-data request
    The provided assets will be added to the webscript function's collection of existing assets, replacing any existing assets with the same name. Please note that it is not allowed to update the webscript.json json file with a changed value for any of the name, version and/or runtime attributes. For each runtime other files are supported. " + description="The assets for a webscript function can be provided as either
    • a single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • separate files in a multipart/form-data request
    The provided assets will be added to the webscript function's collection of existing assets, replacing any existing assets with the same name. Please note that it is not allowed to update the webscript.json json file with a changed value for any of the name, version and/or runtime attributes. For each runtime other files are supported. " ), ] = None, files: Annotated[ @@ -3036,7 +3121,7 @@ async def update_assets( content: Annotated[ RequestContent | None, Field( - description="The assets for a webscript function can be provided as either
    • a single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • separate files in a multipart/form-data request
    The provided assets will be added to the webscript function's collection of existing assets, replacing any existing assets with the same name. Please note that it is not allowed to update the webscript.json json file with a changed value for any of the name, version and/or runtime attributes. For each runtime other files are supported. " + description="The assets for a webscript function can be provided as either
    • a single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • separate files in a multipart/form-data request
    The provided assets will be added to the webscript function's collection of existing assets, replacing any existing assets with the same name. Please note that it is not allowed to update the webscript.json json file with a changed value for any of the name, version and/or runtime attributes. For each runtime other files are supported. " ), ] = None, files: Annotated[ @@ -3061,7 +3146,7 @@ async def update_assets( content: Annotated[ RequestContent | None, Field( - description="The assets for a webscript function can be provided as either
    • a single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • separate files in a multipart/form-data request
    The provided assets will be added to the webscript function's collection of existing assets, replacing any existing assets with the same name. Please note that it is not allowed to update the webscript.json json file with a changed value for any of the name, version and/or runtime attributes. For each runtime other files are supported. " + description="The assets for a webscript function can be provided as either
    • a single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • separate files in a multipart/form-data request
    The provided assets will be added to the webscript function's collection of existing assets, replacing any existing assets with the same name. Please note that it is not allowed to update the webscript.json json file with a changed value for any of the name, version and/or runtime attributes. For each runtime other files are supported. " ), ] = None, files: Annotated[ @@ -3086,7 +3171,7 @@ async def update_assets( content: Annotated[ RequestContent | None, Field( - description="The assets for a webscript function can be provided as either
    • a single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • separate files in a multipart/form-data request
    The provided assets will be added to the webscript function's collection of existing assets, replacing any existing assets with the same name. Please note that it is not allowed to update the webscript.json json file with a changed value for any of the name, version and/or runtime attributes. For each runtime other files are supported. " + description="The assets for a webscript function can be provided as either
    • a single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • separate files in a multipart/form-data request
    The provided assets will be added to the webscript function's collection of existing assets, replacing any existing assets with the same name. Please note that it is not allowed to update the webscript.json json file with a changed value for any of the name, version and/or runtime attributes. For each runtime other files are supported. " ), ] = None, files: Annotated[ @@ -3110,7 +3195,7 @@ async def update_assets( content: Annotated[ RequestContent | None, Field( - description="The assets for a webscript function can be provided as either
    • a single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • separate files in a multipart/form-data request
    The provided assets will be added to the webscript function's collection of existing assets, replacing any existing assets with the same name. Please note that it is not allowed to update the webscript.json json file with a changed value for any of the name, version and/or runtime attributes. For each runtime other files are supported. " + description="The assets for a webscript function can be provided as either
    • a single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • separate files in a multipart/form-data request
    The provided assets will be added to the webscript function's collection of existing assets, replacing any existing assets with the same name. Please note that it is not allowed to update the webscript.json json file with a changed value for any of the name, version and/or runtime attributes. For each runtime other files are supported. " ), ] = None, files: Annotated[ @@ -3131,23 +3216,29 @@ async def update_assets( ): """Update Webscript Assets. - Update a draft webscript function by updating its assets. The assets for a webscript function can be provided as either
    • a single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • separate files in a multipart/form-data request
    The provided assets will be added to the webscript function's collection of existing assets, replacing any existing assets with the same name. Please note that it is not allowed to update the webscript.json json file with a changed value for any of the name, version and/or runtime attributes. For each runtime other files are supported. + Update a draft webscript function by updating its assets. The assets for a webscript function can be provided as either
    • a single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • separate files in a multipart/form-data request
    The provided assets will be added to the webscript function's collection of existing assets, replacing any existing assets with the same name. Please note that it is not allowed to update the webscript.json json file with a changed value for any of the name, version and/or runtime attributes. For each runtime other files are supported. :param name: The name of the function. (required) :type name: str :param version: The version of the function. (required) :type version: str - :param content: The assets for a webscript function can be provided as either
    • a single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • separate files in a multipart/form-data request
    The provided assets will be added to the webscript function's collection of existing assets, replacing any existing assets with the same name. Please note that it is not allowed to update the webscript.json json file with a changed value for any of the name, version and/or runtime attributes. For each runtime other files are supported. + :param content: The assets for a webscript function can be provided as either
    • a single tar archive (optionally compressed), with one of the content types application/octet-stream, application/tar, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip
    • separate files in a multipart/form-data request
    The provided assets will be added to the webscript function's collection of existing assets, replacing any existing assets with the same name. Please note that it is not allowed to update the webscript.json json file with a changed value for any of the name, version and/or runtime attributes. For each runtime other files are supported. :type content: ContentRequest, optional :param files: The files of a `content-type: multipart/form-data` request. :type files: FilesRequest, optional :param query: URL Query parameters. :type query: UpdateAssetsQuery | QueryParamTypes, optional + :param query['scaleToZero'] (dict)
    query.scale_to_zero (Query) : If set to true, after successful deployment, the deployed function will be scaled to zero. This saves computing resources when the function is not to be used immediately. + :type query['scaleToZero']: bool + :param query['deploy'] (dict)
    query.deploy (Query) : Indicates that a function should be _deployed_ when its assets are valid. * If `true` (default), jobs to build and deploy the function will be initiated after it is checked that the assets are valid. Invalid assets lead to a validation error, and the function and its assets are not created or updated. * If `false`, the uploaded assets are stored and the function is created/updated in `registered` state. Asset validation errors are only returned as warning, and stored as `failureReason` on the function entity. Use an _asset update_ or _rebuild_ to initiate a build and deploy at a later stage. + :type query['deploy']: bool + :param query['chown'] (dict)
    query.chown (Query) : If set, ownership of the draft function is transferred to the current user. + :type query['chown']: bool :param query['comment'] (dict)
    query.comment (Query) : An optional user-specified comment corresponding to the operation. :type query['comment']: str + :param query['author'] (dict)
    query.author (Query) : Optionally changes the author metadata when updating a function. + :type query['author']: str :param query['async'] (dict)
    query.var_async (Query) : Unless this is set to false, the server will start the required job actions asynchronously and return a 202 Accepted response. If false the request will block until the job actions are completed, or a timeout occurs. :type query['async']: bool - :param query['chown'] (dict)
    query.chown (Query) : If set, ownership of the draft function is transferred to the current user. (required) - :type query['chown']: bool :param raw_response: If true, return the http Response object instead of returning an api model object, or throwing an ApiError. :param select_path: Denotes the json path applied to the response object before returning it. Set it to the empty string `""` to receive the full response object. @@ -3197,7 +3288,9 @@ async def update_assets( "202": PostWebscriptJobAsyncResponseV2 if not select_path else Model, } ) - non_200_response_types_map: Dict[str, Any] = {} + non_200_response_types_map: Dict[str, Any] = { + "403": RegistryErrorResponse, + } response_types_map.update(non_200_response_types_map) ## peform request @@ -3323,12 +3416,10 @@ async def verify( :type version: str :param query: URL Query parameters. :type query: VerifyQuery | QueryParamTypes, optional - :param query['comment'] (dict)
    query.comment (Query) : An optional user-specified comment corresponding to the operation. - :type query['comment']: str - :param query['async'] (dict)
    query.var_async (Query) : Unless this is set to false, the server will start the required job actions asynchronously and return a 202 Accepted response. If false the request will block until the job actions are completed, or a timeout occurs. - :type query['async']: bool :param query['scaleToZero'] (dict)
    query.scale_to_zero (Query) : Indicates whether the function needs to be scaled down after successful verification. If not set, the function is scaled to zero only if it was not active before this command. :type query['scaleToZero']: bool + :param query['async'] (dict)
    query.var_async (Query) : Unless this is set to false, the server will start the required job actions asynchronously and return a 202 Accepted response. If false the request will block until the job actions are completed, or a timeout occurs. + :type query['async']: bool :param raw_response: If true, return the http Response object instead of returning an api model object, or throwing an ApiError. :param select_path: Denotes the json path applied to the response object before returning it. Set it to the empty string `""` to receive the full response object. diff --git a/waylay-sdk-registry/src/waylay/services/registry/service/__init__.py b/waylay-sdk-registry/src/waylay/services/registry/service/__init__.py index b6fba1f0..3154ae26 100644 --- a/waylay-sdk-registry/src/waylay/services/registry/service/__init__.py +++ b/waylay-sdk-registry/src/waylay/services/registry/service/__init__.py @@ -3,7 +3,7 @@ This code was generated from the OpenAPI documentation of 'Waylay Function Registry' -version: 2.12.4 +version: 2.13.0 V2 API to build and deploy Waylay functions (plugs, webscripts, BYOML models). @@ -12,7 +12,7 @@ Do not edit the class manually. """ -__version__ = "2.12.4.20240415" +__version__ = "2.13.0b20240415" from .service import RegistryService diff --git a/waylay-sdk-registry/src/waylay/services/registry/service/service.py b/waylay-sdk-registry/src/waylay/services/registry/service/service.py index 7956a90c..2c8f4dff 100644 --- a/waylay-sdk-registry/src/waylay/services/registry/service/service.py +++ b/waylay-sdk-registry/src/waylay/services/registry/service/service.py @@ -4,11 +4,11 @@ from ..api.about_api import AboutApi from ..api.jobs_api import JobsApi -from ..api.model_functions_api import ModelFunctionsApi -from ..api.plug_functions_api import PlugFunctionsApi +from ..api.models_api import ModelsApi +from ..api.plugs_api import PlugsApi from ..api.runtimes_api import RuntimesApi from ..api.schemas_api import SchemasApi -from ..api.webscript_functions_api import WebscriptFunctionsApi +from ..api.webscripts_api import WebscriptsApi class RegistryService(WaylayService): @@ -19,11 +19,11 @@ class RegistryService(WaylayService): about: AboutApi jobs: JobsApi - model_functions: ModelFunctionsApi - plug_functions: PlugFunctionsApi + models: ModelsApi + plugs: PlugsApi runtimes: RuntimesApi schemas: SchemasApi - webscript_functions: WebscriptFunctionsApi + webscripts: WebscriptsApi def __init__(self, api_client: ApiClient): """Create the registry service.""" @@ -31,8 +31,8 @@ def __init__(self, api_client: ApiClient): super().__init__(api_client) self.about = AboutApi(api_client) self.jobs = JobsApi(api_client) - self.model_functions = ModelFunctionsApi(api_client) - self.plug_functions = PlugFunctionsApi(api_client) + self.models = ModelsApi(api_client) + self.plugs = PlugsApi(api_client) self.runtimes = RuntimesApi(api_client) self.schemas = SchemasApi(api_client) - self.webscript_functions = WebscriptFunctionsApi(api_client) + self.webscripts = WebscriptsApi(api_client)