first
This commit is contained in:
29
test/src/models/error.rs
Normal file
29
test/src/models/error.rs
Normal file
@ -0,0 +1,29 @@
|
||||
/*
|
||||
* Swagger Petstore
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
use crate::models;
|
||||
|
||||
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||
pub struct Error {
|
||||
#[serde(rename = "code")]
|
||||
pub code: i32,
|
||||
#[serde(rename = "message")]
|
||||
pub message: String,
|
||||
}
|
||||
|
||||
impl Error {
|
||||
pub fn new(code: i32, message: String) -> Error {
|
||||
Error {
|
||||
code,
|
||||
message,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user