Struct oas_gen::xtests::Test[][src]

pub struct Test {
    pub description: String,
    pub auth: bool,
    pub skip: bool,
    pub params: Map<String, String>,
    pub request: Request,
    pub response: Response,
    pub required: Vec<String>,
}
Expand description

The test in the “x-tests” extension. Implementation is based on 8c84cc6 of https://github.com/davidkpiano/openapi-test

Fields

description: String

The description of the test, used for reporting the test results.

auth: bool

Whether to add the –token JWT to the header and authorize the request (default: false).

skip: bool

If true, this test will be skipped. (default: false).

params: Map<String, String>

(optional) Supplies dynamic parameter values (e.g., “name”: … would supply the value for /{name} in the path). Only needed for tests with URL params.

request: Request

An object that contains: query

response: Response

An object that contains: status

required: Vec<String>

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Deserialize this value from the given Serde deserializer. Read more

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.