-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathmodel_Pet.jl
More file actions
37 lines (27 loc) · 952 Bytes
/
model_Pet.jl
File metadata and controls
37 lines (27 loc) · 952 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# This file was generated by the Julia OpenAPI Code Generator
# Do not modify this file directly. Modify the OpenAPI specification instead.
@doc raw"""Pet
Pet(;
pet_type=nothing,
)
- pet_type::String
"""
Base.@kwdef mutable struct Pet <: OpenAPI.APIModel
pet_type::Union{Nothing, String} = nothing
function Pet(pet_type, )
o = new(pet_type, )
OpenAPI.validate_properties(o)
return o
end
end # type Pet
const _property_types_Pet = Dict{Symbol,String}(Symbol("pet_type")=>"String", )
OpenAPI.property_type(::Type{ Pet }, name::Symbol) = Union{Nothing,eval(Base.Meta.parse(_property_types_Pet[name]))}
function OpenAPI.check_required(o::Pet)
o.pet_type === nothing && (return false)
true
end
function OpenAPI.validate_properties(o::Pet)
OpenAPI.validate_property(Pet, Symbol("pet_type"), o.pet_type)
end
function OpenAPI.validate_property(::Type{ Pet }, name::Symbol, val)
end