func errResponses(s *spec.Spec) {
	for c, d := range map[int]string{
		http.StatusBadRequest:          "invalid input, data invalid",
		http.StatusConflict:            "conflicting resources",
		http.StatusForbidden:           "user misses permission",
		http.StatusInternalServerError: "unexpected error",
		http.StatusNotFound:            "resource not found",
	} {
		s.Components.Responses[strconv.Itoa(c)] = &spec.Response{
			Name:        strconv.Itoa(c),
			Description: d,
			Headers:     nil, // TODO
			Content: &spec.Content{
				spec.JSON: spec.MediaTypeObject{
					Unique: true,
					Schema: spec.Schema{
						Fields: map[string]*spec.Field{
							"code": {
								Type:    *_int32,
								Unique:  true,
								Example: c,
							},
							"status": {
								Type:    *_string,
								Unique:  true,
								Example: http.StatusText(c),
							},
						},
						Edges: map[string]spec.Edge{
							"errors": {
								Schema: spec.Schema{},
								Unique: true,
							},
						},
					},
				},
			},
		}
	}
}
// errResponses adds all responses to the specs responses.
errResponses adds all responses to the specs responses.
// errResponses adds all responses to the specs responses .
func errResponses(s *spec.Spec) {
	for c, d := range map[int]string{
		http.StatusBadRequest:          "invalid input, data invalid",
		http.StatusConflict:            "conflicting resources",
		http.StatusForbidden:           "user misses permission",
		http.StatusInternalServerError: "unexpected error",
		http.StatusNotFound:            "resource not found",
	} {
		s.Components.Responses[strconv.Itoa(c)] = &spec.Response{
			Name:        strconv.Itoa(c),
			Description: d,
			Headers:     nil, 
			Content: &spec.Content{
				spec.JSON: spec.MediaTypeObject{
					Unique: true,
					Schema: spec.Schema{
						Fields: map[string]*spec.Field{
							"code": {
								Type:    *_int32,
								Unique:  true,
								Example: c,
							},
							"status": {
								Type:    *_string,
								Unique:  true,
								Example: http.StatusText(c),
							},
						},
						Edges: map[string]spec.Edge{
							"errors": {
								Schema: spec.Schema{},
								Unique: true,
							},
						},
					},
				},
			},
		}
	}
}
func errResponses ( s * spec . Spec ) { for c , d := range map [ int ] string { http . StatusBadRequest : " " , http . StatusConflict : " " , http . StatusForbidden : " " , http . StatusInternalServerError : " " , http . StatusNotFound : " " , } { s . Components . Responses [ strconv . Itoa ( c ) ] = & spec . Response { Name : strconv . Itoa ( c ) , Description : d , Headers : nil , Content : & spec . Content { spec . JSON : spec . MediaTypeObject { Unique : true , Schema : spec . Schema { Fields : map [ string ] * spec . Field { " " : { Type : * _int32 , Unique : true , Example : c , } , " " : { Type : * _string , Unique : true , Example : http . StatusText ( c ) , } , } , Edges : map [ string ] spec . Edge { " " : { Schema : spec . Schema { } , Unique : true , } , } , } , } , } , } } }
errResponses adds all responses to the specs responses.
errResponses adds all responses to the specs responses .
// TODO