diff --git a/generator/src/main/resources/crust/reqwest/api.mustache b/generator/src/main/resources/crust/reqwest/api.mustache index 86cc578..9f228b3 100644 --- a/generator/src/main/resources/crust/reqwest/api.mustache +++ b/generator/src/main/resources/crust/reqwest/api.mustache @@ -152,7 +152,6 @@ impl {{{operationIdCamelCase}}}Error { {{#notes}} /// {{{.}}} {{/notes}} - {{#vendorExtensions.x-consumeMultipleMediaTypes}} pub fn {{{operationId}}}(configuration: &configuration::Configuration, {{#allParams}} {{#isBodyParam}} body : {{{operationIdCamelCase}}}Body{{/isBodyParam}} {{^isBodyParam}} {{{paramName}}}: {{^required}}Option<{{/required}}{{#required}}{{#isNullable}}Option<{{/isNullable}}{{/required}}{{#isString}}{{#isArray}}Vec<{{/isArray}}{{^isUuid}}&str{{/isUuid}}{{#isArray}}>{{/isArray}}{{/isString}}{{#isUuid}}{{#isArray}}Vec<{{/isArray}}&str{{#isArray}}>{{/isArray}}{{/isUuid}}{{^isString}}{{^isUuid}}{{^isPrimitiveType}}{{/isPrimitiveType}}{{{dataType}}}{{/isUuid}}{{/isString}}{{^required}}>{{/required}}{{#required}}{{#isNullable}}>{{/isNullable}}{{/required}}{{/isBodyParam}}{{^-last}}, {{/-last}}{{/allParams}} diff --git a/src/apis/default_api.rs b/src/apis/default_api.rs index d219912..ead7c22 100644 --- a/src/apis/default_api.rs +++ b/src/apis/default_api.rs @@ -2012,7 +2012,6 @@ impl UsersUserIdTagsTagPutError { } /// Update the backup passphrase. If the backup passphrase is not set yet, use \"\" as currentPassphrase. *WARNING:* Like the unlock passphrase, this configuration can't be reset by an admin user without knowing the current value, so if the backup passphrase is lost, neither can it be reset to a new value nor can the created backups be restored. - pub fn config_backup_passphrase_put( configuration: &configuration::Configuration, backup_passphrase_config: crate::models::BackupPassphraseConfig, @@ -2058,7 +2057,6 @@ pub fn config_backup_passphrase_put( } /// Get logging configuration. Protocol is always syslog over UDP. Configurable are IP adress and port, log level. - pub fn config_logging_get( configuration: &configuration::Configuration, ) -> Result, Error> { @@ -2101,7 +2099,6 @@ pub fn config_logging_get( } /// Configure log level and destination. - pub fn config_logging_put( configuration: &configuration::Configuration, logging_config: crate::models::LoggingConfig, @@ -2144,7 +2141,6 @@ pub fn config_logging_put( } /// Get network configuration. IP address, netmask, router. - pub fn config_network_get( configuration: &configuration::Configuration, ) -> Result, Error> { @@ -2187,7 +2183,6 @@ pub fn config_network_get( } /// Configure network. - pub fn config_network_put( configuration: &configuration::Configuration, network_config: crate::models::NetworkConfig, @@ -2230,7 +2225,6 @@ pub fn config_network_put( } /// Get system time. - pub fn config_time_get( configuration: &configuration::Configuration, ) -> Result, Error> { @@ -2273,7 +2267,6 @@ pub fn config_time_get( } /// Configure system time. - pub fn config_time_put( configuration: &configuration::Configuration, time_config: crate::models::TimeConfig, @@ -2316,7 +2309,6 @@ pub fn config_time_put( } /// Get certificate for NetHSMs https API. - pub fn config_tls_cert_pem_get( configuration: &configuration::Configuration, ) -> Result, Error> { @@ -2359,7 +2351,6 @@ pub fn config_tls_cert_pem_get( } /// Set certificate for NetHSMs https API e.g. to replace self-signed intital certificate. - pub fn config_tls_cert_pem_put( configuration: &configuration::Configuration, body: &str, @@ -2402,7 +2393,6 @@ pub fn config_tls_cert_pem_put( } /// Get NetHSM certificate signing request e.g. to replace self-signed intital certificate. - pub fn config_tls_csr_pem_post( configuration: &configuration::Configuration, distinguished_name: crate::models::DistinguishedName, @@ -2447,7 +2437,6 @@ pub fn config_tls_csr_pem_post( } /// Generate a new pair of public and private key for NetHSM's https API. - pub fn config_tls_generate_post( configuration: &configuration::Configuration, tls_key_generate_request_data: crate::models::TlsKeyGenerateRequestData, @@ -2490,7 +2479,6 @@ pub fn config_tls_generate_post( } /// Get public key for NetHSMs https API. - pub fn config_tls_public_pem_get( configuration: &configuration::Configuration, ) -> Result, Error> { @@ -2536,7 +2524,6 @@ pub fn config_tls_public_pem_get( } /// Read unattended boot configuration: is it on or off? - pub fn config_unattended_boot_get( configuration: &configuration::Configuration, ) -> Result, Error> @@ -2583,7 +2570,6 @@ pub fn config_unattended_boot_get( } /// Configure unattended boot: switch it on or off (flip the switch). - pub fn config_unattended_boot_put( configuration: &configuration::Configuration, unattended_boot_config: crate::models::UnattendedBootConfig, @@ -2629,7 +2615,6 @@ pub fn config_unattended_boot_put( } /// Update the unlock passphrase. *WARNING:* The unlock passphrase can't be reset by an admin user without knowing the current value, so if the unlock passphrase is lost, neither can it be reset to a new value nor can the NetHSM be unlocked. - pub fn config_unlock_passphrase_put( configuration: &configuration::Configuration, unlock_passphrase_config: crate::models::UnlockPassphraseConfig, @@ -2675,7 +2660,6 @@ pub fn config_unlock_passphrase_put( } /// Retrieve whether NetHSM is fully started but not ready to take traffic. This corresponds to the state *Locked* or *Unprovisioned*. - pub fn health_alive_get( configuration: &configuration::Configuration, ) -> Result, Error> { @@ -2711,7 +2695,6 @@ pub fn health_alive_get( } /// Retrieve whether NetHSM is in state *Operational* and thus ready to take traffic. - pub fn health_ready_get( configuration: &configuration::Configuration, ) -> Result, Error> { @@ -2747,7 +2730,6 @@ pub fn health_ready_get( } /// Retrieve the state of NetHSM. - pub fn health_state_get( configuration: &configuration::Configuration, ) -> Result, Error> { @@ -2785,7 +2767,6 @@ pub fn health_state_get( } /// Information about the vendor and product. - pub fn info_get( configuration: &configuration::Configuration, ) -> Result, Error> { @@ -2823,7 +2804,6 @@ pub fn info_get( } /// Generate a pair of public and private key and store it in NetHSM. KeyID is optional as a parameter and will be generated by NetHSM if not present. The key is stored in the caller's namespace. - pub fn keys_generate_post( configuration: &configuration::Configuration, key_generate_request_data: crate::models::KeyGenerateRequestData, @@ -2868,7 +2848,6 @@ pub fn keys_generate_post( } /// Get a list of the identifiers of all keys that are currently stored in NetHSM. If the caller is in a namespace, only keys in that namespace are returned. Separate requests need to be made to request the individual key data. - pub fn keys_get( configuration: &configuration::Configuration, filter: Option<&str>, @@ -2916,7 +2895,6 @@ pub fn keys_get( } /// Delete the certificate. - pub fn keys_key_id_cert_delete( configuration: &configuration::Configuration, key_id: &str, @@ -2962,7 +2940,6 @@ pub fn keys_key_id_cert_delete( } /// Retrieve a stored certificate in the exact format it was stored. - pub fn keys_key_id_cert_get( configuration: &configuration::Configuration, key_id: &str, @@ -3010,7 +2987,6 @@ pub fn keys_key_id_cert_get( } /// Store a certificate. Maximum size 1MB. The Content-Type must be application/octet-stream. - pub fn keys_key_id_cert_put( configuration: &configuration::Configuration, key_id: &str, @@ -3059,7 +3035,6 @@ pub fn keys_key_id_cert_put( } /// Retrieve a certificate signing request in PEM format. - pub fn keys_key_id_csr_pem_post( configuration: &configuration::Configuration, key_id: &str, @@ -3109,7 +3084,6 @@ pub fn keys_key_id_csr_pem_post( } /// Decrypt an encrypted message with the secret key. - pub fn keys_key_id_decrypt_post( configuration: &configuration::Configuration, key_id: &str, @@ -3159,7 +3133,6 @@ pub fn keys_key_id_decrypt_post( } /// Delete a pair of public and private key. - pub fn keys_key_id_delete( configuration: &configuration::Configuration, key_id: &str, @@ -3205,7 +3178,6 @@ pub fn keys_key_id_delete( } /// Encrypt a message with the secret key. - pub fn keys_key_id_encrypt_post( configuration: &configuration::Configuration, key_id: &str, @@ -3255,7 +3227,6 @@ pub fn keys_key_id_encrypt_post( } /// Retrieve the public key. - pub fn keys_key_id_get( configuration: &configuration::Configuration, key_id: &str, @@ -3303,7 +3274,6 @@ pub fn keys_key_id_get( } /// Retrieve public key in PEM format. - pub fn keys_key_id_public_pem_get( configuration: &configuration::Configuration, key_id: &str, @@ -3351,7 +3321,6 @@ pub fn keys_key_id_public_pem_get( } /// Import a private key into NetHSM and store it under the *KeyID* path. The public key will be automatically derived. The parameters of the key can be passed as a PEM file or a JSON object. The key is stored in the caller's namespace. - pub fn keys_key_id_put( configuration: &configuration::Configuration, key_id: &str, @@ -3405,7 +3374,6 @@ pub fn keys_key_id_put( } /// Delete a tag from the authorized set - pub fn keys_key_id_restrictions_tags_tag_delete( configuration: &configuration::Configuration, tag: &str, @@ -3453,7 +3421,6 @@ pub fn keys_key_id_restrictions_tags_tag_delete( } /// Add a tag to the authorized set - pub fn keys_key_id_restrictions_tags_tag_put( configuration: &configuration::Configuration, tag: &str, @@ -3501,7 +3468,6 @@ pub fn keys_key_id_restrictions_tags_tag_put( } /// Sign a message with the secret key. - pub fn keys_key_id_sign_post( configuration: &configuration::Configuration, key_id: &str, @@ -3551,7 +3517,6 @@ pub fn keys_key_id_sign_post( } /// Import a private key into NetHSM and let NetHSM generate a KeyID. The public key will be automatically derived. The parameters of the key can be passed as a PEM file or a JSON object. The key is stored in the caller's namespace. - pub fn keys_post( configuration: &configuration::Configuration, body: KeysPostBody, @@ -3602,7 +3567,6 @@ pub fn keys_post( } /// Brings an *Operational* NetHSM into *Locked* state. - pub fn lock_post( configuration: &configuration::Configuration, ) -> Result, Error> { @@ -3643,7 +3607,6 @@ pub fn lock_post( } /// Get metrics. Precondition: NetHSM is *Operational* and a **R-Metrics** can be authenticated. - pub fn metrics_get( configuration: &configuration::Configuration, ) -> Result, Error> { @@ -3686,7 +3649,6 @@ pub fn metrics_get( } /// Get a list of all created namespaces. Note that users may be assigned namespaces not present in this list, as long as the namespace has not been created. - pub fn namespaces_get( configuration: &configuration::Configuration, ) -> Result>, Error> { @@ -3729,7 +3691,6 @@ pub fn namespaces_get( } /// Delete a namespace. **WARNING: all keys from that namespace are deleted.** - pub fn namespaces_namespace_id_delete( configuration: &configuration::Configuration, namespace_id: &str, @@ -3775,7 +3736,6 @@ pub fn namespaces_namespace_id_delete( } /// Create a namespace on keyfender. All users in that namespace can now be used, and all user management power is delegated to admins in that namespace. - pub fn namespaces_namespace_id_put( configuration: &configuration::Configuration, namespace_id: &str, @@ -3821,7 +3781,6 @@ pub fn namespaces_namespace_id_put( } /// Initial provisioning, only available in *Unprovisioned* state. *WARNING:* The unlock passphrase can't be reset by an admin user without knowing the current value, so if the unlock passphrase is lost, neither can it be reset to a new value nor can the NetHSM be unlocked. - pub fn provision_post( configuration: &configuration::Configuration, provision_request_data: crate::models::ProvisionRequestData, @@ -3859,7 +3818,6 @@ pub fn provision_post( } /// Retrieve cryptographically strong random bytes from NetHSM. Precondition: NetHSM is *Operational* and a **R-Operator** can be authenticated. - pub fn random_post( configuration: &configuration::Configuration, random_request_data: crate::models::RandomRequestData, @@ -3904,7 +3862,6 @@ pub fn random_post( } /// Back up the key store to a backup file. - pub fn system_backup_post( configuration: &configuration::Configuration, ) -> Result>, Error> { @@ -3947,7 +3904,6 @@ pub fn system_backup_post( } /// Cancel update of NetHSM software. - pub fn system_cancel_update_post( configuration: &configuration::Configuration, ) -> Result, Error> { @@ -3988,7 +3944,6 @@ pub fn system_cancel_update_post( } /// Commit update of NetHSM software. - pub fn system_commit_update_post( configuration: &configuration::Configuration, ) -> Result, Error> { @@ -4029,7 +3984,6 @@ pub fn system_commit_update_post( } /// Reset NetHSM to factory settings. - pub fn system_factory_reset_post( configuration: &configuration::Configuration, ) -> Result, Error> { @@ -4070,7 +4024,6 @@ pub fn system_factory_reset_post( } /// Get detailed system information, including firmware, system, and hardware version. - pub fn system_info_get( configuration: &configuration::Configuration, ) -> Result, Error> { @@ -4113,7 +4066,6 @@ pub fn system_info_get( } /// Reboot NetHSM. - pub fn system_reboot_post( configuration: &configuration::Configuration, ) -> Result, Error> { @@ -4154,7 +4106,6 @@ pub fn system_reboot_post( } /// Restore the key store and user store from a backup file. If NetHSM is *Unprovisioned*, then the configuration is restored. - pub fn system_restore_post( configuration: &configuration::Configuration, arguments: Option, @@ -4226,7 +4177,6 @@ pub fn system_restore_post( } /// Shut down NetHSM. - pub fn system_shutdown_post( configuration: &configuration::Configuration, ) -> Result, Error> { @@ -4267,7 +4217,6 @@ pub fn system_shutdown_post( } /// Update NetHSM software. - pub fn system_update_post( configuration: &configuration::Configuration, body: std::vec::Vec, @@ -4313,7 +4262,6 @@ pub fn system_update_post( } /// Brings a *Locked* NetHSM into *Operational* state. - pub fn unlock_post( configuration: &configuration::Configuration, unlock_request_data: crate::models::UnlockRequestData, @@ -4351,7 +4299,6 @@ pub fn unlock_post( } /// Get a list of all user ids that have accounts on NetHSM. If the caller is in a namespace, return only users in that namespace. - pub fn users_get( configuration: &configuration::Configuration, ) -> Result>, Error> { @@ -4394,7 +4341,6 @@ pub fn users_get( } /// Create a new user on NetHSM, inheriting the caller's namespace. The user-ID is generated by NetHSM. - pub fn users_post( configuration: &configuration::Configuration, user_post_data: crate::models::UserPostData, @@ -4439,7 +4385,6 @@ pub fn users_post( } /// Delete a user from keyfender. - pub fn users_user_id_delete( configuration: &configuration::Configuration, user_id: &str, @@ -4485,7 +4430,6 @@ pub fn users_user_id_delete( } /// Get user info: name and role. - pub fn users_user_id_get( configuration: &configuration::Configuration, user_id: &str, @@ -4533,7 +4477,6 @@ pub fn users_user_id_get( } /// Update the passphrase. - pub fn users_user_id_passphrase_post( configuration: &configuration::Configuration, user_id: &str, @@ -4581,7 +4524,6 @@ pub fn users_user_id_passphrase_post( } /// Create a new user on NetHSM, in the namespace specified as a prefix in the path with the format 'namespace~'. For example, a POST request on \"https://nethsm.local/v1/users/namespace1~\" will generate a user-ID and create that user in \"namespace1\". The namespace prefix *must* be present: for creating users without a namespace, use a POST on \"/v1/users\". - pub fn users_user_id_post( configuration: &configuration::Configuration, user_id: &str, @@ -4631,7 +4573,6 @@ pub fn users_user_id_post( } /// Create a user on keyfender. The new user must either be in the same namespace as the caller, or be in a namespace not created yet if the caller has no namespace. - pub fn users_user_id_put( configuration: &configuration::Configuration, user_id: &str, @@ -4679,7 +4620,6 @@ pub fn users_user_id_put( } /// Get the list of tags set to an Operator user. - pub fn users_user_id_tags_get( configuration: &configuration::Configuration, user_id: &str, @@ -4727,7 +4667,6 @@ pub fn users_user_id_tags_get( } /// Delete a tag from the Operator user - pub fn users_user_id_tags_tag_delete( configuration: &configuration::Configuration, user_id: &str, @@ -4775,7 +4714,6 @@ pub fn users_user_id_tags_tag_delete( } /// Add a tag to the Operator user. - pub fn users_user_id_tags_tag_put( configuration: &configuration::Configuration, user_id: &str,