github.com/thetreep/go-swagger@v0.0.0-20240223100711-35af64f14f01/examples/generated/restapi/operations/pet/add_pet_responses.go (about) 1 // Code generated by go-swagger; DO NOT EDIT. 2 3 package pet 4 5 // This file was generated by the swagger tool. 6 // Editing this file might prove futile when you re-run the swagger generate command 7 8 import ( 9 "net/http" 10 11 "github.com/go-openapi/runtime" 12 ) 13 14 // AddPetMethodNotAllowedCode is the HTTP code returned for type AddPetMethodNotAllowed 15 const AddPetMethodNotAllowedCode int = 405 16 17 /* 18 AddPetMethodNotAllowed Invalid input 19 20 swagger:response addPetMethodNotAllowed 21 */ 22 type AddPetMethodNotAllowed struct { 23 } 24 25 // NewAddPetMethodNotAllowed creates AddPetMethodNotAllowed with default headers values 26 func NewAddPetMethodNotAllowed() *AddPetMethodNotAllowed { 27 28 return &AddPetMethodNotAllowed{} 29 } 30 31 // WriteResponse to the client 32 func (o *AddPetMethodNotAllowed) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { 33 34 rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses 35 36 rw.WriteHeader(405) 37 }