diff --git a/kraken/src/api/handler/api_keys/schema.rs b/kraken/src/api/handler/api_keys/schema.rs index d1c5fdda6..b9d86cce2 100644 --- a/kraken/src/api/handler/api_keys/schema.rs +++ b/kraken/src/api/handler/api_keys/schema.rs @@ -7,7 +7,6 @@ use uuid::Uuid; #[derive(Deserialize, Serialize, JsonSchema, Debug, Clone)] pub struct CreateApiKeyRequest { /// A descriptive name helping the user to identify the key - // TODO #[schema(example = "Leech on my local machine")] pub name: String, } @@ -15,7 +14,6 @@ pub struct CreateApiKeyRequest { #[derive(Deserialize, Serialize, JsonSchema, Debug, Clone)] pub struct UpdateApiKeyRequest { /// A descriptive name helping the user to identify the key - // TODO #[schema(example = "Leech on my local machine")] pub name: String, } @@ -26,11 +24,9 @@ pub struct FullApiKey { pub uuid: Uuid, /// A descriptive name helping the user to identify the key - // TODO #[schema(example = "Leech on my local machine")] pub name: String, /// The actual key's value - // TODO #[schema(example = "fsn83r0jfis84nfthw...")] pub key: String, } diff --git a/kraken/src/api/handler/attack_results/schema.rs b/kraken/src/api/handler/attack_results/schema.rs index 012351322..555b75c22 100644 --- a/kraken/src/api/handler/attack_results/schema.rs +++ b/kraken/src/api/handler/attack_results/schema.rs @@ -96,7 +96,7 @@ pub struct SimpleQueryUnhashedResult { pub hashed_password: Option, /// An ip address - #[schemars(with = "Option")] // TODO + #[schemars(with = "Option")] pub ip_address: Option, /// A name @@ -277,7 +277,7 @@ pub enum DnsTxtScanEntry { spf_type: DnsTxtScanSpfType, /// If the txt_type is a SPF type that includes an IP (or whole IP range), it will be set here. - #[schemars(with = "Option")] // TODO + #[schemars(with = "Option")] spf_ip: Option, /// If the txt_type is a SPF type that includes a domain, it will be set here. diff --git a/kraken/src/api/handler/attacks/schema.rs b/kraken/src/api/handler/attacks/schema.rs index 3a1e85dba..15f8c32d8 100644 --- a/kraken/src/api/handler/attacks/schema.rs +++ b/kraken/src/api/handler/attacks/schema.rs @@ -23,14 +23,12 @@ pub struct BruteforceSubdomainsRequest { pub leech_uuid: Option, /// Domain to construct subdomains for - // TODO #[schema(example = "example.com")] pub domain: String, /// The wordlist to use pub wordlist_uuid: Uuid, /// The concurrent task limit - // TODO #[schema(example = 100)] pub concurrent_limit: u32, /// The workspace to execute the attack in @@ -42,10 +40,8 @@ pub struct BruteforceSubdomainsRequest { #[serde(untagged)] pub enum PortOrRange { /// A single port - // TODO #[schema(example = 8000)] Port(u16), /// In inclusive range of ports - // TODO #[schema(value_type = String, example = "1-1024")] Range( #[serde( deserialize_with = "deserialize_port_range", @@ -64,17 +60,14 @@ pub struct HostsAliveRequest { pub leech_uuid: Option, /// The ip addresses / networks or domains to scan - // TODO #[schema(value_type = Vec, example = json!(["10.13.37.1", "10.13.37.0/24", "google.com"]))] pub targets: Vec, /// The time to wait until a host is considered down. /// /// The timeout is specified in milliseconds. - // TODO #[schema(example = 3000)] pub timeout: u64, /// The concurrent task limit - // TODO #[schema(example = 30)] pub concurrent_limit: u32, /// The workspace to execute the attack in @@ -85,21 +78,17 @@ pub struct HostsAliveRequest { #[derive(Deserialize, Serialize, JsonSchema, Debug, Clone)] pub struct QueryCertificateTransparencyRequest { /// Domain to query certificates for - // TODO #[schema(example = "example.com")] pub target: String, /// Should expired certificates be included as well - // TODO #[schema(example = true)] pub include_expired: bool, /// The number of times the query should be retried if it failed. - // TODO #[schema(example = 3)] pub max_retries: u32, /// The interval that should be waited between retries. /// /// The interval is specified in milliseconds. - // TODO #[schema(example = 500)] pub retry_interval: u64, /// The workspace to execute the attack in @@ -125,7 +114,6 @@ pub struct ServiceDetectionRequest { pub leech_uuid: Option, /// The ip addresses / networks or domains to scan - // TODO #[schema(value_type = Vec, example = json!(["10.13.37.1", "10.13.37.0/24", "google.com"]))] pub targets: Vec, /// List of single ports and port ranges @@ -137,34 +125,28 @@ pub struct ServiceDetectionRequest { /// The time to wait until a connection is considered failed. /// /// The timeout is specified in milliseconds. - // TODO #[schema(example = 3000)] pub connect_timeout: u64, /// Time to wait for a response after sending the payload /// (or after establishing a connection, if not payload is to be sent) /// /// The timeout is specified in milliseconds. - // TODO #[schema(example = 3000)] pub receive_timeout: u64, /// The interval that should be wait between retries on a port. /// /// The interval is specified in milliseconds. - // TODO #[schema(example = 100)] pub retry_interval: u64, /// The number of times the connection should be retried if it failed. - // TODO #[schema(example = 2)] pub max_retries: u32, /// The concurrent task limit - // TODO #[schema(example = 5000)] pub concurrent_limit: u32, /// Skips the initial icmp check. /// /// All hosts are assumed to be reachable - // TODO #[schema(example = false)] pub skip_icmp_check: bool, /// The workspace to execute the attack in @@ -191,21 +173,17 @@ pub struct UdpServiceDetectionRequest { /// The interval that should be wait between retries on a port. /// /// The interval is specified in milliseconds. - // TODO #[schema(example = 100)] pub retry_interval: u64, /// The number of times the connection should be retried if it failed. - // TODO #[schema(example = 2)] pub max_retries: u32, /// The time to wait until a connection is considered failed. /// /// The timeout is specified in milliseconds. - // TODO #[schema(example = 3000)] pub timeout: u64, /// The concurrent task limit - // TODO #[schema(example = 5000)] pub concurrent_limit: u32, /// The workspace to execute the attack in @@ -260,11 +238,9 @@ pub struct DnsResolutionRequest { pub leech_uuid: Option, /// The domains to resolve - // TODO #[schemars(example = json!(["example.com", "example.org"]))] pub targets: Vec, /// The concurrent task limit - // TODO #[schemars(example = 2)] pub concurrent_limit: u32, /// The workspace to execute the attack in @@ -280,7 +256,6 @@ pub struct DnsTxtScanRequest { pub leech_uuid: Option, /// The domains to resolve - // TODO #[schemars(example = json!(["example.com", "example.org"]))] pub targets: Vec, /// The workspace to execute the attack in @@ -318,11 +293,10 @@ pub struct ListAttacks { #[serde(untagged)] pub enum DomainOrNetwork { /// A ip address / network - #[schemars(with = "IpAddr")] // TODO + #[schemars(with = "IpAddr")] Network(IpNetwork), /// A domain name - // TODO #[schemars(example = "kraken.test")] Domain(String), } diff --git a/kraken/src/api/handler/auth/schema.rs b/kraken/src/api/handler/auth/schema.rs index f76e29e76..a5fc549b5 100644 --- a/kraken/src/api/handler/auth/schema.rs +++ b/kraken/src/api/handler/auth/schema.rs @@ -7,10 +7,8 @@ use webauthn_rs::prelude::RegisterPublicKeyCredential; #[derive(Deserialize, Serialize, JsonSchema, Debug, Clone)] pub struct LoginRequest { /// The username that should be used for login - // TODO #[schema(example = "user123")] pub username: String, /// The password that should be used for login - // TODO #[schema(example = "super-secure-password")] pub password: String, } @@ -20,10 +18,8 @@ pub struct FinishRegisterRequest { /// The public key credentials register request // TODO: provide a example json for this request #[serde(flatten)] - // TODO #[schema(example = json!({}), value_type = Object)] #[schemars(with = "serde_json::Value")] pub register_pk_credential: RegisterPublicKeyCredential, /// Name of the key - // TODO #[schema(example = "my-security-key-01")] pub name: String, } diff --git a/kraken/src/api/handler/common/schema.rs b/kraken/src/api/handler/common/schema.rs index e8170e470..aec498479 100644 --- a/kraken/src/api/handler/common/schema.rs +++ b/kraken/src/api/handler/common/schema.rs @@ -26,11 +26,9 @@ pub struct PathUuid { #[derive(Copy, Clone, Debug, Deserialize, Serialize, JsonSchema)] pub struct PageParams { /// Number of items to retrieve - // TODO #[param(example = 50, minimum = 1)] pub limit: u64, /// Position in the whole list to start retrieving from - // TODO #[param(example = 0)] pub offset: u64, } @@ -41,11 +39,9 @@ pub struct Page { pub items: Vec, /// The limit this page was retrieved with - // TODO #[schema(example = 50)] pub limit: u64, /// The offset this page was retrieved with - // TODO #[schema(example = 0)] pub offset: u64, /// The total number of items this page is a subset of @@ -82,7 +78,6 @@ pub struct SimpleTag { /// Numbers between 2000 and 2999 (inclusive) are server errors. #[derive(Serialize_repr, Deserialize_repr, JsonSchema_repr, Debug, PartialOrd, PartialEq)] #[repr(u16)] -// TODO #[schema(default = 1000, example = 1000)] pub enum ApiStatusCode { /// Login failed LoginFailed = 1000, @@ -176,7 +171,6 @@ pub struct ApiErrorResponse { /// The error code pub status_code: ApiStatusCode, /// A human readable description of the error - // TODO #[schema(example = "Error message will be here")] pub message: String, } diff --git a/kraken/src/api/handler/data_export/schema.rs b/kraken/src/api/handler/data_export/schema.rs index 70586a989..9e28172ec 100644 --- a/kraken/src/api/handler/data_export/schema.rs +++ b/kraken/src/api/handler/data_export/schema.rs @@ -43,10 +43,7 @@ pub struct AggregatedHost { pub uuid: Uuid, /// The IP address of the host. - /// - /// If the host has multiple addresses, create a [Host] for each and link them. - #[schemars(with = "IpAddr")] // TODO - pub ip_addr: IpNetwork, + pub ip_addr: IpNetwork, // TODO: this is wrong, should be IpAddr /// The type of OS of this host pub os_type: OsType, diff --git a/kraken/src/api/handler/domains/schema.rs b/kraken/src/api/handler/domains/schema.rs index 7c366a94f..2e1efd6c9 100644 --- a/kraken/src/api/handler/domains/schema.rs +++ b/kraken/src/api/handler/domains/schema.rs @@ -16,7 +16,6 @@ use crate::models::FindingSeverity; #[derive(Serialize, Deserialize, JsonSchema, Debug, Clone)] pub struct CreateDomainRequest { /// The domain to add - // TODO #[schema(example = "kraken.test")] pub domain: String, } @@ -53,10 +52,8 @@ pub struct SimpleDomain { /// The uuid of the domain pub uuid: Uuid, /// The domain name - // TODO #[schema(example = "example.com")] pub domain: String, /// The comment to the domain - // TODO #[schema(example = "This is a important domain!")] pub comment: String, /// The workspace this domain is linked to pub workspace: Uuid, @@ -72,10 +69,8 @@ pub struct FullDomain { /// The primary key of the domain pub uuid: Uuid, /// The domain's name - // TODO #[schema(example = "example.com")] pub domain: String, /// A comment - // TODO #[schema(example = "This is a important domain!")] pub comment: String, /// The workspace this domain is in pub workspace: Uuid, diff --git a/kraken/src/api/handler/leeches/schema.rs b/kraken/src/api/handler/leeches/schema.rs index b2a3cb144..836fe559f 100644 --- a/kraken/src/api/handler/leeches/schema.rs +++ b/kraken/src/api/handler/leeches/schema.rs @@ -10,13 +10,10 @@ use crate::api::handler::common::de_optional; #[derive(Deserialize, Serialize, JsonSchema, Debug, Clone)] pub struct CreateLeechRequest { /// Name of the leech - // TODO #[schema(example = "leech-01")] pub name: String, /// Address of the leech with schema - // TODO #[schema(value_type = String, example = "https://10.13.37:8081")] pub address: Url, /// Description of the leech - // TODO #[schema(example = "The first leech in a private net")] pub description: Option, } @@ -24,13 +21,10 @@ pub struct CreateLeechRequest { #[derive(Deserialize, Serialize, JsonSchema, Debug, Clone)] pub struct UpdateLeechRequest { /// Name of the leech - // TODO #[schema(example = "leech-01")] pub name: Option, /// Address of the leech - // TODO #[schema(value_type = String, example = "https://10.13.37.1:8081")] pub address: Option, /// Description of the leech - // TODO #[schema(example = "First leech in a private network")] #[serde(default, deserialize_with = "de_optional")] pub description: Option>, } @@ -41,10 +35,8 @@ pub struct SimpleLeech { /// uuid of the leech pub uuid: Uuid, /// Name of the leech - // TODO #[schema(example = "leech-01")] pub name: String, /// Address of the leech - // TODO #[schema(value_type = String, example = "https://10.13.37.1:8081")] pub address: Url, } diff --git a/kraken/src/api/handler/oauth_applications/schema.rs b/kraken/src/api/handler/oauth_applications/schema.rs index 6c96823da..7ce116f77 100644 --- a/kraken/src/api/handler/oauth_applications/schema.rs +++ b/kraken/src/api/handler/oauth_applications/schema.rs @@ -10,11 +10,9 @@ use crate::models::OauthClient; #[derive(Serialize, Deserialize, JsonSchema, Debug, Clone)] pub struct CreateAppRequest { /// The name of the application - // TODO #[schema(example = "Trustworthy application")] pub name: String, /// The redirect url of the application - // TODO #[schema(example = "http://127.0.0.1:8080")] pub redirect_uri: String, } @@ -22,11 +20,9 @@ pub struct CreateAppRequest { #[derive(Serialize, Deserialize, JsonSchema, Debug, Clone)] pub struct UpdateAppRequest { /// The name of the application - // TODO #[schema(example = "Trustworthy application")] pub name: Option, /// The redirect url of the application - // TODO #[schema(example = "http://127.0.0.1:8080")] pub redirect_uri: Option, } @@ -37,10 +33,8 @@ pub struct SimpleOauthClient { /// The uuid of the client pub uuid: Uuid, /// The name of the client - // TODO #[schema(example = "Trustworthy application")] pub name: String, /// The redirect url of the client - // TODO #[schema(example = "http://127.0.0.1:8080")] pub redirect_uri: String, } @@ -51,13 +45,10 @@ pub struct FullOauthClient { /// The uuid of the client pub uuid: Uuid, /// The name of the client - // TODO #[schema(example = "Trustworthy application")] pub name: String, /// The redirect url of the client - // TODO #[schema(example = "http://127.0.0.1:8080")] pub redirect_uri: String, /// The secret of the client - // TODO #[schema(example = "IPSPL29BSDw5HFir5LYamdlm6SiaBdwx")] pub secret: String, } diff --git a/kraken/src/api/handler/ports/schema.rs b/kraken/src/api/handler/ports/schema.rs index a8ebe9d51..2f9ed8e02 100644 --- a/kraken/src/api/handler/ports/schema.rs +++ b/kraken/src/api/handler/ports/schema.rs @@ -24,14 +24,12 @@ pub struct CreatePortRequest { pub ip_addr: IpAddr, /// The port to add - // TODO #[schema(example = "8080")] pub port: u16, /// Whether the port should exist right now or existed at some point pub certainty: ManualPortCertainty, /// The port's protocol - // TODO #[schema(example = "Tcp")] pub protocol: PortProtocol, } @@ -69,7 +67,6 @@ pub struct SimplePort { /// Uuid of the port pub uuid: Uuid, /// Port number - // TODO #[schema(example = 1337)] pub port: u16, /// Port protocol pub protocol: PortProtocol, @@ -91,7 +88,6 @@ pub struct FullPort { /// Uuid of the port pub uuid: Uuid, /// Port number - // TODO #[schema(example = 1337)] pub port: u16, /// Port protocol pub protocol: PortProtocol, diff --git a/kraken/src/api/handler/services/schema.rs b/kraken/src/api/handler/services/schema.rs index 242072e77..744dd5d6a 100644 --- a/kraken/src/api/handler/services/schema.rs +++ b/kraken/src/api/handler/services/schema.rs @@ -22,20 +22,17 @@ use crate::models::ServiceProtocols; #[derive(Serialize, Deserialize, JsonSchema, Debug, Clone)] pub struct CreateServiceRequest { /// The service's name - // TODO #[schema(example = "django")] pub name: String, /// Whether the port should exist right now or existed at some point pub certainty: ManualServiceCertainty, /// The ip address the service runs on - #[schemars(with = "IpAddr")] // TODO - pub host: IpNetwork, + pub host: IpNetwork, // TODO: this is wrong, should be IpAddr /// An optional port the service runs on /// /// If set, you must specify protocol - // TODO #[schema(example = "8080")] pub port: Option, /// The port's protocol as well as its sub protocols @@ -76,10 +73,8 @@ pub struct SimpleService { /// The uuid of the service pub uuid: Uuid, /// The name of the service - // TODO #[schema(example = "postgresql")] pub name: String, /// The version of the service - // TODO #[schema(example = "13.0.1")] pub version: Option, /// The certainty the service is detected correct pub certainty: ServiceCertainty, @@ -88,7 +83,6 @@ pub struct SimpleService { /// The port this service may linked to pub port: Option, /// The comment attached to the service - // TODO #[schema(example = "Holds all relevant information")] pub comment: String, /// The workspace is service is linked to pub workspace: Uuid, @@ -102,10 +96,8 @@ pub struct FullService { /// Uuid of the service pub uuid: Uuid, /// The service's name - // TODO #[schema(example = "postgresql")] pub name: String, /// An optional version of the running service - // TODO #[schema(example = "13.0.1")] pub version: Option, /// The certainty of the detection pub certainty: ServiceCertainty, @@ -116,7 +108,6 @@ pub struct FullService { /// The protocols used above the port's protocol pub protocols: Option, /// A comment to the service - // TODO #[schema(example = "Holds all relevant information")] pub comment: String, /// The workspace this service is linked to pub workspace: Uuid, diff --git a/kraken/src/api/handler/settings/schema.rs b/kraken/src/api/handler/settings/schema.rs index 485a03d18..f2a1738b1 100644 --- a/kraken/src/api/handler/settings/schema.rs +++ b/kraken/src/api/handler/settings/schema.rs @@ -16,11 +16,9 @@ pub struct SettingsFull { pub oidc_initial_permission_level: UserPermission, /// The email for the dehashed account - // TODO #[schema(example = "foo@example.com")] pub dehashed_email: Option, /// The api key for the dehashed account - // TODO #[schema(example = "1231kb3kkb51kj31kjb231kj3b1jk23bkj123")] pub dehashed_api_key: Option, /// The point in time the settings were created @@ -37,10 +35,8 @@ pub struct UpdateSettingsRequest { pub oidc_initial_permission_level: UserPermission, /// The email for the dehashed account - // TODO #[schema(example = "foo@example.com")] pub dehashed_email: Option, /// The api key for the dehashed account - // TODO #[schema(example = "1231kb3kkb51kj31kjb231kj3b1jk23bkj123")] pub dehashed_api_key: Option, } diff --git a/kraken/src/api/handler/users/schema.rs b/kraken/src/api/handler/users/schema.rs index 8ee9502a5..7e9723431 100644 --- a/kraken/src/api/handler/users/schema.rs +++ b/kraken/src/api/handler/users/schema.rs @@ -13,13 +13,10 @@ use crate::models::UserPermission; #[derive(Deserialize, Serialize, JsonSchema, Debug, Clone)] pub struct CreateUserRequest { /// The username - // TODO #[schema(example = "user123")] pub username: String, /// The displayname - // TODO #[schema(example = "Anon")] pub display_name: String, /// The password that should be set - // TODO #[schema(example = "super-secure-password")] pub password: String, /// The permissions that the user should have pub permission: UserPermission, @@ -29,10 +26,8 @@ pub struct CreateUserRequest { #[derive(Deserialize, Serialize, JsonSchema, Debug, Clone)] pub struct SetPasswordRequest { /// The current password - // TODO #[schema(example = "super-secure-password")] pub current_password: String, /// The new password - // TODO #[schema(example = "ultra-secure-password!1!1!")] pub new_password: String, } /// The request to update the own user @@ -41,10 +36,8 @@ pub struct SetPasswordRequest { #[derive(Deserialize, Serialize, JsonSchema, Debug, Clone)] pub struct UpdateMeRequest { /// The username - // TODO #[schema(example = "cyber-user-123")] pub username: Option, /// The displayname - // TODO #[schema(example = "Cyberhacker")] pub display_name: Option, } @@ -54,10 +47,8 @@ pub struct FullUser { /// The uuid of the user pub uuid: Uuid, /// The username of the user - // TODO #[schema(example = "user123")] pub username: String, /// The displayname of the user - // TODO #[schema(example = "Anon")] pub display_name: String, /// The permissions that the user has pub permission: UserPermission, diff --git a/kraken/src/api/handler/wordlists/schema.rs b/kraken/src/api/handler/wordlists/schema.rs index 689455f2c..097b7867b 100644 --- a/kraken/src/api/handler/wordlists/schema.rs +++ b/kraken/src/api/handler/wordlists/schema.rs @@ -10,13 +10,10 @@ use crate::models::WordList; #[derive(Serialize, Deserialize, JsonSchema, Debug, Clone)] pub struct CreateWordlistRequest { /// The wordlist's name to be displayed select buttons - // TODO #[schema(example = "subdomains-top1million-5000.txt")] pub name: String, /// A description explaining the wordlist's intended use case - // TODO #[schema(example = "List of 5000 subdomains")] pub description: String, /// The file path the wordlist is deployed under on each leech - // TODO #[schema(example = "/opt/wordlists/Discovery/DNS/subdomains-top1million-5000.txt")] pub path: String, } @@ -24,13 +21,10 @@ pub struct CreateWordlistRequest { #[derive(Serialize, Deserialize, JsonSchema, Debug, Clone)] pub struct UpdateWordlistRequest { /// The wordlist's name to be displayed select buttons - // TODO #[schema(example = "subdomains-top1million-5000.txt")] pub name: Option, /// A description explaining the wordlist's intended use case - // TODO #[schema(example = "List of 5000 subdomains")] pub description: Option, /// The file path the wordlist is deployed under on each leech - // TODO #[schema(example = "/opt/wordlists/Discovery/DNS/subdomains-top1million-5000.txt")] pub path: Option, } @@ -41,10 +35,8 @@ pub struct SimpleWordlist { /// The primary key of the wordlist pub uuid: Uuid, /// The wordlist's name to be displayed select buttons - // TODO #[schema(example = "subdomains-top1million-5000.txt")] pub name: String, /// A description explaining the wordlist's intended use case - // TODO #[schema(example = "List of 5000 subdomains")] pub description: String, } @@ -55,13 +47,10 @@ pub struct FullWordlist { /// The primary key of the wordlist pub uuid: Uuid, /// The wordlist's name to be displayed select buttons - // TODO #[schema(example = "subdomains-top1million-5000.txt")] pub name: String, /// A description explaining the wordlist's intended use case - // TODO #[schema(example = "List of 5000 subdomains")] pub description: String, /// The file path the wordlist is deployed under on each leech - // TODO #[schema(example = "/opt/wordlists/Discovery/DNS/subdomains-top1million-5000.txt")] pub path: String, } diff --git a/kraken/src/api/handler/workspaces/schema.rs b/kraken/src/api/handler/workspaces/schema.rs index b19907ddc..ad7567643 100644 --- a/kraken/src/api/handler/workspaces/schema.rs +++ b/kraken/src/api/handler/workspaces/schema.rs @@ -26,10 +26,8 @@ use crate::api::handler::users::schema::SimpleUser; #[derive(Serialize, Deserialize, JsonSchema, Debug, Clone)] pub struct CreateWorkspaceRequest { /// The name of the workspace - // TODO #[schema(example = "secure-workspace")] pub name: String, /// The description of the workspace - // TODO #[schema(example = "This workspace is super secure and should not be looked at!!")] pub description: Option, } @@ -46,10 +44,8 @@ pub struct SearchWorkspaceRequest { #[derive(Serialize, Deserialize, JsonSchema, Debug, Clone)] pub struct UpdateWorkspaceRequest { /// Name of the workspace - // TODO #[schema(example = "Workspace for work")] pub name: Option, /// Description of the workspace - // TODO #[schema(example = "This workspace is for work and for work only!")] #[serde(default, deserialize_with = "de_optional")] pub description: Option>, } @@ -92,10 +88,8 @@ pub struct SimpleWorkspace { /// The uuid of the workspace pub uuid: Uuid, /// The name of the workspace - // TODO #[schema(example = "ultra-secure-workspace")] pub name: String, /// The description of the workspace - // TODO #[schema(example = "This workspace is ultra secure and should not be looked at!!")] pub description: Option, /// The owner of the workspace pub owner: SimpleUser, @@ -110,11 +104,9 @@ pub struct SimpleWorkspace { pub struct FullWorkspace { /// The uuid of the workspace pub uuid: Uuid, - // TODO #[schema(example = "ultra-secure-workspace")] /// The name of the workspace pub name: String, /// The description of the workspace - // TODO #[schema(example = "This workspace is ultra secure and should not be looked at!!")] pub description: Option, /// Notes of the workspace pub notes: String, diff --git a/kraken/src/chan/ws_manager/schema.rs b/kraken/src/chan/ws_manager/schema.rs index 3f820a94a..90b8eb933 100644 --- a/kraken/src/chan/ws_manager/schema.rs +++ b/kraken/src/chan/ws_manager/schema.rs @@ -385,16 +385,12 @@ pub struct Change { /// The text that should be set to the range given by the other values pub text: String, /// Start of the column - // TODO #[schema(value_type = u64, minimum = 1)] pub start_column: NonZeroU64, /// End of the column - // TODO #[schema(value_type = u64, minimum = 1)] pub end_column: NonZeroU64, /// Starting line number - // TODO #[schema(value_type = u64, minimum = 1)] pub start_line: NonZeroU64, /// Ending line number - // TODO #[schema(value_type = u64, minimum = 1)] pub end_line: NonZeroU64, } @@ -402,10 +398,8 @@ pub struct Change { #[derive(Debug, Clone, Copy, Serialize, Deserialize, JsonSchema)] pub struct CursorPosition { /// The line the cursor was placed in - // TODO #[schema(value_type = u64, minimum = 1)] pub line: NonZeroU64, /// The column the cursor was placed in - // TODO #[schema(value_type = u64, minimum = 1)] pub column: NonZeroU64, } diff --git a/kraken/src/modules/oauth/schemas.rs b/kraken/src/modules/oauth/schemas.rs index fcac72b1c..bf3f4bc54 100644 --- a/kraken/src/modules/oauth/schemas.rs +++ b/kraken/src/modules/oauth/schemas.rs @@ -132,7 +132,6 @@ pub struct TokenRequest { #[derive(Serialize, JsonSchema)] pub struct TokenResponse { /// Always `"access_token"` - // TODO #[schema(example = "access_token")] pub token_type: &'static str, /// The access token issued by the authorization server.