Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetErrorByID ¶
GetErrorByID example @Summary Returns the error definition @Description Returns the error definition @ID get-error-by-id @Accept json @Produce json @Param id_error query int true "Error ID" @Success 200 {object} ErrorResponse "ok" @Success 204 {string} string "ok" @Router /errors [get]
func GetPersonAddressByID ¶
GetPersonAddressByIDRequest example @Summary Get the person address. @Description Get the person address. @ID get-person-address-by-id @Accept json @Produce json @Param id_person path string true "Person ID" @Param id_address path string true "Address ID" @Success 200 {string} AddressResponse "ok" @Failure 400 {object} ErrorResponse "error" @Router /persons/{id_person}/addresses/{id_address} [get]
func GetPersonByID ¶
GetPersonByIDRequest example @Summary Get person by id. @Description Get person by id. @ID get-person-by-id @Accept json @Produce json @Param id_person path string true "Person ID" @Param age query int false "Age" @Success 200 {string} PersonResponse "ok" @Failure 400 {object} ErrorResponse "error" @Router /persons/{id_person} [get]
Types ¶
type AddressResponse ¶
type AddressResponse struct { Id string `json:"id"` Country string `json:"country"` City string `json:"city"` Street string `json:"street"` Number int `json:"number"` }
AddressResponse is an struct that contains the address information.
type ErrorResponse ¶
ErrorResponse is an error that is used when the required input fails validation.
type GetPersonAddressByIDRequest ¶
type GetPersonAddressByIDRequest struct { IdPerson string `json:"id_person"` IdAddress string `json:"id_address"` }
GetPersonAddressByIDRequest
type GetPersonByIDRequest ¶
GetPersonByIDRequest
type PersonResponse ¶
PersonResponse is an struct that contains the person information.