diff --git a/air/v2/client/air/air_api_airline1_responses.go b/air/v2/client/air/air_api_airline1_responses.go
index 48691ae9..b6838bbc 100644
--- a/air/v2/client/air/air_api_airline1_responses.go
+++ b/air/v2/client/air/air_api_airline1_responses.go
@@ -31,7 +31,7 @@ func (o *AirAPIAirline1Reader) ReadResponse(response runtime.ClientResponse, con
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
@@ -42,17 +42,17 @@ func NewAirAPIAirline1OK() *AirAPIAirline1OK {
/*AirAPIAirline1OK handles this case with default header values.
-OK
+Success
*/
type AirAPIAirline1OK struct {
- Payload []*models.ServiceDTOVersion2AviationAirline
+ Payload []*models.PTXServiceDTOAirSpecificationV2Airline
}
func (o *AirAPIAirline1OK) Error() string {
return fmt.Sprintf("[GET /v2/Air/Airline][%d] airApiAirline1OK %+v", 200, o.Payload)
}
-func (o *AirAPIAirline1OK) GetPayload() []*models.ServiceDTOVersion2AviationAirline {
+func (o *AirAPIAirline1OK) GetPayload() []*models.PTXServiceDTOAirSpecificationV2Airline {
return o.Payload
}
diff --git a/air/v2/client/air/air_api_airline_responses.go b/air/v2/client/air/air_api_airline_responses.go
index 783dead5..447d751b 100644
--- a/air/v2/client/air/air_api_airline_responses.go
+++ b/air/v2/client/air/air_api_airline_responses.go
@@ -31,7 +31,7 @@ func (o *AirAPIAirlineReader) ReadResponse(response runtime.ClientResponse, cons
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
@@ -42,23 +42,23 @@ func NewAirAPIAirlineOK() *AirAPIAirlineOK {
/*AirAPIAirlineOK handles this case with default header values.
-OK
+Success
*/
type AirAPIAirlineOK struct {
- Payload *models.ServiceDTOVersion2AviationAirline
+ Payload *models.PTXServiceDTOAirSpecificationV2Airline
}
func (o *AirAPIAirlineOK) Error() string {
return fmt.Sprintf("[GET /v2/Air/Airline/{IATA}][%d] airApiAirlineOK %+v", 200, o.Payload)
}
-func (o *AirAPIAirlineOK) GetPayload() *models.ServiceDTOVersion2AviationAirline {
+func (o *AirAPIAirlineOK) GetPayload() *models.PTXServiceDTOAirSpecificationV2Airline {
return o.Payload
}
func (o *AirAPIAirlineOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
- o.Payload = new(models.ServiceDTOVersion2AviationAirline)
+ o.Payload = new(models.PTXServiceDTOAirSpecificationV2Airline)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
diff --git a/air/v2/client/air/air_api_airport1_responses.go b/air/v2/client/air/air_api_airport1_responses.go
index b677cc9b..5f01607f 100644
--- a/air/v2/client/air/air_api_airport1_responses.go
+++ b/air/v2/client/air/air_api_airport1_responses.go
@@ -31,7 +31,7 @@ func (o *AirAPIAirport1Reader) ReadResponse(response runtime.ClientResponse, con
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
@@ -42,23 +42,23 @@ func NewAirAPIAirport1OK() *AirAPIAirport1OK {
/*AirAPIAirport1OK handles this case with default header values.
-OK
+Success
*/
type AirAPIAirport1OK struct {
- Payload *models.ServiceDTOVersion2AviationAirport
+ Payload *models.PTXServiceDTOAirSpecificationV2Airport
}
func (o *AirAPIAirport1OK) Error() string {
return fmt.Sprintf("[GET /v2/Air/Airport/{IATA}][%d] airApiAirport1OK %+v", 200, o.Payload)
}
-func (o *AirAPIAirport1OK) GetPayload() *models.ServiceDTOVersion2AviationAirport {
+func (o *AirAPIAirport1OK) GetPayload() *models.PTXServiceDTOAirSpecificationV2Airport {
return o.Payload
}
func (o *AirAPIAirport1OK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
- o.Payload = new(models.ServiceDTOVersion2AviationAirport)
+ o.Payload = new(models.PTXServiceDTOAirSpecificationV2Airport)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
diff --git a/air/v2/client/air/air_api_airport_responses.go b/air/v2/client/air/air_api_airport_responses.go
index 2aa9cedf..82291ae8 100644
--- a/air/v2/client/air/air_api_airport_responses.go
+++ b/air/v2/client/air/air_api_airport_responses.go
@@ -31,7 +31,7 @@ func (o *AirAPIAirportReader) ReadResponse(response runtime.ClientResponse, cons
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
@@ -42,17 +42,17 @@ func NewAirAPIAirportOK() *AirAPIAirportOK {
/*AirAPIAirportOK handles this case with default header values.
-OK
+Success
*/
type AirAPIAirportOK struct {
- Payload []*models.ServiceDTOVersion2AviationAirport
+ Payload []*models.PTXServiceDTOAirSpecificationV2Airport
}
func (o *AirAPIAirportOK) Error() string {
return fmt.Sprintf("[GET /v2/Air/Airport][%d] airApiAirportOK %+v", 200, o.Payload)
}
-func (o *AirAPIAirportOK) GetPayload() []*models.ServiceDTOVersion2AviationAirport {
+func (o *AirAPIAirportOK) GetPayload() []*models.PTXServiceDTOAirSpecificationV2Airport {
return o.Payload
}
diff --git a/air/v2/client/air/air_api_arrival1_responses.go b/air/v2/client/air/air_api_arrival1_responses.go
index 83ccac71..364df207 100644
--- a/air/v2/client/air/air_api_arrival1_responses.go
+++ b/air/v2/client/air/air_api_arrival1_responses.go
@@ -31,7 +31,7 @@ func (o *AirAPIArrival1Reader) ReadResponse(response runtime.ClientResponse, con
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
@@ -42,17 +42,17 @@ func NewAirAPIArrival1OK() *AirAPIArrival1OK {
/*AirAPIArrival1OK handles this case with default header values.
-OK
+Success
*/
type AirAPIArrival1OK struct {
- Payload []*models.ServiceDTOVersion2AviationFIDSArrival
+ Payload []*models.PTXServiceDTOAirSpecificationV2FIDSArrival
}
func (o *AirAPIArrival1OK) Error() string {
return fmt.Sprintf("[GET /v2/Air/FIDS/Airport/Arrival/{IATA}][%d] airApiArrival1OK %+v", 200, o.Payload)
}
-func (o *AirAPIArrival1OK) GetPayload() []*models.ServiceDTOVersion2AviationFIDSArrival {
+func (o *AirAPIArrival1OK) GetPayload() []*models.PTXServiceDTOAirSpecificationV2FIDSArrival {
return o.Payload
}
diff --git a/air/v2/client/air/air_api_arrival_responses.go b/air/v2/client/air/air_api_arrival_responses.go
index 557fc195..d4390f5f 100644
--- a/air/v2/client/air/air_api_arrival_responses.go
+++ b/air/v2/client/air/air_api_arrival_responses.go
@@ -31,7 +31,7 @@ func (o *AirAPIArrivalReader) ReadResponse(response runtime.ClientResponse, cons
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
@@ -42,17 +42,17 @@ func NewAirAPIArrivalOK() *AirAPIArrivalOK {
/*AirAPIArrivalOK handles this case with default header values.
-OK
+Success
*/
type AirAPIArrivalOK struct {
- Payload []*models.ServiceDTOVersion2AviationFIDSArrival
+ Payload []*models.PTXServiceDTOAirSpecificationV2FIDSArrival
}
func (o *AirAPIArrivalOK) Error() string {
return fmt.Sprintf("[GET /v2/Air/FIDS/Airport/Arrival][%d] airApiArrivalOK %+v", 200, o.Payload)
}
-func (o *AirAPIArrivalOK) GetPayload() []*models.ServiceDTOVersion2AviationFIDSArrival {
+func (o *AirAPIArrivalOK) GetPayload() []*models.PTXServiceDTOAirSpecificationV2FIDSArrival {
return o.Payload
}
diff --git a/air/v2/client/air/air_api_departure1_responses.go b/air/v2/client/air/air_api_departure1_responses.go
index 9da63962..6b669112 100644
--- a/air/v2/client/air/air_api_departure1_responses.go
+++ b/air/v2/client/air/air_api_departure1_responses.go
@@ -31,7 +31,7 @@ func (o *AirAPIDeparture1Reader) ReadResponse(response runtime.ClientResponse, c
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
@@ -42,17 +42,17 @@ func NewAirAPIDeparture1OK() *AirAPIDeparture1OK {
/*AirAPIDeparture1OK handles this case with default header values.
-OK
+Success
*/
type AirAPIDeparture1OK struct {
- Payload []*models.ServiceDTOVersion2AviationFIDSDeparture
+ Payload []*models.PTXServiceDTOAirSpecificationV2FIDSDeparture
}
func (o *AirAPIDeparture1OK) Error() string {
return fmt.Sprintf("[GET /v2/Air/FIDS/Airport/Departure/{IATA}][%d] airApiDeparture1OK %+v", 200, o.Payload)
}
-func (o *AirAPIDeparture1OK) GetPayload() []*models.ServiceDTOVersion2AviationFIDSDeparture {
+func (o *AirAPIDeparture1OK) GetPayload() []*models.PTXServiceDTOAirSpecificationV2FIDSDeparture {
return o.Payload
}
diff --git a/air/v2/client/air/air_api_departure_responses.go b/air/v2/client/air/air_api_departure_responses.go
index a230a831..04e16fa8 100644
--- a/air/v2/client/air/air_api_departure_responses.go
+++ b/air/v2/client/air/air_api_departure_responses.go
@@ -31,7 +31,7 @@ func (o *AirAPIDepartureReader) ReadResponse(response runtime.ClientResponse, co
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
@@ -42,17 +42,17 @@ func NewAirAPIDepartureOK() *AirAPIDepartureOK {
/*AirAPIDepartureOK handles this case with default header values.
-OK
+Success
*/
type AirAPIDepartureOK struct {
- Payload []*models.ServiceDTOVersion2AviationFIDSDeparture
+ Payload []*models.PTXServiceDTOAirSpecificationV2FIDSDeparture
}
func (o *AirAPIDepartureOK) Error() string {
return fmt.Sprintf("[GET /v2/Air/FIDS/Airport/Departure][%d] airApiDepartureOK %+v", 200, o.Payload)
}
-func (o *AirAPIDepartureOK) GetPayload() []*models.ServiceDTOVersion2AviationFIDSDeparture {
+func (o *AirAPIDepartureOK) GetPayload() []*models.PTXServiceDTOAirSpecificationV2FIDSDeparture {
return o.Payload
}
diff --git a/air/v2/client/air/air_api_domestic_responses.go b/air/v2/client/air/air_api_domestic_responses.go
index fbd7ed4e..258e8922 100644
--- a/air/v2/client/air/air_api_domestic_responses.go
+++ b/air/v2/client/air/air_api_domestic_responses.go
@@ -31,7 +31,7 @@ func (o *AirAPIDomesticReader) ReadResponse(response runtime.ClientResponse, con
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
@@ -42,17 +42,17 @@ func NewAirAPIDomesticOK() *AirAPIDomesticOK {
/*AirAPIDomesticOK handles this case with default header values.
-OK
+Success
*/
type AirAPIDomesticOK struct {
- Payload []*models.ServiceDTOVersion2AviationGeneralFlightSchedule
+ Payload []*models.PTXServiceDTOAirSpecificationV2GeneralFlightSchedule
}
func (o *AirAPIDomesticOK) Error() string {
return fmt.Sprintf("[GET /v2/Air/GeneralSchedule/Domestic][%d] airApiDomesticOK %+v", 200, o.Payload)
}
-func (o *AirAPIDomesticOK) GetPayload() []*models.ServiceDTOVersion2AviationGeneralFlightSchedule {
+func (o *AirAPIDomesticOK) GetPayload() []*models.PTXServiceDTOAirSpecificationV2GeneralFlightSchedule {
return o.Payload
}
diff --git a/air/v2/client/air/air_api_f_id_s1_responses.go b/air/v2/client/air/air_api_f_id_s1_responses.go
index 090841dc..b6bbb0ca 100644
--- a/air/v2/client/air/air_api_f_id_s1_responses.go
+++ b/air/v2/client/air/air_api_f_id_s1_responses.go
@@ -31,7 +31,7 @@ func (o *AirAPIFIDS1Reader) ReadResponse(response runtime.ClientResponse, consum
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
@@ -42,17 +42,17 @@ func NewAirAPIFIDS1OK() *AirAPIFIDS1OK {
/*AirAPIFIDS1OK handles this case with default header values.
-OK
+Success
*/
type AirAPIFIDS1OK struct {
- Payload []*models.ServiceDTOVersion2AviationAirportFIDS
+ Payload []*models.PTXServiceDTOAirSpecificationV2AirportFIDS
}
func (o *AirAPIFIDS1OK) Error() string {
return fmt.Sprintf("[GET /v2/Air/FIDS/Airport/{IATA}][%d] airApiFIdS1OK %+v", 200, o.Payload)
}
-func (o *AirAPIFIDS1OK) GetPayload() []*models.ServiceDTOVersion2AviationAirportFIDS {
+func (o *AirAPIFIDS1OK) GetPayload() []*models.PTXServiceDTOAirSpecificationV2AirportFIDS {
return o.Payload
}
diff --git a/air/v2/client/air/air_api_f_id_s_responses.go b/air/v2/client/air/air_api_f_id_s_responses.go
index a2477167..1da7e1c6 100644
--- a/air/v2/client/air/air_api_f_id_s_responses.go
+++ b/air/v2/client/air/air_api_f_id_s_responses.go
@@ -31,7 +31,7 @@ func (o *AirAPIFIDSReader) ReadResponse(response runtime.ClientResponse, consume
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
@@ -42,17 +42,17 @@ func NewAirAPIFIDSOK() *AirAPIFIDSOK {
/*AirAPIFIDSOK handles this case with default header values.
-OK
+Success
*/
type AirAPIFIDSOK struct {
- Payload []*models.ServiceDTOVersion2AviationAirportFIDS
+ Payload []*models.PTXServiceDTOAirSpecificationV2AirportFIDS
}
func (o *AirAPIFIDSOK) Error() string {
return fmt.Sprintf("[GET /v2/Air/FIDS/Airport][%d] airApiFIdSOK %+v", 200, o.Payload)
}
-func (o *AirAPIFIDSOK) GetPayload() []*models.ServiceDTOVersion2AviationAirportFIDS {
+func (o *AirAPIFIDSOK) GetPayload() []*models.PTXServiceDTOAirSpecificationV2AirportFIDS {
return o.Payload
}
diff --git a/air/v2/client/air/air_api_flight1_responses.go b/air/v2/client/air/air_api_flight1_responses.go
index fd7f8c00..aeaee729 100644
--- a/air/v2/client/air/air_api_flight1_responses.go
+++ b/air/v2/client/air/air_api_flight1_responses.go
@@ -31,7 +31,7 @@ func (o *AirAPIFlight1Reader) ReadResponse(response runtime.ClientResponse, cons
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
@@ -42,17 +42,17 @@ func NewAirAPIFlight1OK() *AirAPIFlight1OK {
/*AirAPIFlight1OK handles this case with default header values.
-OK
+Success
*/
type AirAPIFlight1OK struct {
- Payload []*models.ServiceDTOVersion2AviationFIDS
+ Payload []*models.PTXServiceDTOAirSpecificationV2FIDS
}
func (o *AirAPIFlight1OK) Error() string {
return fmt.Sprintf("[GET /v2/Air/FIDS/Flight/{FlightNo}][%d] airApiFlight1OK %+v", 200, o.Payload)
}
-func (o *AirAPIFlight1OK) GetPayload() []*models.ServiceDTOVersion2AviationFIDS {
+func (o *AirAPIFlight1OK) GetPayload() []*models.PTXServiceDTOAirSpecificationV2FIDS {
return o.Payload
}
diff --git a/air/v2/client/air/air_api_flight_responses.go b/air/v2/client/air/air_api_flight_responses.go
index 9735258c..ff966c43 100644
--- a/air/v2/client/air/air_api_flight_responses.go
+++ b/air/v2/client/air/air_api_flight_responses.go
@@ -31,7 +31,7 @@ func (o *AirAPIFlightReader) ReadResponse(response runtime.ClientResponse, consu
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
@@ -42,17 +42,17 @@ func NewAirAPIFlightOK() *AirAPIFlightOK {
/*AirAPIFlightOK handles this case with default header values.
-OK
+Success
*/
type AirAPIFlightOK struct {
- Payload []*models.ServiceDTOVersion2AviationFIDS
+ Payload []*models.PTXServiceDTOAirSpecificationV2FIDS
}
func (o *AirAPIFlightOK) Error() string {
return fmt.Sprintf("[GET /v2/Air/FIDS/Flight][%d] airApiFlightOK %+v", 200, o.Payload)
}
-func (o *AirAPIFlightOK) GetPayload() []*models.ServiceDTOVersion2AviationFIDS {
+func (o *AirAPIFlightOK) GetPayload() []*models.PTXServiceDTOAirSpecificationV2FIDS {
return o.Payload
}
diff --git a/air/v2/client/air/air_api_international_responses.go b/air/v2/client/air/air_api_international_responses.go
index 01a6c829..8b856e06 100644
--- a/air/v2/client/air/air_api_international_responses.go
+++ b/air/v2/client/air/air_api_international_responses.go
@@ -31,7 +31,7 @@ func (o *AirAPIInternationalReader) ReadResponse(response runtime.ClientResponse
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
@@ -42,17 +42,17 @@ func NewAirAPIInternationalOK() *AirAPIInternationalOK {
/*AirAPIInternationalOK handles this case with default header values.
-OK
+Success
*/
type AirAPIInternationalOK struct {
- Payload []*models.ServiceDTOVersion2AviationGeneralFlightSchedule
+ Payload []*models.PTXServiceDTOAirSpecificationV2GeneralFlightSchedule
}
func (o *AirAPIInternationalOK) Error() string {
return fmt.Sprintf("[GET /v2/Air/GeneralSchedule/International][%d] airApiInternationalOK %+v", 200, o.Payload)
}
-func (o *AirAPIInternationalOK) GetPayload() []*models.ServiceDTOVersion2AviationGeneralFlightSchedule {
+func (o *AirAPIInternationalOK) GetPayload() []*models.PTXServiceDTOAirSpecificationV2GeneralFlightSchedule {
return o.Payload
}
diff --git a/air/v2/client/air/air_api_m_e_t_a_r1_responses.go b/air/v2/client/air/air_api_m_e_t_a_r1_responses.go
index ded67545..965f552c 100644
--- a/air/v2/client/air/air_api_m_e_t_a_r1_responses.go
+++ b/air/v2/client/air/air_api_m_e_t_a_r1_responses.go
@@ -31,7 +31,7 @@ func (o *AirAPIMETAR1Reader) ReadResponse(response runtime.ClientResponse, consu
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
@@ -42,17 +42,17 @@ func NewAirAPIMETAR1OK() *AirAPIMETAR1OK {
/*AirAPIMETAR1OK handles this case with default header values.
-OK
+Success
*/
type AirAPIMETAR1OK struct {
- Payload []*models.ServiceDTOVersion2ApplicationMETAR
+ Payload []*models.PTXServiceDTOAirSpecificationV2METAR
}
func (o *AirAPIMETAR1OK) Error() string {
return fmt.Sprintf("[GET /v2/Air/METAR/Airport/{IATA}][%d] airApiMETAR1OK %+v", 200, o.Payload)
}
-func (o *AirAPIMETAR1OK) GetPayload() []*models.ServiceDTOVersion2ApplicationMETAR {
+func (o *AirAPIMETAR1OK) GetPayload() []*models.PTXServiceDTOAirSpecificationV2METAR {
return o.Payload
}
diff --git a/air/v2/client/air/air_api_m_e_t_a_r_responses.go b/air/v2/client/air/air_api_m_e_t_a_r_responses.go
index dcb08b99..6462b2f2 100644
--- a/air/v2/client/air/air_api_m_e_t_a_r_responses.go
+++ b/air/v2/client/air/air_api_m_e_t_a_r_responses.go
@@ -31,7 +31,7 @@ func (o *AirAPIMETARReader) ReadResponse(response runtime.ClientResponse, consum
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
@@ -42,17 +42,17 @@ func NewAirAPIMETAROK() *AirAPIMETAROK {
/*AirAPIMETAROK handles this case with default header values.
-OK
+Success
*/
type AirAPIMETAROK struct {
- Payload []*models.ServiceDTOVersion2ApplicationMETAR
+ Payload []*models.PTXServiceDTOAirSpecificationV2METAR
}
func (o *AirAPIMETAROK) Error() string {
return fmt.Sprintf("[GET /v2/Air/METAR/Airport][%d] airApiMETAROK %+v", 200, o.Payload)
}
-func (o *AirAPIMETAROK) GetPayload() []*models.ServiceDTOVersion2ApplicationMETAR {
+func (o *AirAPIMETAROK) GetPayload() []*models.PTXServiceDTOAirSpecificationV2METAR {
return o.Payload
}
diff --git a/air/v2/client/air/air_client.go b/air/v2/client/air/air_client.go
index 18151e6f..5040af4c 100644
--- a/air/v2/client/air/air_client.go
+++ b/air/v2/client/air/air_client.go
@@ -77,7 +77,7 @@ func (a *Client) AirAPIAirline(params *AirAPIAirlineParams) (*AirAPIAirlineOK, e
ID: "AirApi_Airline",
Method: "GET",
PathPattern: "/v2/Air/Airline/{IATA}",
- ProducesMediaTypes: []string{"application/json", "application/xml", "text/json", "text/xml"},
+ ProducesMediaTypes: []string{"application/json", "application/xml", "text/json", "text/plain"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"https"},
Params: params,
@@ -113,7 +113,7 @@ func (a *Client) AirAPIAirline1(params *AirAPIAirline1Params) (*AirAPIAirline1OK
ID: "AirApi_Airline_1",
Method: "GET",
PathPattern: "/v2/Air/Airline",
- ProducesMediaTypes: []string{"application/json", "text/json"},
+ ProducesMediaTypes: []string{"application/json", "application/xml"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"https"},
Params: params,
@@ -149,7 +149,7 @@ func (a *Client) AirAPIAirport(params *AirAPIAirportParams) (*AirAPIAirportOK, e
ID: "AirApi_Airport",
Method: "GET",
PathPattern: "/v2/Air/Airport",
- ProducesMediaTypes: []string{"application/json", "text/json"},
+ ProducesMediaTypes: []string{"application/json", "application/xml"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"https"},
Params: params,
@@ -185,7 +185,7 @@ func (a *Client) AirAPIAirport1(params *AirAPIAirport1Params) (*AirAPIAirport1OK
ID: "AirApi_Airport_1",
Method: "GET",
PathPattern: "/v2/Air/Airport/{IATA}",
- ProducesMediaTypes: []string{"application/json", "application/xml", "text/json", "text/xml"},
+ ProducesMediaTypes: []string{"application/json", "application/xml", "text/json", "text/plain"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"https"},
Params: params,
@@ -221,7 +221,7 @@ func (a *Client) AirAPIArrival(params *AirAPIArrivalParams) (*AirAPIArrivalOK, e
ID: "AirApi_Arrival",
Method: "GET",
PathPattern: "/v2/Air/FIDS/Airport/Arrival",
- ProducesMediaTypes: []string{"application/json", "text/json"},
+ ProducesMediaTypes: []string{"application/json", "application/xml"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"https"},
Params: params,
@@ -257,7 +257,7 @@ func (a *Client) AirAPIArrival1(params *AirAPIArrival1Params) (*AirAPIArrival1OK
ID: "AirApi_Arrival_1",
Method: "GET",
PathPattern: "/v2/Air/FIDS/Airport/Arrival/{IATA}",
- ProducesMediaTypes: []string{"application/json", "text/json"},
+ ProducesMediaTypes: []string{"application/json", "application/xml"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"https"},
Params: params,
@@ -293,7 +293,7 @@ func (a *Client) AirAPIDeparture(params *AirAPIDepartureParams) (*AirAPIDepartur
ID: "AirApi_Departure",
Method: "GET",
PathPattern: "/v2/Air/FIDS/Airport/Departure",
- ProducesMediaTypes: []string{"application/json", "text/json"},
+ ProducesMediaTypes: []string{"application/json", "application/xml"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"https"},
Params: params,
@@ -329,7 +329,7 @@ func (a *Client) AirAPIDeparture1(params *AirAPIDeparture1Params) (*AirAPIDepart
ID: "AirApi_Departure_1",
Method: "GET",
PathPattern: "/v2/Air/FIDS/Airport/Departure/{IATA}",
- ProducesMediaTypes: []string{"application/json", "text/json"},
+ ProducesMediaTypes: []string{"application/json", "application/xml"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"https"},
Params: params,
@@ -363,7 +363,7 @@ func (a *Client) AirAPIDomestic(params *AirAPIDomesticParams) (*AirAPIDomesticOK
ID: "AirApi_Domestic",
Method: "GET",
PathPattern: "/v2/Air/GeneralSchedule/Domestic",
- ProducesMediaTypes: []string{"application/json", "text/json"},
+ ProducesMediaTypes: []string{"application/json", "application/xml"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"https"},
Params: params,
@@ -399,7 +399,7 @@ func (a *Client) AirAPIFIDS(params *AirAPIFIDSParams) (*AirAPIFIDSOK, error) {
ID: "AirApi_FIDS",
Method: "GET",
PathPattern: "/v2/Air/FIDS/Airport",
- ProducesMediaTypes: []string{"application/json", "text/json"},
+ ProducesMediaTypes: []string{"application/json", "application/xml"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"https"},
Params: params,
@@ -435,7 +435,7 @@ func (a *Client) AirAPIFIDS1(params *AirAPIFIDS1Params) (*AirAPIFIDS1OK, error)
ID: "AirApi_FIDS_1",
Method: "GET",
PathPattern: "/v2/Air/FIDS/Airport/{IATA}",
- ProducesMediaTypes: []string{"application/json", "text/json"},
+ ProducesMediaTypes: []string{"application/json", "application/xml"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"https"},
Params: params,
@@ -471,7 +471,7 @@ func (a *Client) AirAPIFlight(params *AirAPIFlightParams) (*AirAPIFlightOK, erro
ID: "AirApi_Flight",
Method: "GET",
PathPattern: "/v2/Air/FIDS/Flight",
- ProducesMediaTypes: []string{"application/json", "text/json"},
+ ProducesMediaTypes: []string{"application/json", "application/xml"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"https"},
Params: params,
@@ -505,7 +505,7 @@ func (a *Client) AirAPIFlight1(params *AirAPIFlight1Params) (*AirAPIFlight1OK, e
ID: "AirApi_Flight_1",
Method: "GET",
PathPattern: "/v2/Air/FIDS/Flight/{FlightNo}",
- ProducesMediaTypes: []string{"application/json", "text/json"},
+ ProducesMediaTypes: []string{"application/json", "application/xml"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"https"},
Params: params,
@@ -539,7 +539,7 @@ func (a *Client) AirAPIInternational(params *AirAPIInternationalParams) (*AirAPI
ID: "AirApi_International",
Method: "GET",
PathPattern: "/v2/Air/GeneralSchedule/International",
- ProducesMediaTypes: []string{"application/json", "text/json"},
+ ProducesMediaTypes: []string{"application/json", "application/xml"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"https"},
Params: params,
@@ -583,7 +583,7 @@ func (a *Client) AirAPIMETAR(params *AirAPIMETARParams) (*AirAPIMETAROK, error)
ID: "AirApi_METAR",
Method: "GET",
PathPattern: "/v2/Air/METAR/Airport",
- ProducesMediaTypes: []string{"application/json", "text/json"},
+ ProducesMediaTypes: []string{"application/json", "application/xml"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"https"},
Params: params,
@@ -619,7 +619,7 @@ func (a *Client) AirAPIMETAR1(params *AirAPIMETAR1Params) (*AirAPIMETAR1OK, erro
ID: "AirApi_METAR_1",
Method: "GET",
PathPattern: "/v2/Air/METAR/Airport/{IATA}",
- ProducesMediaTypes: []string{"application/json", "text/json"},
+ ProducesMediaTypes: []string{"application/json", "application/xml"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"https"},
Params: params,
diff --git a/air/v2/client/m_o_t_c_transport_api_v2_client.go b/air/v2/client/m_o_t_c_transport_api_v2_client.go
index e722950a..3e5ba5f9 100644
--- a/air/v2/client/m_o_t_c_transport_api_v2_client.go
+++ b/air/v2/client/m_o_t_c_transport_api_v2_client.go
@@ -22,7 +22,7 @@ const (
DefaultHost string = "ptx.transportdata.tw"
// DefaultBasePath is the default BasePath
// found in Meta (info) section of spec file
- DefaultBasePath string = "/MOTC/"
+ DefaultBasePath string = "/MOTC"
)
// DefaultSchemes are the default schemes found in Meta (info) section of spec file
diff --git a/air/v2/models/service_d_t_o_version2_aviation_airline.go b/air/v2/models/p_t_x_service_d_t_o_air_specification_v2_airline.go
similarity index 61%
rename from air/v2/models/service_d_t_o_version2_aviation_airline.go
rename to air/v2/models/p_t_x_service_d_t_o_air_specification_v2_airline.go
index 7ea0792e..d6649c56 100644
--- a/air/v2/models/service_d_t_o_version2_aviation_airline.go
+++ b/air/v2/models/p_t_x_service_d_t_o_air_specification_v2_airline.go
@@ -12,25 +12,35 @@ import (
"github.com/go-openapi/validate"
)
-// ServiceDTOVersion2AviationAirline Airline
+// PTXServiceDTOAirSpecificationV2Airline Airline
//
// 航空公司資料
//
-// swagger:model Service.DTO.Version2.Aviation.Airline
-type ServiceDTOVersion2AviationAirline struct {
+// swagger:model PTX.Service.DTO.Air.Specification.V2.Airline
+type PTXServiceDTOAirSpecificationV2Airline struct {
+ // String
+ //
// 航空公司地址
AirlineAddress string `json:"AirlineAddress,omitempty"`
+ // String
+ //
// 航空公司電子信箱
AirlineEmail string `json:"AirlineEmail,omitempty"`
+ // String
+ //
// 航空公司IATA國際代碼
AirlineIATA string `json:"AirlineIATA,omitempty"`
+ // String
+ //
// 航空公司ICAO國際代碼
AirlineICAO string `json:"AirlineICAO,omitempty"`
+ // String
+ //
// 航空公司IATA國際代碼
// Required: true
AirlineID *string `json:"AirlineID"`
@@ -38,16 +48,24 @@ type ServiceDTOVersion2AviationAirline struct {
// NameType
//
// 航空公司名稱
- AirlineName *ServiceDTOVersion2BaseNameType `json:"AirlineName,omitempty"`
+ AirlineName struct {
+ PTXServiceDTOSharedSpecificationV2BaseNameType
+ } `json:"AirlineName,omitempty"`
// NameType
//
// 航空公司簡稱
- AirlineNameAlias *ServiceDTOVersion2BaseNameType `json:"AirlineNameAlias,omitempty"`
+ AirlineNameAlias struct {
+ PTXServiceDTOSharedSpecificationV2BaseNameType
+ } `json:"AirlineNameAlias,omitempty"`
+ // String
+ //
// 航空公司國籍
AirlineNationality string `json:"AirlineNationality,omitempty"`
+ // String
+ //
// 航空公司聯繫電話
AirlinePhone string `json:"AirlinePhone,omitempty"`
@@ -57,13 +75,15 @@ type ServiceDTOVersion2AviationAirline struct {
// Required: true
UpdateTime *string `json:"UpdateTime"`
+ // Int32
+ //
// 資料版本編號
// Required: true
VersionID *int32 `json:"VersionID"`
}
-// Validate validates this service d t o version2 aviation airline
-func (m *ServiceDTOVersion2AviationAirline) Validate(formats strfmt.Registry) error {
+// Validate validates this p t x service d t o air specification v2 airline
+func (m *PTXServiceDTOAirSpecificationV2Airline) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateAirlineID(formats); err != nil {
@@ -92,7 +112,7 @@ func (m *ServiceDTOVersion2AviationAirline) Validate(formats strfmt.Registry) er
return nil
}
-func (m *ServiceDTOVersion2AviationAirline) validateAirlineID(formats strfmt.Registry) error {
+func (m *PTXServiceDTOAirSpecificationV2Airline) validateAirlineID(formats strfmt.Registry) error {
if err := validate.Required("AirlineID", "body", m.AirlineID); err != nil {
return err
@@ -101,43 +121,25 @@ func (m *ServiceDTOVersion2AviationAirline) validateAirlineID(formats strfmt.Reg
return nil
}
-func (m *ServiceDTOVersion2AviationAirline) validateAirlineName(formats strfmt.Registry) error {
+func (m *PTXServiceDTOAirSpecificationV2Airline) validateAirlineName(formats strfmt.Registry) error {
if swag.IsZero(m.AirlineName) { // not required
return nil
}
- if m.AirlineName != nil {
- if err := m.AirlineName.Validate(formats); err != nil {
- if ve, ok := err.(*errors.Validation); ok {
- return ve.ValidateName("AirlineName")
- }
- return err
- }
- }
-
return nil
}
-func (m *ServiceDTOVersion2AviationAirline) validateAirlineNameAlias(formats strfmt.Registry) error {
+func (m *PTXServiceDTOAirSpecificationV2Airline) validateAirlineNameAlias(formats strfmt.Registry) error {
if swag.IsZero(m.AirlineNameAlias) { // not required
return nil
}
- if m.AirlineNameAlias != nil {
- if err := m.AirlineNameAlias.Validate(formats); err != nil {
- if ve, ok := err.(*errors.Validation); ok {
- return ve.ValidateName("AirlineNameAlias")
- }
- return err
- }
- }
-
return nil
}
-func (m *ServiceDTOVersion2AviationAirline) validateUpdateTime(formats strfmt.Registry) error {
+func (m *PTXServiceDTOAirSpecificationV2Airline) validateUpdateTime(formats strfmt.Registry) error {
if err := validate.Required("UpdateTime", "body", m.UpdateTime); err != nil {
return err
@@ -146,7 +148,7 @@ func (m *ServiceDTOVersion2AviationAirline) validateUpdateTime(formats strfmt.Re
return nil
}
-func (m *ServiceDTOVersion2AviationAirline) validateVersionID(formats strfmt.Registry) error {
+func (m *PTXServiceDTOAirSpecificationV2Airline) validateVersionID(formats strfmt.Registry) error {
if err := validate.Required("VersionID", "body", m.VersionID); err != nil {
return err
@@ -156,7 +158,7 @@ func (m *ServiceDTOVersion2AviationAirline) validateVersionID(formats strfmt.Reg
}
// MarshalBinary interface implementation
-func (m *ServiceDTOVersion2AviationAirline) MarshalBinary() ([]byte, error) {
+func (m *PTXServiceDTOAirSpecificationV2Airline) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
@@ -164,8 +166,8 @@ func (m *ServiceDTOVersion2AviationAirline) MarshalBinary() ([]byte, error) {
}
// UnmarshalBinary interface implementation
-func (m *ServiceDTOVersion2AviationAirline) UnmarshalBinary(b []byte) error {
- var res ServiceDTOVersion2AviationAirline
+func (m *PTXServiceDTOAirSpecificationV2Airline) UnmarshalBinary(b []byte) error {
+ var res PTXServiceDTOAirSpecificationV2Airline
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
diff --git a/air/v2/models/service_d_t_o_version2_aviation_airport.go b/air/v2/models/p_t_x_service_d_t_o_air_specification_v2_airport.go
similarity index 51%
rename from air/v2/models/service_d_t_o_version2_aviation_airport.go
rename to air/v2/models/p_t_x_service_d_t_o_air_specification_v2_airport.go
index a6a551ec..d9bf76e2 100644
--- a/air/v2/models/service_d_t_o_version2_aviation_airport.go
+++ b/air/v2/models/p_t_x_service_d_t_o_air_specification_v2_airport.go
@@ -12,27 +12,37 @@ import (
"github.com/go-openapi/validate"
)
-// ServiceDTOVersion2AviationAirport Airport
+// PTXServiceDTOAirSpecificationV2Airport Airport
//
// 機場資料
//
-// swagger:model Service.DTO.Version2.Aviation.Airport
-type ServiceDTOVersion2AviationAirport struct {
+// swagger:model PTX.Service.DTO.Air.Specification.V2.Airport
+type PTXServiceDTOAirSpecificationV2Airport struct {
+ // String
+ //
// 機場地址
AirportAdrress string `json:"AirportAdrress,omitempty"`
// NameType
//
// 機場所屬城市
- AirportCityName *ServiceDTOVersion2BaseNameType `json:"AirportCityName,omitempty"`
+ AirportCityName struct {
+ PTXServiceDTOSharedSpecificationV2BaseNameType
+ } `json:"AirportCityName,omitempty"`
+ // String
+ //
// 機場IATA國際代碼
AirportIATA string `json:"AirportIATA,omitempty"`
+ // String
+ //
// 機場ICAO國際代碼
AirportICAO string `json:"AirportICAO,omitempty"`
+ // String
+ //
// 機場IATA國際代碼
// Required: true
AirportID *string `json:"AirportID"`
@@ -40,23 +50,31 @@ type ServiceDTOVersion2AviationAirport struct {
// NameType
//
// 機場中文名稱
- AirportName *ServiceDTOVersion2BaseNameType `json:"AirportName,omitempty"`
+ AirportName struct {
+ PTXServiceDTOSharedSpecificationV2BaseNameType
+ } `json:"AirportName,omitempty"`
+ // String
+ //
// 機場國籍
AirportNationality string `json:"AirportNationality,omitempty"`
+ // String
+ //
// 機場聯繫電話
AirportPhone string `json:"AirportPhone,omitempty"`
// PointType
//
// 機場位置
- AirportPosition *ServiceDTOVersion2BasePointType `json:"AirportPosition,omitempty"`
+ AirportPosition struct {
+ PTXServiceDTOSharedSpecificationV2BasePointType
+ } `json:"AirportPosition,omitempty"`
+ // String
+ //
// 業管機關代碼(流水號)
- // Max Length: 2
- // Min Length: 0
- AuthorityID *string `json:"AuthorityID,omitempty"`
+ AuthorityID string `json:"AuthorityID,omitempty"`
// DateTime
//
@@ -64,13 +82,15 @@ type ServiceDTOVersion2AviationAirport struct {
// Required: true
UpdateTime *string `json:"UpdateTime"`
+ // Int32
+ //
// 資料版本編號
// Required: true
VersionID *int32 `json:"VersionID"`
}
-// Validate validates this service d t o version2 aviation airport
-func (m *ServiceDTOVersion2AviationAirport) Validate(formats strfmt.Registry) error {
+// Validate validates this p t x service d t o air specification v2 airport
+func (m *PTXServiceDTOAirSpecificationV2Airport) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateAirportCityName(formats); err != nil {
@@ -89,10 +109,6 @@ func (m *ServiceDTOVersion2AviationAirport) Validate(formats strfmt.Registry) er
res = append(res, err)
}
- if err := m.validateAuthorityID(formats); err != nil {
- res = append(res, err)
- }
-
if err := m.validateUpdateTime(formats); err != nil {
res = append(res, err)
}
@@ -107,25 +123,16 @@ func (m *ServiceDTOVersion2AviationAirport) Validate(formats strfmt.Registry) er
return nil
}
-func (m *ServiceDTOVersion2AviationAirport) validateAirportCityName(formats strfmt.Registry) error {
+func (m *PTXServiceDTOAirSpecificationV2Airport) validateAirportCityName(formats strfmt.Registry) error {
if swag.IsZero(m.AirportCityName) { // not required
return nil
}
- if m.AirportCityName != nil {
- if err := m.AirportCityName.Validate(formats); err != nil {
- if ve, ok := err.(*errors.Validation); ok {
- return ve.ValidateName("AirportCityName")
- }
- return err
- }
- }
-
return nil
}
-func (m *ServiceDTOVersion2AviationAirport) validateAirportID(formats strfmt.Registry) error {
+func (m *PTXServiceDTOAirSpecificationV2Airport) validateAirportID(formats strfmt.Registry) error {
if err := validate.Required("AirportID", "body", m.AirportID); err != nil {
return err
@@ -134,60 +141,25 @@ func (m *ServiceDTOVersion2AviationAirport) validateAirportID(formats strfmt.Reg
return nil
}
-func (m *ServiceDTOVersion2AviationAirport) validateAirportName(formats strfmt.Registry) error {
+func (m *PTXServiceDTOAirSpecificationV2Airport) validateAirportName(formats strfmt.Registry) error {
if swag.IsZero(m.AirportName) { // not required
return nil
}
- if m.AirportName != nil {
- if err := m.AirportName.Validate(formats); err != nil {
- if ve, ok := err.(*errors.Validation); ok {
- return ve.ValidateName("AirportName")
- }
- return err
- }
- }
-
return nil
}
-func (m *ServiceDTOVersion2AviationAirport) validateAirportPosition(formats strfmt.Registry) error {
+func (m *PTXServiceDTOAirSpecificationV2Airport) validateAirportPosition(formats strfmt.Registry) error {
if swag.IsZero(m.AirportPosition) { // not required
return nil
}
- if m.AirportPosition != nil {
- if err := m.AirportPosition.Validate(formats); err != nil {
- if ve, ok := err.(*errors.Validation); ok {
- return ve.ValidateName("AirportPosition")
- }
- return err
- }
- }
-
- return nil
-}
-
-func (m *ServiceDTOVersion2AviationAirport) validateAuthorityID(formats strfmt.Registry) error {
-
- if swag.IsZero(m.AuthorityID) { // not required
- return nil
- }
-
- if err := validate.MinLength("AuthorityID", "body", string(*m.AuthorityID), 0); err != nil {
- return err
- }
-
- if err := validate.MaxLength("AuthorityID", "body", string(*m.AuthorityID), 2); err != nil {
- return err
- }
-
return nil
}
-func (m *ServiceDTOVersion2AviationAirport) validateUpdateTime(formats strfmt.Registry) error {
+func (m *PTXServiceDTOAirSpecificationV2Airport) validateUpdateTime(formats strfmt.Registry) error {
if err := validate.Required("UpdateTime", "body", m.UpdateTime); err != nil {
return err
@@ -196,7 +168,7 @@ func (m *ServiceDTOVersion2AviationAirport) validateUpdateTime(formats strfmt.Re
return nil
}
-func (m *ServiceDTOVersion2AviationAirport) validateVersionID(formats strfmt.Registry) error {
+func (m *PTXServiceDTOAirSpecificationV2Airport) validateVersionID(formats strfmt.Registry) error {
if err := validate.Required("VersionID", "body", m.VersionID); err != nil {
return err
@@ -206,7 +178,7 @@ func (m *ServiceDTOVersion2AviationAirport) validateVersionID(formats strfmt.Reg
}
// MarshalBinary interface implementation
-func (m *ServiceDTOVersion2AviationAirport) MarshalBinary() ([]byte, error) {
+func (m *PTXServiceDTOAirSpecificationV2Airport) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
@@ -214,8 +186,8 @@ func (m *ServiceDTOVersion2AviationAirport) MarshalBinary() ([]byte, error) {
}
// UnmarshalBinary interface implementation
-func (m *ServiceDTOVersion2AviationAirport) UnmarshalBinary(b []byte) error {
- var res ServiceDTOVersion2AviationAirport
+func (m *PTXServiceDTOAirSpecificationV2Airport) UnmarshalBinary(b []byte) error {
+ var res PTXServiceDTOAirSpecificationV2Airport
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
diff --git a/air/v2/models/service_d_t_o_version2_aviation_airport_f_id_s.go b/air/v2/models/p_t_x_service_d_t_o_air_specification_v2_airport_f_id_s.go
similarity index 67%
rename from air/v2/models/service_d_t_o_version2_aviation_airport_f_id_s.go
rename to air/v2/models/p_t_x_service_d_t_o_air_specification_v2_airport_f_id_s.go
index 19e8da7a..9060f759 100644
--- a/air/v2/models/service_d_t_o_version2_aviation_airport_f_id_s.go
+++ b/air/v2/models/p_t_x_service_d_t_o_air_specification_v2_airport_f_id_s.go
@@ -14,22 +14,28 @@ import (
"github.com/go-openapi/validate"
)
-// ServiceDTOVersion2AviationAirportFIDS Airport_FIDS
+// PTXServiceDTOAirSpecificationV2AirportFIDS Airport_FIDS
//
// 航班顯示資料(以機場角度)
//
-// swagger:model Service.DTO.Version2.Aviation.Airport_FIDS
-type ServiceDTOVersion2AviationAirportFIDS struct {
+// swagger:model PTX.Service.DTO.Air.Specification.V2.Airport_FIDS
+type PTXServiceDTOAirSpecificationV2AirportFIDS struct {
+ // String
+ //
// 機場IATA國際代碼
// Required: true
AirportID *string `json:"AirportID"`
+ // Array
+ //
// 抵達航班顯示資料
- FIDSArrival []*ServiceDTOVersion2AviationFIDSArrival `json:"FIDSArrival"`
+ FIDSArrival []*PTXServiceDTOAirSpecificationV2FIDSArrival `json:"FIDSArrival"`
+ // Array
+ //
// 出發航班顯示資料
- FIDSDeparture []*ServiceDTOVersion2AviationFIDSDeparture `json:"FIDSDeparture"`
+ FIDSDeparture []*PTXServiceDTOAirSpecificationV2FIDSDeparture `json:"FIDSDeparture"`
// DateTime
//
@@ -38,8 +44,8 @@ type ServiceDTOVersion2AviationAirportFIDS struct {
UpdateTime *string `json:"UpdateTime"`
}
-// Validate validates this service d t o version2 aviation airport f ID s
-func (m *ServiceDTOVersion2AviationAirportFIDS) Validate(formats strfmt.Registry) error {
+// Validate validates this p t x service d t o air specification v2 airport f ID s
+func (m *PTXServiceDTOAirSpecificationV2AirportFIDS) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateAirportID(formats); err != nil {
@@ -64,7 +70,7 @@ func (m *ServiceDTOVersion2AviationAirportFIDS) Validate(formats strfmt.Registry
return nil
}
-func (m *ServiceDTOVersion2AviationAirportFIDS) validateAirportID(formats strfmt.Registry) error {
+func (m *PTXServiceDTOAirSpecificationV2AirportFIDS) validateAirportID(formats strfmt.Registry) error {
if err := validate.Required("AirportID", "body", m.AirportID); err != nil {
return err
@@ -73,7 +79,7 @@ func (m *ServiceDTOVersion2AviationAirportFIDS) validateAirportID(formats strfmt
return nil
}
-func (m *ServiceDTOVersion2AviationAirportFIDS) validateFIDSArrival(formats strfmt.Registry) error {
+func (m *PTXServiceDTOAirSpecificationV2AirportFIDS) validateFIDSArrival(formats strfmt.Registry) error {
if swag.IsZero(m.FIDSArrival) { // not required
return nil
@@ -98,7 +104,7 @@ func (m *ServiceDTOVersion2AviationAirportFIDS) validateFIDSArrival(formats strf
return nil
}
-func (m *ServiceDTOVersion2AviationAirportFIDS) validateFIDSDeparture(formats strfmt.Registry) error {
+func (m *PTXServiceDTOAirSpecificationV2AirportFIDS) validateFIDSDeparture(formats strfmt.Registry) error {
if swag.IsZero(m.FIDSDeparture) { // not required
return nil
@@ -123,7 +129,7 @@ func (m *ServiceDTOVersion2AviationAirportFIDS) validateFIDSDeparture(formats st
return nil
}
-func (m *ServiceDTOVersion2AviationAirportFIDS) validateUpdateTime(formats strfmt.Registry) error {
+func (m *PTXServiceDTOAirSpecificationV2AirportFIDS) validateUpdateTime(formats strfmt.Registry) error {
if err := validate.Required("UpdateTime", "body", m.UpdateTime); err != nil {
return err
@@ -133,7 +139,7 @@ func (m *ServiceDTOVersion2AviationAirportFIDS) validateUpdateTime(formats strfm
}
// MarshalBinary interface implementation
-func (m *ServiceDTOVersion2AviationAirportFIDS) MarshalBinary() ([]byte, error) {
+func (m *PTXServiceDTOAirSpecificationV2AirportFIDS) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
@@ -141,8 +147,8 @@ func (m *ServiceDTOVersion2AviationAirportFIDS) MarshalBinary() ([]byte, error)
}
// UnmarshalBinary interface implementation
-func (m *ServiceDTOVersion2AviationAirportFIDS) UnmarshalBinary(b []byte) error {
- var res ServiceDTOVersion2AviationAirportFIDS
+func (m *PTXServiceDTOAirSpecificationV2AirportFIDS) UnmarshalBinary(b []byte) error {
+ var res PTXServiceDTOAirSpecificationV2AirportFIDS
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
diff --git a/air/v2/models/service_d_t_o_version2_aviation_code_share.go b/air/v2/models/p_t_x_service_d_t_o_air_specification_v2_code_share.go
similarity index 62%
rename from air/v2/models/service_d_t_o_version2_aviation_code_share.go
rename to air/v2/models/p_t_x_service_d_t_o_air_specification_v2_code_share.go
index 75b36d3c..ded1a403 100644
--- a/air/v2/models/service_d_t_o_version2_aviation_code_share.go
+++ b/air/v2/models/p_t_x_service_d_t_o_air_specification_v2_code_share.go
@@ -12,24 +12,28 @@ import (
"github.com/go-openapi/validate"
)
-// ServiceDTOVersion2AviationCodeShare CodeShare
+// PTXServiceDTOAirSpecificationV2CodeShare CodeShare
//
// 共用班號
//
-// swagger:model Service.DTO.Version2.Aviation.CodeShare
-type ServiceDTOVersion2AviationCodeShare struct {
+// swagger:model PTX.Service.DTO.Air.Specification.V2.CodeShare
+type PTXServiceDTOAirSpecificationV2CodeShare struct {
+ // String
+ //
// 航空公司IATA國際代碼
// Required: true
AirlineID *string `json:"AirlineID"`
+ // String
+ //
// 航機班號(不包含航空公司的AirlineID,僅有班號數字)
// Required: true
FlightNumber *string `json:"FlightNumber"`
}
-// Validate validates this service d t o version2 aviation code share
-func (m *ServiceDTOVersion2AviationCodeShare) Validate(formats strfmt.Registry) error {
+// Validate validates this p t x service d t o air specification v2 code share
+func (m *PTXServiceDTOAirSpecificationV2CodeShare) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateAirlineID(formats); err != nil {
@@ -46,7 +50,7 @@ func (m *ServiceDTOVersion2AviationCodeShare) Validate(formats strfmt.Registry)
return nil
}
-func (m *ServiceDTOVersion2AviationCodeShare) validateAirlineID(formats strfmt.Registry) error {
+func (m *PTXServiceDTOAirSpecificationV2CodeShare) validateAirlineID(formats strfmt.Registry) error {
if err := validate.Required("AirlineID", "body", m.AirlineID); err != nil {
return err
@@ -55,7 +59,7 @@ func (m *ServiceDTOVersion2AviationCodeShare) validateAirlineID(formats strfmt.R
return nil
}
-func (m *ServiceDTOVersion2AviationCodeShare) validateFlightNumber(formats strfmt.Registry) error {
+func (m *PTXServiceDTOAirSpecificationV2CodeShare) validateFlightNumber(formats strfmt.Registry) error {
if err := validate.Required("FlightNumber", "body", m.FlightNumber); err != nil {
return err
@@ -65,7 +69,7 @@ func (m *ServiceDTOVersion2AviationCodeShare) validateFlightNumber(formats strfm
}
// MarshalBinary interface implementation
-func (m *ServiceDTOVersion2AviationCodeShare) MarshalBinary() ([]byte, error) {
+func (m *PTXServiceDTOAirSpecificationV2CodeShare) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
@@ -73,8 +77,8 @@ func (m *ServiceDTOVersion2AviationCodeShare) MarshalBinary() ([]byte, error) {
}
// UnmarshalBinary interface implementation
-func (m *ServiceDTOVersion2AviationCodeShare) UnmarshalBinary(b []byte) error {
- var res ServiceDTOVersion2AviationCodeShare
+func (m *PTXServiceDTOAirSpecificationV2CodeShare) UnmarshalBinary(b []byte) error {
+ var res PTXServiceDTOAirSpecificationV2CodeShare
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
diff --git a/air/v2/models/service_d_t_o_version2_aviation_f_id_s.go b/air/v2/models/p_t_x_service_d_t_o_air_specification_v2_f_id_s.go
similarity index 78%
rename from air/v2/models/service_d_t_o_version2_aviation_f_id_s.go
rename to air/v2/models/p_t_x_service_d_t_o_air_specification_v2_f_id_s.go
index 12aa37a9..c484c740 100644
--- a/air/v2/models/service_d_t_o_version2_aviation_f_id_s.go
+++ b/air/v2/models/p_t_x_service_d_t_o_air_specification_v2_f_id_s.go
@@ -12,13 +12,15 @@ import (
"github.com/go-openapi/validate"
)
-// ServiceDTOVersion2AviationFIDS FIDS
+// PTXServiceDTOAirSpecificationV2FIDS FIDS
//
// 航班顯示資料
//
-// swagger:model Service.DTO.Version2.Aviation.FIDS
-type ServiceDTOVersion2AviationFIDS struct {
+// swagger:model PTX.Service.DTO.Air.Specification.V2.FIDS
+type PTXServiceDTOAirSpecificationV2FIDS struct {
+ // String
+ //
// 航空器型號
AcType string `json:"AcType,omitempty"`
@@ -37,54 +39,86 @@ type ServiceDTOVersion2AviationFIDS struct {
// 航線種類 : [-2:'特殊',1:'國際',2:'國內',3:'兩岸',4:'國際包機',5:'國內包機',6:'兩岸包機']
AirRouteType int32 `json:"AirRouteType,omitempty"`
+ // String
+ //
// 航空公司IATA國際代碼
// Required: true
AirlineID *string `json:"AirlineID"`
+ // String
+ //
// 目的地機場IATA國際代碼
// Required: true
ArrivalAirportID *string `json:"ArrivalAirportID"`
+ // String
+ //
// 抵達停機坪(僅貨機提供)
ArrivalApron string `json:"ArrivalApron,omitempty"`
+ // String
+ //
// 抵達登機門(僅客機提供)
ArrivalGate string `json:"ArrivalGate,omitempty"`
+ // String
+ //
// 航班屬性狀態,為該機場觀點的狀態
ArrivalRemark string `json:"ArrivalRemark,omitempty"`
+ // String
+ //
// 航班屬性狀態(英文)
ArrivalRemarkEn string `json:"ArrivalRemarkEn,omitempty"`
+ // String
+ //
// 抵達航廈
ArrivalTerminal string `json:"ArrivalTerminal,omitempty"`
+ // String
+ //
// 行李轉盤
BaggageClaim string `json:"BaggageClaim,omitempty"`
+ // String
+ //
// 報到櫃檯
CheckCounter string `json:"CheckCounter,omitempty"`
+ // String
+ //
// 航班共用班號
CodeShare string `json:"CodeShare,omitempty"`
+ // String
+ //
// 起點機場IATA國際代碼
// Required: true
DepartureAirportID *string `json:"DepartureAirportID"`
+ // String
+ //
// 出發停機坪(僅貨機提供)
DepartureApron string `json:"DepartureApron,omitempty"`
+ // String
+ //
// 出發登機門(僅客機提供)
DepartureGate string `json:"DepartureGate,omitempty"`
+ // String
+ //
// 航班屬性狀態,為第三方觀點的狀態(資料來源:民航局)
DepartureRemark string `json:"DepartureRemark,omitempty"`
+ // String
+ //
// 航班屬性狀態(英文)
DepartureRemarkEn string `json:"DepartureRemarkEn,omitempty"`
+ // String
+ //
// 出發航廈
DepartureTerminal string `json:"DepartureTerminal,omitempty"`
@@ -104,22 +138,34 @@ type ServiceDTOVersion2AviationFIDS struct {
// Required: true
FlightDate *string `json:"FlightDate"`
+ // String
+ //
// 航機班號(不包含航空公司的AirlineID,僅有班號數字)
// Required: true
FlightNumber *string `json:"FlightNumber"`
+ // String
+ //
// 航班屬性
FlightRemark string `json:"FlightRemark,omitempty"`
+ // String
+ //
// 航班運行狀態,以航班的角度的狀態
FlightStatus string `json:"FlightStatus,omitempty"`
+ // String
+ //
// 航班運行狀態(英文)
FlightStatusEn string `json:"FlightStatusEn,omitempty"`
+ // String
+ //
// 航班運行狀態百分比(國內線)
FlightStatusPC string `json:"FlightStatusPC,omitempty"`
+ // Boolean
+ //
// 是否為貨機
IsCargo bool `json:"IsCargo,omitempty"`
@@ -140,8 +186,8 @@ type ServiceDTOVersion2AviationFIDS struct {
UpdateTime *string `json:"UpdateTime"`
}
-// Validate validates this service d t o version2 aviation f ID s
-func (m *ServiceDTOVersion2AviationFIDS) Validate(formats strfmt.Registry) error {
+// Validate validates this p t x service d t o air specification v2 f ID s
+func (m *PTXServiceDTOAirSpecificationV2FIDS) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateAirlineID(formats); err != nil {
@@ -174,7 +220,7 @@ func (m *ServiceDTOVersion2AviationFIDS) Validate(formats strfmt.Registry) error
return nil
}
-func (m *ServiceDTOVersion2AviationFIDS) validateAirlineID(formats strfmt.Registry) error {
+func (m *PTXServiceDTOAirSpecificationV2FIDS) validateAirlineID(formats strfmt.Registry) error {
if err := validate.Required("AirlineID", "body", m.AirlineID); err != nil {
return err
@@ -183,7 +229,7 @@ func (m *ServiceDTOVersion2AviationFIDS) validateAirlineID(formats strfmt.Regist
return nil
}
-func (m *ServiceDTOVersion2AviationFIDS) validateArrivalAirportID(formats strfmt.Registry) error {
+func (m *PTXServiceDTOAirSpecificationV2FIDS) validateArrivalAirportID(formats strfmt.Registry) error {
if err := validate.Required("ArrivalAirportID", "body", m.ArrivalAirportID); err != nil {
return err
@@ -192,7 +238,7 @@ func (m *ServiceDTOVersion2AviationFIDS) validateArrivalAirportID(formats strfmt
return nil
}
-func (m *ServiceDTOVersion2AviationFIDS) validateDepartureAirportID(formats strfmt.Registry) error {
+func (m *PTXServiceDTOAirSpecificationV2FIDS) validateDepartureAirportID(formats strfmt.Registry) error {
if err := validate.Required("DepartureAirportID", "body", m.DepartureAirportID); err != nil {
return err
@@ -201,7 +247,7 @@ func (m *ServiceDTOVersion2AviationFIDS) validateDepartureAirportID(formats strf
return nil
}
-func (m *ServiceDTOVersion2AviationFIDS) validateFlightDate(formats strfmt.Registry) error {
+func (m *PTXServiceDTOAirSpecificationV2FIDS) validateFlightDate(formats strfmt.Registry) error {
if err := validate.Required("FlightDate", "body", m.FlightDate); err != nil {
return err
@@ -210,7 +256,7 @@ func (m *ServiceDTOVersion2AviationFIDS) validateFlightDate(formats strfmt.Regis
return nil
}
-func (m *ServiceDTOVersion2AviationFIDS) validateFlightNumber(formats strfmt.Registry) error {
+func (m *PTXServiceDTOAirSpecificationV2FIDS) validateFlightNumber(formats strfmt.Registry) error {
if err := validate.Required("FlightNumber", "body", m.FlightNumber); err != nil {
return err
@@ -219,7 +265,7 @@ func (m *ServiceDTOVersion2AviationFIDS) validateFlightNumber(formats strfmt.Reg
return nil
}
-func (m *ServiceDTOVersion2AviationFIDS) validateUpdateTime(formats strfmt.Registry) error {
+func (m *PTXServiceDTOAirSpecificationV2FIDS) validateUpdateTime(formats strfmt.Registry) error {
if err := validate.Required("UpdateTime", "body", m.UpdateTime); err != nil {
return err
@@ -229,7 +275,7 @@ func (m *ServiceDTOVersion2AviationFIDS) validateUpdateTime(formats strfmt.Regis
}
// MarshalBinary interface implementation
-func (m *ServiceDTOVersion2AviationFIDS) MarshalBinary() ([]byte, error) {
+func (m *PTXServiceDTOAirSpecificationV2FIDS) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
@@ -237,8 +283,8 @@ func (m *ServiceDTOVersion2AviationFIDS) MarshalBinary() ([]byte, error) {
}
// UnmarshalBinary interface implementation
-func (m *ServiceDTOVersion2AviationFIDS) UnmarshalBinary(b []byte) error {
- var res ServiceDTOVersion2AviationFIDS
+func (m *PTXServiceDTOAirSpecificationV2FIDS) UnmarshalBinary(b []byte) error {
+ var res PTXServiceDTOAirSpecificationV2FIDS
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
diff --git a/air/v2/models/service_d_t_o_version2_aviation_f_id_s_arrival.go b/air/v2/models/p_t_x_service_d_t_o_air_specification_v2_f_id_s_arrival.go
similarity index 74%
rename from air/v2/models/service_d_t_o_version2_aviation_f_id_s_arrival.go
rename to air/v2/models/p_t_x_service_d_t_o_air_specification_v2_f_id_s_arrival.go
index 8baec662..37954754 100644
--- a/air/v2/models/service_d_t_o_version2_aviation_f_id_s_arrival.go
+++ b/air/v2/models/p_t_x_service_d_t_o_air_specification_v2_f_id_s_arrival.go
@@ -12,13 +12,15 @@ import (
"github.com/go-openapi/validate"
)
-// ServiceDTOVersion2AviationFIDSArrival FIDSArrival
+// PTXServiceDTOAirSpecificationV2FIDSArrival FIDSArrival
//
// 抵達航班顯示資料
//
-// swagger:model Service.DTO.Version2.Aviation.FIDSArrival
-type ServiceDTOVersion2AviationFIDSArrival struct {
+// swagger:model PTX.Service.DTO.Air.Specification.V2.FIDSArrival
+type PTXServiceDTOAirSpecificationV2FIDSArrival struct {
+ // String
+ //
// 航空器型號
AcType string `json:"AcType,omitempty"`
@@ -32,32 +34,50 @@ type ServiceDTOVersion2AviationFIDSArrival struct {
// 航線種類(目前民航局與桃機的FIDS系統都尚未提供此欄位資料) : [-2:'特殊',1:'國際',2:'國內',3:'兩岸',4:'國際包機',5:'國內包機',6:'兩岸包機']
AirRouteType int32 `json:"AirRouteType,omitempty"`
+ // String
+ //
// 航空公司IATA國際代碼
// Required: true
AirlineID *string `json:"AirlineID"`
+ // String
+ //
// 停機坪(僅貨機提供)
Apron string `json:"Apron,omitempty"`
+ // String
+ //
// 目的地機場IATA國際代碼
// Required: true
ArrivalAirportID *string `json:"ArrivalAirportID"`
+ // String
+ //
// 航班屬性狀態,為該機場觀點的狀態
ArrivalRemark string `json:"ArrivalRemark,omitempty"`
+ // String
+ //
// 航班屬性狀態(英文)
ArrivalRemarkEn string `json:"ArrivalRemarkEn,omitempty"`
+ // String
+ //
// 行李轉盤(到站FIDS可能有「行李轉盤」資訊, 離站FIDS不會有, 貨機則無此資訊)
BaggageClaim string `json:"BaggageClaim,omitempty"`
+ // String
+ //
// 報到櫃檯(離站FIDS可能有「報到櫃台」資訊, 到站FIDS不會有, 貨機則無此資訊)
CheckCounter string `json:"CheckCounter,omitempty"`
+ // String
+ //
// 航班共用班號
CodeShare string `json:"CodeShare,omitempty"`
+ // String
+ //
// 起點機場IATA國際代碼
// Required: true
DepartureAirportID *string `json:"DepartureAirportID"`
@@ -73,13 +93,19 @@ type ServiceDTOVersion2AviationFIDSArrival struct {
// Required: true
FlightDate *string `json:"FlightDate"`
+ // String
+ //
// 航機班號(不包含航空公司的AirlineID,僅有班號數字)
// Required: true
FlightNumber *string `json:"FlightNumber"`
+ // String
+ //
// 登機門(僅客機提供)
Gate string `json:"Gate,omitempty"`
+ // Boolean
+ //
// 是否為貨機
IsCargo bool `json:"IsCargo,omitempty"`
@@ -88,6 +114,8 @@ type ServiceDTOVersion2AviationFIDSArrival struct {
// 表訂抵達時間(ISO8601格式:yyyy-MM-ddTHH:mm)
ScheduleArrivalTime string `json:"ScheduleArrivalTime,omitempty"`
+ // String
+ //
// 航廈
Terminal string `json:"Terminal,omitempty"`
@@ -98,8 +126,8 @@ type ServiceDTOVersion2AviationFIDSArrival struct {
UpdateTime *string `json:"UpdateTime"`
}
-// Validate validates this service d t o version2 aviation f ID s arrival
-func (m *ServiceDTOVersion2AviationFIDSArrival) Validate(formats strfmt.Registry) error {
+// Validate validates this p t x service d t o air specification v2 f ID s arrival
+func (m *PTXServiceDTOAirSpecificationV2FIDSArrival) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateAirlineID(formats); err != nil {
@@ -132,7 +160,7 @@ func (m *ServiceDTOVersion2AviationFIDSArrival) Validate(formats strfmt.Registry
return nil
}
-func (m *ServiceDTOVersion2AviationFIDSArrival) validateAirlineID(formats strfmt.Registry) error {
+func (m *PTXServiceDTOAirSpecificationV2FIDSArrival) validateAirlineID(formats strfmt.Registry) error {
if err := validate.Required("AirlineID", "body", m.AirlineID); err != nil {
return err
@@ -141,7 +169,7 @@ func (m *ServiceDTOVersion2AviationFIDSArrival) validateAirlineID(formats strfmt
return nil
}
-func (m *ServiceDTOVersion2AviationFIDSArrival) validateArrivalAirportID(formats strfmt.Registry) error {
+func (m *PTXServiceDTOAirSpecificationV2FIDSArrival) validateArrivalAirportID(formats strfmt.Registry) error {
if err := validate.Required("ArrivalAirportID", "body", m.ArrivalAirportID); err != nil {
return err
@@ -150,7 +178,7 @@ func (m *ServiceDTOVersion2AviationFIDSArrival) validateArrivalAirportID(formats
return nil
}
-func (m *ServiceDTOVersion2AviationFIDSArrival) validateDepartureAirportID(formats strfmt.Registry) error {
+func (m *PTXServiceDTOAirSpecificationV2FIDSArrival) validateDepartureAirportID(formats strfmt.Registry) error {
if err := validate.Required("DepartureAirportID", "body", m.DepartureAirportID); err != nil {
return err
@@ -159,7 +187,7 @@ func (m *ServiceDTOVersion2AviationFIDSArrival) validateDepartureAirportID(forma
return nil
}
-func (m *ServiceDTOVersion2AviationFIDSArrival) validateFlightDate(formats strfmt.Registry) error {
+func (m *PTXServiceDTOAirSpecificationV2FIDSArrival) validateFlightDate(formats strfmt.Registry) error {
if err := validate.Required("FlightDate", "body", m.FlightDate); err != nil {
return err
@@ -168,7 +196,7 @@ func (m *ServiceDTOVersion2AviationFIDSArrival) validateFlightDate(formats strfm
return nil
}
-func (m *ServiceDTOVersion2AviationFIDSArrival) validateFlightNumber(formats strfmt.Registry) error {
+func (m *PTXServiceDTOAirSpecificationV2FIDSArrival) validateFlightNumber(formats strfmt.Registry) error {
if err := validate.Required("FlightNumber", "body", m.FlightNumber); err != nil {
return err
@@ -177,7 +205,7 @@ func (m *ServiceDTOVersion2AviationFIDSArrival) validateFlightNumber(formats str
return nil
}
-func (m *ServiceDTOVersion2AviationFIDSArrival) validateUpdateTime(formats strfmt.Registry) error {
+func (m *PTXServiceDTOAirSpecificationV2FIDSArrival) validateUpdateTime(formats strfmt.Registry) error {
if err := validate.Required("UpdateTime", "body", m.UpdateTime); err != nil {
return err
@@ -187,7 +215,7 @@ func (m *ServiceDTOVersion2AviationFIDSArrival) validateUpdateTime(formats strfm
}
// MarshalBinary interface implementation
-func (m *ServiceDTOVersion2AviationFIDSArrival) MarshalBinary() ([]byte, error) {
+func (m *PTXServiceDTOAirSpecificationV2FIDSArrival) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
@@ -195,8 +223,8 @@ func (m *ServiceDTOVersion2AviationFIDSArrival) MarshalBinary() ([]byte, error)
}
// UnmarshalBinary interface implementation
-func (m *ServiceDTOVersion2AviationFIDSArrival) UnmarshalBinary(b []byte) error {
- var res ServiceDTOVersion2AviationFIDSArrival
+func (m *PTXServiceDTOAirSpecificationV2FIDSArrival) UnmarshalBinary(b []byte) error {
+ var res PTXServiceDTOAirSpecificationV2FIDSArrival
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
diff --git a/air/v2/models/service_d_t_o_version2_aviation_f_id_s_departure.go b/air/v2/models/p_t_x_service_d_t_o_air_specification_v2_f_id_s_departure.go
similarity index 74%
rename from air/v2/models/service_d_t_o_version2_aviation_f_id_s_departure.go
rename to air/v2/models/p_t_x_service_d_t_o_air_specification_v2_f_id_s_departure.go
index 36a1119f..cd16d726 100644
--- a/air/v2/models/service_d_t_o_version2_aviation_f_id_s_departure.go
+++ b/air/v2/models/p_t_x_service_d_t_o_air_specification_v2_f_id_s_departure.go
@@ -12,13 +12,15 @@ import (
"github.com/go-openapi/validate"
)
-// ServiceDTOVersion2AviationFIDSDeparture FIDSDeparture
+// PTXServiceDTOAirSpecificationV2FIDSDeparture FIDSDeparture
//
// 出發航班顯示資料
//
-// swagger:model Service.DTO.Version2.Aviation.FIDSDeparture
-type ServiceDTOVersion2AviationFIDSDeparture struct {
+// swagger:model PTX.Service.DTO.Air.Specification.V2.FIDSDeparture
+type PTXServiceDTOAirSpecificationV2FIDSDeparture struct {
+ // String
+ //
// 航空器型號
AcType string `json:"AcType,omitempty"`
@@ -32,33 +34,51 @@ type ServiceDTOVersion2AviationFIDSDeparture struct {
// 航線種類(目前民航局與桃機的FIDS系統都尚未提供此欄位資料) : [-2:'特殊',1:'國際',2:'國內',3:'兩岸',4:'國際包機',5:'國內包機',6:'兩岸包機']
AirRouteType int32 `json:"AirRouteType,omitempty"`
+ // String
+ //
// 航空公司IATA國際代碼
// Required: true
AirlineID *string `json:"AirlineID"`
+ // String
+ //
// 停機坪(僅貨機提供)
Apron string `json:"Apron,omitempty"`
+ // String
+ //
// 目的地機場IATA國際代碼
// Required: true
ArrivalAirportID *string `json:"ArrivalAirportID"`
+ // String
+ //
// 行李轉盤(到站FIDS可能有「行李轉盤」資訊, 離站FIDS不會有, 貨機則無此資訊)
BaggageClaim string `json:"BaggageClaim,omitempty"`
+ // String
+ //
// 報到櫃檯(離站FIDS可能有「報到櫃台」資訊, 到站FIDS不會有, 貨機則無此資訊)
CheckCounter string `json:"CheckCounter,omitempty"`
+ // String
+ //
// 航班共用班號
CodeShare string `json:"CodeShare,omitempty"`
+ // String
+ //
// 起點機場IATA國際代碼
// Required: true
DepartureAirportID *string `json:"DepartureAirportID"`
+ // String
+ //
// 航班屬性狀態, ,為該機場觀點的狀態
DepartureRemark string `json:"DepartureRemark,omitempty"`
+ // String
+ //
// 航班屬性狀態(英文)
DepartureRemarkEn string `json:"DepartureRemarkEn,omitempty"`
@@ -73,13 +93,19 @@ type ServiceDTOVersion2AviationFIDSDeparture struct {
// Required: true
FlightDate *string `json:"FlightDate"`
+ // String
+ //
// 航機班號(不包含航空公司的AirlineID,僅有班號數字)
// Required: true
FlightNumber *string `json:"FlightNumber"`
+ // String
+ //
// 登機門(僅客機提供)
Gate string `json:"Gate,omitempty"`
+ // Boolean
+ //
// 是否為貨機
IsCargo bool `json:"IsCargo,omitempty"`
@@ -88,6 +114,8 @@ type ServiceDTOVersion2AviationFIDSDeparture struct {
// 表訂出發時間(ISO8601格式:yyyy-MM-ddTHH:mm)
ScheduleDepartureTime string `json:"ScheduleDepartureTime,omitempty"`
+ // String
+ //
// 航廈
Terminal string `json:"Terminal,omitempty"`
@@ -98,8 +126,8 @@ type ServiceDTOVersion2AviationFIDSDeparture struct {
UpdateTime *string `json:"UpdateTime"`
}
-// Validate validates this service d t o version2 aviation f ID s departure
-func (m *ServiceDTOVersion2AviationFIDSDeparture) Validate(formats strfmt.Registry) error {
+// Validate validates this p t x service d t o air specification v2 f ID s departure
+func (m *PTXServiceDTOAirSpecificationV2FIDSDeparture) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateAirlineID(formats); err != nil {
@@ -132,7 +160,7 @@ func (m *ServiceDTOVersion2AviationFIDSDeparture) Validate(formats strfmt.Regist
return nil
}
-func (m *ServiceDTOVersion2AviationFIDSDeparture) validateAirlineID(formats strfmt.Registry) error {
+func (m *PTXServiceDTOAirSpecificationV2FIDSDeparture) validateAirlineID(formats strfmt.Registry) error {
if err := validate.Required("AirlineID", "body", m.AirlineID); err != nil {
return err
@@ -141,7 +169,7 @@ func (m *ServiceDTOVersion2AviationFIDSDeparture) validateAirlineID(formats strf
return nil
}
-func (m *ServiceDTOVersion2AviationFIDSDeparture) validateArrivalAirportID(formats strfmt.Registry) error {
+func (m *PTXServiceDTOAirSpecificationV2FIDSDeparture) validateArrivalAirportID(formats strfmt.Registry) error {
if err := validate.Required("ArrivalAirportID", "body", m.ArrivalAirportID); err != nil {
return err
@@ -150,7 +178,7 @@ func (m *ServiceDTOVersion2AviationFIDSDeparture) validateArrivalAirportID(forma
return nil
}
-func (m *ServiceDTOVersion2AviationFIDSDeparture) validateDepartureAirportID(formats strfmt.Registry) error {
+func (m *PTXServiceDTOAirSpecificationV2FIDSDeparture) validateDepartureAirportID(formats strfmt.Registry) error {
if err := validate.Required("DepartureAirportID", "body", m.DepartureAirportID); err != nil {
return err
@@ -159,7 +187,7 @@ func (m *ServiceDTOVersion2AviationFIDSDeparture) validateDepartureAirportID(for
return nil
}
-func (m *ServiceDTOVersion2AviationFIDSDeparture) validateFlightDate(formats strfmt.Registry) error {
+func (m *PTXServiceDTOAirSpecificationV2FIDSDeparture) validateFlightDate(formats strfmt.Registry) error {
if err := validate.Required("FlightDate", "body", m.FlightDate); err != nil {
return err
@@ -168,7 +196,7 @@ func (m *ServiceDTOVersion2AviationFIDSDeparture) validateFlightDate(formats str
return nil
}
-func (m *ServiceDTOVersion2AviationFIDSDeparture) validateFlightNumber(formats strfmt.Registry) error {
+func (m *PTXServiceDTOAirSpecificationV2FIDSDeparture) validateFlightNumber(formats strfmt.Registry) error {
if err := validate.Required("FlightNumber", "body", m.FlightNumber); err != nil {
return err
@@ -177,7 +205,7 @@ func (m *ServiceDTOVersion2AviationFIDSDeparture) validateFlightNumber(formats s
return nil
}
-func (m *ServiceDTOVersion2AviationFIDSDeparture) validateUpdateTime(formats strfmt.Registry) error {
+func (m *PTXServiceDTOAirSpecificationV2FIDSDeparture) validateUpdateTime(formats strfmt.Registry) error {
if err := validate.Required("UpdateTime", "body", m.UpdateTime); err != nil {
return err
@@ -187,7 +215,7 @@ func (m *ServiceDTOVersion2AviationFIDSDeparture) validateUpdateTime(formats str
}
// MarshalBinary interface implementation
-func (m *ServiceDTOVersion2AviationFIDSDeparture) MarshalBinary() ([]byte, error) {
+func (m *PTXServiceDTOAirSpecificationV2FIDSDeparture) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
@@ -195,8 +223,8 @@ func (m *ServiceDTOVersion2AviationFIDSDeparture) MarshalBinary() ([]byte, error
}
// UnmarshalBinary interface implementation
-func (m *ServiceDTOVersion2AviationFIDSDeparture) UnmarshalBinary(b []byte) error {
- var res ServiceDTOVersion2AviationFIDSDeparture
+func (m *PTXServiceDTOAirSpecificationV2FIDSDeparture) UnmarshalBinary(b []byte) error {
+ var res PTXServiceDTOAirSpecificationV2FIDSDeparture
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
diff --git a/air/v2/models/service_d_t_o_version2_aviation_general_flight_schedule.go b/air/v2/models/p_t_x_service_d_t_o_air_specification_v2_general_flight_schedule.go
similarity index 68%
rename from air/v2/models/service_d_t_o_version2_aviation_general_flight_schedule.go
rename to air/v2/models/p_t_x_service_d_t_o_air_specification_v2_general_flight_schedule.go
index 7a7fdbfb..eaafd1eb 100644
--- a/air/v2/models/service_d_t_o_version2_aviation_general_flight_schedule.go
+++ b/air/v2/models/p_t_x_service_d_t_o_air_specification_v2_general_flight_schedule.go
@@ -14,48 +14,68 @@ import (
"github.com/go-openapi/validate"
)
-// ServiceDTOVersion2AviationGeneralFlightSchedule GeneralFlightSchedule
+// PTXServiceDTOAirSpecificationV2GeneralFlightSchedule GeneralFlightSchedule
//
// 航空定期時刻表資料
//
-// swagger:model Service.DTO.Version2.Aviation.GeneralFlightSchedule
-type ServiceDTOVersion2AviationGeneralFlightSchedule struct {
+// swagger:model PTX.Service.DTO.Air.Specification.V2.GeneralFlightSchedule
+type PTXServiceDTOAirSpecificationV2GeneralFlightSchedule struct {
+ // String
+ //
// 航空公司IATA國際代碼
// Required: true
AirlineID *string `json:"AirlineID"`
+ // String
+ //
// 目的地機場IATA國際代碼
// Required: true
ArrivalAirportID *string `json:"ArrivalAirportID"`
+ // String
+ //
// 終點機場抵達時間 (格式: HH:mm 當地時間,跨日以+1 表示)
// Required: true
ArrivalTime *string `json:"ArrivalTime"`
+ // Array
+ //
// 共用班號
- CodeShare []*ServiceDTOVersion2AviationCodeShare `json:"CodeShare"`
+ CodeShare []*PTXServiceDTOAirSpecificationV2CodeShare `json:"CodeShare"`
+ // String
+ //
// 起點機場IATA國際代碼
// Required: true
DepartureAirportID *string `json:"DepartureAirportID"`
+ // String
+ //
// 起點機場出發時間 (格式: HH:mm 當地時間,跨日以+1 表示)
// Required: true
DepartureTime *string `json:"DepartureTime"`
+ // String
+ //
// 班機號碼(包含航空公司的AirlineID,結構為AirlineID加上3~4碼航機班號數字;若班號僅有兩碼,其結構會加上0補足三碼,"AirlineID + 0 + 兩碼班號")
// Required: true
FlightNumber *string `json:"FlightNumber"`
+ // Boolean
+ //
// 週五飛行與否
// Required: true
Friday *bool `json:"Friday"`
+ // Boolean
+ //
// 週一飛行與否
// Required: true
Monday *bool `json:"Monday"`
+ // Boolean
+ //
// 週六飛行與否
// Required: true
Saturday *bool `json:"Saturday"`
@@ -72,17 +92,25 @@ type ServiceDTOVersion2AviationGeneralFlightSchedule struct {
// Required: true
ScheduleStartDate *string `json:"ScheduleStartDate"`
+ // Boolean
+ //
// 週日飛行與否
// Required: true
Sunday *bool `json:"Sunday"`
+ // String
+ //
// 航廈
Terminal string `json:"Terminal,omitempty"`
+ // Boolean
+ //
// 週四飛行與否
// Required: true
Thursday *bool `json:"Thursday"`
+ // Boolean
+ //
// 週二飛行與否
// Required: true
Tuesday *bool `json:"Tuesday"`
@@ -93,17 +121,21 @@ type ServiceDTOVersion2AviationGeneralFlightSchedule struct {
// Required: true
UpdateTime *string `json:"UpdateTime"`
+ // Int32
+ //
// 資料版本編號
// Required: true
VersionID *int32 `json:"VersionID"`
+ // Boolean
+ //
// 週三飛行與否
// Required: true
Wednesday *bool `json:"Wednesday"`
}
-// Validate validates this service d t o version2 aviation general flight schedule
-func (m *ServiceDTOVersion2AviationGeneralFlightSchedule) Validate(formats strfmt.Registry) error {
+// Validate validates this p t x service d t o air specification v2 general flight schedule
+func (m *PTXServiceDTOAirSpecificationV2GeneralFlightSchedule) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateAirlineID(formats); err != nil {
@@ -184,7 +216,7 @@ func (m *ServiceDTOVersion2AviationGeneralFlightSchedule) Validate(formats strfm
return nil
}
-func (m *ServiceDTOVersion2AviationGeneralFlightSchedule) validateAirlineID(formats strfmt.Registry) error {
+func (m *PTXServiceDTOAirSpecificationV2GeneralFlightSchedule) validateAirlineID(formats strfmt.Registry) error {
if err := validate.Required("AirlineID", "body", m.AirlineID); err != nil {
return err
@@ -193,7 +225,7 @@ func (m *ServiceDTOVersion2AviationGeneralFlightSchedule) validateAirlineID(form
return nil
}
-func (m *ServiceDTOVersion2AviationGeneralFlightSchedule) validateArrivalAirportID(formats strfmt.Registry) error {
+func (m *PTXServiceDTOAirSpecificationV2GeneralFlightSchedule) validateArrivalAirportID(formats strfmt.Registry) error {
if err := validate.Required("ArrivalAirportID", "body", m.ArrivalAirportID); err != nil {
return err
@@ -202,7 +234,7 @@ func (m *ServiceDTOVersion2AviationGeneralFlightSchedule) validateArrivalAirport
return nil
}
-func (m *ServiceDTOVersion2AviationGeneralFlightSchedule) validateArrivalTime(formats strfmt.Registry) error {
+func (m *PTXServiceDTOAirSpecificationV2GeneralFlightSchedule) validateArrivalTime(formats strfmt.Registry) error {
if err := validate.Required("ArrivalTime", "body", m.ArrivalTime); err != nil {
return err
@@ -211,7 +243,7 @@ func (m *ServiceDTOVersion2AviationGeneralFlightSchedule) validateArrivalTime(fo
return nil
}
-func (m *ServiceDTOVersion2AviationGeneralFlightSchedule) validateCodeShare(formats strfmt.Registry) error {
+func (m *PTXServiceDTOAirSpecificationV2GeneralFlightSchedule) validateCodeShare(formats strfmt.Registry) error {
if swag.IsZero(m.CodeShare) { // not required
return nil
@@ -236,7 +268,7 @@ func (m *ServiceDTOVersion2AviationGeneralFlightSchedule) validateCodeShare(form
return nil
}
-func (m *ServiceDTOVersion2AviationGeneralFlightSchedule) validateDepartureAirportID(formats strfmt.Registry) error {
+func (m *PTXServiceDTOAirSpecificationV2GeneralFlightSchedule) validateDepartureAirportID(formats strfmt.Registry) error {
if err := validate.Required("DepartureAirportID", "body", m.DepartureAirportID); err != nil {
return err
@@ -245,7 +277,7 @@ func (m *ServiceDTOVersion2AviationGeneralFlightSchedule) validateDepartureAirpo
return nil
}
-func (m *ServiceDTOVersion2AviationGeneralFlightSchedule) validateDepartureTime(formats strfmt.Registry) error {
+func (m *PTXServiceDTOAirSpecificationV2GeneralFlightSchedule) validateDepartureTime(formats strfmt.Registry) error {
if err := validate.Required("DepartureTime", "body", m.DepartureTime); err != nil {
return err
@@ -254,7 +286,7 @@ func (m *ServiceDTOVersion2AviationGeneralFlightSchedule) validateDepartureTime(
return nil
}
-func (m *ServiceDTOVersion2AviationGeneralFlightSchedule) validateFlightNumber(formats strfmt.Registry) error {
+func (m *PTXServiceDTOAirSpecificationV2GeneralFlightSchedule) validateFlightNumber(formats strfmt.Registry) error {
if err := validate.Required("FlightNumber", "body", m.FlightNumber); err != nil {
return err
@@ -263,7 +295,7 @@ func (m *ServiceDTOVersion2AviationGeneralFlightSchedule) validateFlightNumber(f
return nil
}
-func (m *ServiceDTOVersion2AviationGeneralFlightSchedule) validateFriday(formats strfmt.Registry) error {
+func (m *PTXServiceDTOAirSpecificationV2GeneralFlightSchedule) validateFriday(formats strfmt.Registry) error {
if err := validate.Required("Friday", "body", m.Friday); err != nil {
return err
@@ -272,7 +304,7 @@ func (m *ServiceDTOVersion2AviationGeneralFlightSchedule) validateFriday(formats
return nil
}
-func (m *ServiceDTOVersion2AviationGeneralFlightSchedule) validateMonday(formats strfmt.Registry) error {
+func (m *PTXServiceDTOAirSpecificationV2GeneralFlightSchedule) validateMonday(formats strfmt.Registry) error {
if err := validate.Required("Monday", "body", m.Monday); err != nil {
return err
@@ -281,7 +313,7 @@ func (m *ServiceDTOVersion2AviationGeneralFlightSchedule) validateMonday(formats
return nil
}
-func (m *ServiceDTOVersion2AviationGeneralFlightSchedule) validateSaturday(formats strfmt.Registry) error {
+func (m *PTXServiceDTOAirSpecificationV2GeneralFlightSchedule) validateSaturday(formats strfmt.Registry) error {
if err := validate.Required("Saturday", "body", m.Saturday); err != nil {
return err
@@ -290,7 +322,7 @@ func (m *ServiceDTOVersion2AviationGeneralFlightSchedule) validateSaturday(forma
return nil
}
-func (m *ServiceDTOVersion2AviationGeneralFlightSchedule) validateScheduleEndDate(formats strfmt.Registry) error {
+func (m *PTXServiceDTOAirSpecificationV2GeneralFlightSchedule) validateScheduleEndDate(formats strfmt.Registry) error {
if err := validate.Required("ScheduleEndDate", "body", m.ScheduleEndDate); err != nil {
return err
@@ -299,7 +331,7 @@ func (m *ServiceDTOVersion2AviationGeneralFlightSchedule) validateScheduleEndDat
return nil
}
-func (m *ServiceDTOVersion2AviationGeneralFlightSchedule) validateScheduleStartDate(formats strfmt.Registry) error {
+func (m *PTXServiceDTOAirSpecificationV2GeneralFlightSchedule) validateScheduleStartDate(formats strfmt.Registry) error {
if err := validate.Required("ScheduleStartDate", "body", m.ScheduleStartDate); err != nil {
return err
@@ -308,7 +340,7 @@ func (m *ServiceDTOVersion2AviationGeneralFlightSchedule) validateScheduleStartD
return nil
}
-func (m *ServiceDTOVersion2AviationGeneralFlightSchedule) validateSunday(formats strfmt.Registry) error {
+func (m *PTXServiceDTOAirSpecificationV2GeneralFlightSchedule) validateSunday(formats strfmt.Registry) error {
if err := validate.Required("Sunday", "body", m.Sunday); err != nil {
return err
@@ -317,7 +349,7 @@ func (m *ServiceDTOVersion2AviationGeneralFlightSchedule) validateSunday(formats
return nil
}
-func (m *ServiceDTOVersion2AviationGeneralFlightSchedule) validateThursday(formats strfmt.Registry) error {
+func (m *PTXServiceDTOAirSpecificationV2GeneralFlightSchedule) validateThursday(formats strfmt.Registry) error {
if err := validate.Required("Thursday", "body", m.Thursday); err != nil {
return err
@@ -326,7 +358,7 @@ func (m *ServiceDTOVersion2AviationGeneralFlightSchedule) validateThursday(forma
return nil
}
-func (m *ServiceDTOVersion2AviationGeneralFlightSchedule) validateTuesday(formats strfmt.Registry) error {
+func (m *PTXServiceDTOAirSpecificationV2GeneralFlightSchedule) validateTuesday(formats strfmt.Registry) error {
if err := validate.Required("Tuesday", "body", m.Tuesday); err != nil {
return err
@@ -335,7 +367,7 @@ func (m *ServiceDTOVersion2AviationGeneralFlightSchedule) validateTuesday(format
return nil
}
-func (m *ServiceDTOVersion2AviationGeneralFlightSchedule) validateUpdateTime(formats strfmt.Registry) error {
+func (m *PTXServiceDTOAirSpecificationV2GeneralFlightSchedule) validateUpdateTime(formats strfmt.Registry) error {
if err := validate.Required("UpdateTime", "body", m.UpdateTime); err != nil {
return err
@@ -344,7 +376,7 @@ func (m *ServiceDTOVersion2AviationGeneralFlightSchedule) validateUpdateTime(for
return nil
}
-func (m *ServiceDTOVersion2AviationGeneralFlightSchedule) validateVersionID(formats strfmt.Registry) error {
+func (m *PTXServiceDTOAirSpecificationV2GeneralFlightSchedule) validateVersionID(formats strfmt.Registry) error {
if err := validate.Required("VersionID", "body", m.VersionID); err != nil {
return err
@@ -353,7 +385,7 @@ func (m *ServiceDTOVersion2AviationGeneralFlightSchedule) validateVersionID(form
return nil
}
-func (m *ServiceDTOVersion2AviationGeneralFlightSchedule) validateWednesday(formats strfmt.Registry) error {
+func (m *PTXServiceDTOAirSpecificationV2GeneralFlightSchedule) validateWednesday(formats strfmt.Registry) error {
if err := validate.Required("Wednesday", "body", m.Wednesday); err != nil {
return err
@@ -363,7 +395,7 @@ func (m *ServiceDTOVersion2AviationGeneralFlightSchedule) validateWednesday(form
}
// MarshalBinary interface implementation
-func (m *ServiceDTOVersion2AviationGeneralFlightSchedule) MarshalBinary() ([]byte, error) {
+func (m *PTXServiceDTOAirSpecificationV2GeneralFlightSchedule) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
@@ -371,8 +403,8 @@ func (m *ServiceDTOVersion2AviationGeneralFlightSchedule) MarshalBinary() ([]byt
}
// UnmarshalBinary interface implementation
-func (m *ServiceDTOVersion2AviationGeneralFlightSchedule) UnmarshalBinary(b []byte) error {
- var res ServiceDTOVersion2AviationGeneralFlightSchedule
+func (m *PTXServiceDTOAirSpecificationV2GeneralFlightSchedule) UnmarshalBinary(b []byte) error {
+ var res PTXServiceDTOAirSpecificationV2GeneralFlightSchedule
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
diff --git a/air/v2/models/service_d_t_o_version2_application_m_e_t_a_r.go b/air/v2/models/p_t_x_service_d_t_o_air_specification_v2_m_e_t_a_r.go
similarity index 56%
rename from air/v2/models/service_d_t_o_version2_application_m_e_t_a_r.go
rename to air/v2/models/p_t_x_service_d_t_o_air_specification_v2_m_e_t_a_r.go
index e33b7523..3c4a4ac8 100644
--- a/air/v2/models/service_d_t_o_version2_application_m_e_t_a_r.go
+++ b/air/v2/models/p_t_x_service_d_t_o_air_specification_v2_m_e_t_a_r.go
@@ -12,11 +12,13 @@ import (
"github.com/go-openapi/validate"
)
-// ServiceDTOVersion2ApplicationMETAR METAR
+// PTXServiceDTOAirSpecificationV2METAR METAR
//
-// swagger:model Service.DTO.Version2.Application.METAR
-type ServiceDTOVersion2ApplicationMETAR struct {
+// swagger:model PTX.Service.DTO.Air.Specification.V2.METAR
+type PTXServiceDTOAirSpecificationV2METAR struct {
+ // String
+ //
// 機場代碼(IATA)
// Required: true
AirportID *string `json:"AirportID"`
@@ -25,8 +27,12 @@ type ServiceDTOVersion2ApplicationMETAR struct {
//
// 機場名稱
// Required: true
- AirportName *ServiceDTOVersion2BaseNameType `json:"AirportName"`
+ AirportName struct {
+ PTXServiceDTOSharedSpecificationV2BaseNameType
+ } `json:"AirportName"`
+ // String
+ //
// 雲冪(含單位)
// Required: true
Ceiling *string `json:"Ceiling"`
@@ -35,18 +41,26 @@ type ServiceDTOVersion2ApplicationMETAR struct {
//
// 機場所屬城市
// Required: true
- CityName *ServiceDTOVersion2BaseNameType `json:"CityName"`
+ CityName struct {
+ PTXServiceDTOSharedSpecificationV2BaseNameType
+ } `json:"CityName"`
// NameType
//
// 國家名稱
// Required: true
- CountryName *ServiceDTOVersion2BaseNameType `json:"CountryName"`
+ CountryName struct {
+ PTXServiceDTOSharedSpecificationV2BaseNameType
+ } `json:"CountryName"`
+ // String
+ //
// 機場天氣報告(METAR/SPECI)
// Required: true
MetarText *string `json:"MetarText"`
+ // String
+ //
// 機場天氣報告時間(地方時)
// Required: true
MetarTime *string `json:"MetarTime"`
@@ -57,6 +71,8 @@ type ServiceDTOVersion2ApplicationMETAR struct {
// Required: true
ObservationTime *string `json:"ObservationTime"`
+ // String
+ //
// 機場氣象觀測站代碼(ICAO)
// Required: true
StationID *string `json:"StationID"`
@@ -65,8 +81,12 @@ type ServiceDTOVersion2ApplicationMETAR struct {
//
// 機場氣象觀測站座標
// Required: true
- StationPosition *ServiceDTOVersion2BasePointType `json:"StationPosition"`
+ StationPosition struct {
+ PTXServiceDTOSharedSpecificationV2BasePointType
+ } `json:"StationPosition"`
+ // String
+ //
// 溫度(含單位)
// Required: true
Temperature *string `json:"Temperature"`
@@ -77,6 +97,8 @@ type ServiceDTOVersion2ApplicationMETAR struct {
// Required: true
UpdateTime *string `json:"UpdateTime"`
+ // String
+ //
// 盛行能見度(含單位,9999以10公里以上表示)
// Required: true
Visibility *string `json:"Visibility"`
@@ -85,19 +107,25 @@ type ServiceDTOVersion2ApplicationMETAR struct {
//
// 天氣描述
// Required: true
- WeatherDescription *ServiceDTOVersion2BaseNameType `json:"WeatherDescription"`
+ WeatherDescription struct {
+ PTXServiceDTOSharedSpecificationV2BaseNameType
+ } `json:"WeatherDescription"`
+ // String
+ //
// 風向(含單位)
// Required: true
WindDirection *string `json:"WindDirection"`
+ // String
+ //
// 風速(含單位)
// Required: true
WindSpeed *string `json:"WindSpeed"`
}
-// Validate validates this service d t o version2 application m e t a r
-func (m *ServiceDTOVersion2ApplicationMETAR) Validate(formats strfmt.Registry) error {
+// Validate validates this p t x service d t o air specification v2 m e t a r
+func (m *PTXServiceDTOAirSpecificationV2METAR) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateAirportID(formats); err != nil {
@@ -170,7 +198,7 @@ func (m *ServiceDTOVersion2ApplicationMETAR) Validate(formats strfmt.Registry) e
return nil
}
-func (m *ServiceDTOVersion2ApplicationMETAR) validateAirportID(formats strfmt.Registry) error {
+func (m *PTXServiceDTOAirSpecificationV2METAR) validateAirportID(formats strfmt.Registry) error {
if err := validate.Required("AirportID", "body", m.AirportID); err != nil {
return err
@@ -179,25 +207,12 @@ func (m *ServiceDTOVersion2ApplicationMETAR) validateAirportID(formats strfmt.Re
return nil
}
-func (m *ServiceDTOVersion2ApplicationMETAR) validateAirportName(formats strfmt.Registry) error {
-
- if err := validate.Required("AirportName", "body", m.AirportName); err != nil {
- return err
- }
-
- if m.AirportName != nil {
- if err := m.AirportName.Validate(formats); err != nil {
- if ve, ok := err.(*errors.Validation); ok {
- return ve.ValidateName("AirportName")
- }
- return err
- }
- }
+func (m *PTXServiceDTOAirSpecificationV2METAR) validateAirportName(formats strfmt.Registry) error {
return nil
}
-func (m *ServiceDTOVersion2ApplicationMETAR) validateCeiling(formats strfmt.Registry) error {
+func (m *PTXServiceDTOAirSpecificationV2METAR) validateCeiling(formats strfmt.Registry) error {
if err := validate.Required("Ceiling", "body", m.Ceiling); err != nil {
return err
@@ -206,43 +221,17 @@ func (m *ServiceDTOVersion2ApplicationMETAR) validateCeiling(formats strfmt.Regi
return nil
}
-func (m *ServiceDTOVersion2ApplicationMETAR) validateCityName(formats strfmt.Registry) error {
-
- if err := validate.Required("CityName", "body", m.CityName); err != nil {
- return err
- }
-
- if m.CityName != nil {
- if err := m.CityName.Validate(formats); err != nil {
- if ve, ok := err.(*errors.Validation); ok {
- return ve.ValidateName("CityName")
- }
- return err
- }
- }
+func (m *PTXServiceDTOAirSpecificationV2METAR) validateCityName(formats strfmt.Registry) error {
return nil
}
-func (m *ServiceDTOVersion2ApplicationMETAR) validateCountryName(formats strfmt.Registry) error {
-
- if err := validate.Required("CountryName", "body", m.CountryName); err != nil {
- return err
- }
-
- if m.CountryName != nil {
- if err := m.CountryName.Validate(formats); err != nil {
- if ve, ok := err.(*errors.Validation); ok {
- return ve.ValidateName("CountryName")
- }
- return err
- }
- }
+func (m *PTXServiceDTOAirSpecificationV2METAR) validateCountryName(formats strfmt.Registry) error {
return nil
}
-func (m *ServiceDTOVersion2ApplicationMETAR) validateMetarText(formats strfmt.Registry) error {
+func (m *PTXServiceDTOAirSpecificationV2METAR) validateMetarText(formats strfmt.Registry) error {
if err := validate.Required("MetarText", "body", m.MetarText); err != nil {
return err
@@ -251,7 +240,7 @@ func (m *ServiceDTOVersion2ApplicationMETAR) validateMetarText(formats strfmt.Re
return nil
}
-func (m *ServiceDTOVersion2ApplicationMETAR) validateMetarTime(formats strfmt.Registry) error {
+func (m *PTXServiceDTOAirSpecificationV2METAR) validateMetarTime(formats strfmt.Registry) error {
if err := validate.Required("MetarTime", "body", m.MetarTime); err != nil {
return err
@@ -260,7 +249,7 @@ func (m *ServiceDTOVersion2ApplicationMETAR) validateMetarTime(formats strfmt.Re
return nil
}
-func (m *ServiceDTOVersion2ApplicationMETAR) validateObservationTime(formats strfmt.Registry) error {
+func (m *PTXServiceDTOAirSpecificationV2METAR) validateObservationTime(formats strfmt.Registry) error {
if err := validate.Required("ObservationTime", "body", m.ObservationTime); err != nil {
return err
@@ -269,7 +258,7 @@ func (m *ServiceDTOVersion2ApplicationMETAR) validateObservationTime(formats str
return nil
}
-func (m *ServiceDTOVersion2ApplicationMETAR) validateStationID(formats strfmt.Registry) error {
+func (m *PTXServiceDTOAirSpecificationV2METAR) validateStationID(formats strfmt.Registry) error {
if err := validate.Required("StationID", "body", m.StationID); err != nil {
return err
@@ -278,25 +267,12 @@ func (m *ServiceDTOVersion2ApplicationMETAR) validateStationID(formats strfmt.Re
return nil
}
-func (m *ServiceDTOVersion2ApplicationMETAR) validateStationPosition(formats strfmt.Registry) error {
-
- if err := validate.Required("StationPosition", "body", m.StationPosition); err != nil {
- return err
- }
-
- if m.StationPosition != nil {
- if err := m.StationPosition.Validate(formats); err != nil {
- if ve, ok := err.(*errors.Validation); ok {
- return ve.ValidateName("StationPosition")
- }
- return err
- }
- }
+func (m *PTXServiceDTOAirSpecificationV2METAR) validateStationPosition(formats strfmt.Registry) error {
return nil
}
-func (m *ServiceDTOVersion2ApplicationMETAR) validateTemperature(formats strfmt.Registry) error {
+func (m *PTXServiceDTOAirSpecificationV2METAR) validateTemperature(formats strfmt.Registry) error {
if err := validate.Required("Temperature", "body", m.Temperature); err != nil {
return err
@@ -305,7 +281,7 @@ func (m *ServiceDTOVersion2ApplicationMETAR) validateTemperature(formats strfmt.
return nil
}
-func (m *ServiceDTOVersion2ApplicationMETAR) validateUpdateTime(formats strfmt.Registry) error {
+func (m *PTXServiceDTOAirSpecificationV2METAR) validateUpdateTime(formats strfmt.Registry) error {
if err := validate.Required("UpdateTime", "body", m.UpdateTime); err != nil {
return err
@@ -314,7 +290,7 @@ func (m *ServiceDTOVersion2ApplicationMETAR) validateUpdateTime(formats strfmt.R
return nil
}
-func (m *ServiceDTOVersion2ApplicationMETAR) validateVisibility(formats strfmt.Registry) error {
+func (m *PTXServiceDTOAirSpecificationV2METAR) validateVisibility(formats strfmt.Registry) error {
if err := validate.Required("Visibility", "body", m.Visibility); err != nil {
return err
@@ -323,25 +299,12 @@ func (m *ServiceDTOVersion2ApplicationMETAR) validateVisibility(formats strfmt.R
return nil
}
-func (m *ServiceDTOVersion2ApplicationMETAR) validateWeatherDescription(formats strfmt.Registry) error {
-
- if err := validate.Required("WeatherDescription", "body", m.WeatherDescription); err != nil {
- return err
- }
-
- if m.WeatherDescription != nil {
- if err := m.WeatherDescription.Validate(formats); err != nil {
- if ve, ok := err.(*errors.Validation); ok {
- return ve.ValidateName("WeatherDescription")
- }
- return err
- }
- }
+func (m *PTXServiceDTOAirSpecificationV2METAR) validateWeatherDescription(formats strfmt.Registry) error {
return nil
}
-func (m *ServiceDTOVersion2ApplicationMETAR) validateWindDirection(formats strfmt.Registry) error {
+func (m *PTXServiceDTOAirSpecificationV2METAR) validateWindDirection(formats strfmt.Registry) error {
if err := validate.Required("WindDirection", "body", m.WindDirection); err != nil {
return err
@@ -350,7 +313,7 @@ func (m *ServiceDTOVersion2ApplicationMETAR) validateWindDirection(formats strfm
return nil
}
-func (m *ServiceDTOVersion2ApplicationMETAR) validateWindSpeed(formats strfmt.Registry) error {
+func (m *PTXServiceDTOAirSpecificationV2METAR) validateWindSpeed(formats strfmt.Registry) error {
if err := validate.Required("WindSpeed", "body", m.WindSpeed); err != nil {
return err
@@ -360,7 +323,7 @@ func (m *ServiceDTOVersion2ApplicationMETAR) validateWindSpeed(formats strfmt.Re
}
// MarshalBinary interface implementation
-func (m *ServiceDTOVersion2ApplicationMETAR) MarshalBinary() ([]byte, error) {
+func (m *PTXServiceDTOAirSpecificationV2METAR) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
@@ -368,8 +331,8 @@ func (m *ServiceDTOVersion2ApplicationMETAR) MarshalBinary() ([]byte, error) {
}
// UnmarshalBinary interface implementation
-func (m *ServiceDTOVersion2ApplicationMETAR) UnmarshalBinary(b []byte) error {
- var res ServiceDTOVersion2ApplicationMETAR
+func (m *PTXServiceDTOAirSpecificationV2METAR) UnmarshalBinary(b []byte) error {
+ var res PTXServiceDTOAirSpecificationV2METAR
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
diff --git a/air/v2/models/service_d_t_o_version2_base_name_type.go b/air/v2/models/p_t_x_service_d_t_o_shared_specification_v2_base_name_type.go
similarity index 50%
rename from air/v2/models/service_d_t_o_version2_base_name_type.go
rename to air/v2/models/p_t_x_service_d_t_o_shared_specification_v2_base_name_type.go
index 56abdf5a..ae2f0ea5 100644
--- a/air/v2/models/service_d_t_o_version2_base_name_type.go
+++ b/air/v2/models/p_t_x_service_d_t_o_shared_specification_v2_base_name_type.go
@@ -10,27 +10,31 @@ import (
"github.com/go-openapi/swag"
)
-// ServiceDTOVersion2BaseNameType NameType
+// PTXServiceDTOSharedSpecificationV2BaseNameType NameType
//
// 名稱資料型別
//
-// swagger:model Service.DTO.Version2.Base.NameType
-type ServiceDTOVersion2BaseNameType struct {
+// swagger:model PTX.Service.DTO.Shared.Specification.V2.Base.NameType
+type PTXServiceDTOSharedSpecificationV2BaseNameType struct {
+ // String
+ //
// 英文名稱
En string `json:"En,omitempty"`
+ // String
+ //
// 中文繁體名稱
ZhTw string `json:"Zh_tw,omitempty"`
}
-// Validate validates this service d t o version2 base name type
-func (m *ServiceDTOVersion2BaseNameType) Validate(formats strfmt.Registry) error {
+// Validate validates this p t x service d t o shared specification v2 base name type
+func (m *PTXServiceDTOSharedSpecificationV2BaseNameType) Validate(formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
-func (m *ServiceDTOVersion2BaseNameType) MarshalBinary() ([]byte, error) {
+func (m *PTXServiceDTOSharedSpecificationV2BaseNameType) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
@@ -38,8 +42,8 @@ func (m *ServiceDTOVersion2BaseNameType) MarshalBinary() ([]byte, error) {
}
// UnmarshalBinary interface implementation
-func (m *ServiceDTOVersion2BaseNameType) UnmarshalBinary(b []byte) error {
- var res ServiceDTOVersion2BaseNameType
+func (m *PTXServiceDTOSharedSpecificationV2BaseNameType) UnmarshalBinary(b []byte) error {
+ var res PTXServiceDTOSharedSpecificationV2BaseNameType
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
diff --git a/bike/v2/models/service_d_t_o_version2_base_point_type.go b/air/v2/models/p_t_x_service_d_t_o_shared_specification_v2_base_point_type.go
similarity index 50%
rename from bike/v2/models/service_d_t_o_version2_base_point_type.go
rename to air/v2/models/p_t_x_service_d_t_o_shared_specification_v2_base_point_type.go
index 171a47ea..65354297 100644
--- a/bike/v2/models/service_d_t_o_version2_base_point_type.go
+++ b/air/v2/models/p_t_x_service_d_t_o_shared_specification_v2_base_point_type.go
@@ -10,12 +10,17 @@ import (
"github.com/go-openapi/swag"
)
-// ServiceDTOVersion2BasePointType PointType
+// PTXServiceDTOSharedSpecificationV2BasePointType PointType
//
// 座標資料型別
//
-// swagger:model Service.DTO.Version2.Base.PointType
-type ServiceDTOVersion2BasePointType struct {
+// swagger:model PTX.Service.DTO.Shared.Specification.V2.Base.PointType
+type PTXServiceDTOSharedSpecificationV2BasePointType struct {
+
+ // String
+ //
+ // 位置雜湊
+ GeoHash string `json:"GeoHash,omitempty"`
// 位置緯度(WGS84)
PositionLat float64 `json:"PositionLat,omitempty"`
@@ -24,13 +29,13 @@ type ServiceDTOVersion2BasePointType struct {
PositionLon float64 `json:"PositionLon,omitempty"`
}
-// Validate validates this service d t o version2 base point type
-func (m *ServiceDTOVersion2BasePointType) Validate(formats strfmt.Registry) error {
+// Validate validates this p t x service d t o shared specification v2 base point type
+func (m *PTXServiceDTOSharedSpecificationV2BasePointType) Validate(formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
-func (m *ServiceDTOVersion2BasePointType) MarshalBinary() ([]byte, error) {
+func (m *PTXServiceDTOSharedSpecificationV2BasePointType) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
@@ -38,8 +43,8 @@ func (m *ServiceDTOVersion2BasePointType) MarshalBinary() ([]byte, error) {
}
// UnmarshalBinary interface implementation
-func (m *ServiceDTOVersion2BasePointType) UnmarshalBinary(b []byte) error {
- var res ServiceDTOVersion2BasePointType
+func (m *PTXServiceDTOSharedSpecificationV2BasePointType) UnmarshalBinary(b []byte) error {
+ var res PTXServiceDTOSharedSpecificationV2BasePointType
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
diff --git a/basic/v2/client/basic/basic_api_authority_responses.go b/basic/v2/client/basic/basic_api_authority_responses.go
index ea3842da..784c052f 100644
--- a/basic/v2/client/basic/basic_api_authority_responses.go
+++ b/basic/v2/client/basic/basic_api_authority_responses.go
@@ -31,7 +31,7 @@ func (o *BasicAPIAuthorityReader) ReadResponse(response runtime.ClientResponse,
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/basic/v2/client/basic/basic_api_operator_responses.go b/basic/v2/client/basic/basic_api_operator_responses.go
index 397dfb62..c12ca380 100644
--- a/basic/v2/client/basic/basic_api_operator_responses.go
+++ b/basic/v2/client/basic/basic_api_operator_responses.go
@@ -31,7 +31,7 @@ func (o *BasicAPIOperatorReader) ReadResponse(response runtime.ClientResponse, c
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/basic/v2/client/basic/basic_api_provider_responses.go b/basic/v2/client/basic/basic_api_provider_responses.go
index 5c1b4846..b119bb1f 100644
--- a/basic/v2/client/basic/basic_api_provider_responses.go
+++ b/basic/v2/client/basic/basic_api_provider_responses.go
@@ -31,7 +31,7 @@ func (o *BasicAPIProviderReader) ReadResponse(response runtime.ClientResponse, c
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/basic/v2/client/basic/web_site_api_news_responses.go b/basic/v2/client/basic/web_site_api_news_responses.go
index 8225ac79..687d96ec 100644
--- a/basic/v2/client/basic/web_site_api_news_responses.go
+++ b/basic/v2/client/basic/web_site_api_news_responses.go
@@ -31,7 +31,7 @@ func (o *WebSiteAPINewsReader) ReadResponse(response runtime.ClientResponse, con
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/bike/v2/client/bike/bike_api_availability_responses.go b/bike/v2/client/bike/bike_api_availability_responses.go
index c779cf51..56bd7ed5 100644
--- a/bike/v2/client/bike/bike_api_availability_responses.go
+++ b/bike/v2/client/bike/bike_api_availability_responses.go
@@ -31,7 +31,7 @@ func (o *BikeAPIAvailabilityReader) ReadResponse(response runtime.ClientResponse
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
@@ -42,17 +42,17 @@ func NewBikeAPIAvailabilityOK() *BikeAPIAvailabilityOK {
/*BikeAPIAvailabilityOK handles this case with default header values.
-OK
+Success
*/
type BikeAPIAvailabilityOK struct {
- Payload []*models.ServiceDTOVersion2BikeBikeAvailability
+ Payload []*models.PTXServiceDTOBikeSpecificationV2BikeAvailability
}
func (o *BikeAPIAvailabilityOK) Error() string {
return fmt.Sprintf("[GET /v2/Bike/Availability/{City}][%d] bikeApiAvailabilityOK %+v", 200, o.Payload)
}
-func (o *BikeAPIAvailabilityOK) GetPayload() []*models.ServiceDTOVersion2BikeBikeAvailability {
+func (o *BikeAPIAvailabilityOK) GetPayload() []*models.PTXServiceDTOBikeSpecificationV2BikeAvailability {
return o.Payload
}
diff --git a/bike/v2/client/bike/bike_api_station_responses.go b/bike/v2/client/bike/bike_api_station_responses.go
index f572d396..0e5649ac 100644
--- a/bike/v2/client/bike/bike_api_station_responses.go
+++ b/bike/v2/client/bike/bike_api_station_responses.go
@@ -31,7 +31,7 @@ func (o *BikeAPIStationReader) ReadResponse(response runtime.ClientResponse, con
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
@@ -42,17 +42,17 @@ func NewBikeAPIStationOK() *BikeAPIStationOK {
/*BikeAPIStationOK handles this case with default header values.
-OK
+Success
*/
type BikeAPIStationOK struct {
- Payload []*models.ServiceDTOVersion2BikeBikeStation
+ Payload []*models.PTXServiceDTOBikeSpecificationV2BikeStation
}
func (o *BikeAPIStationOK) Error() string {
return fmt.Sprintf("[GET /v2/Bike/Station/{City}][%d] bikeApiStationOK %+v", 200, o.Payload)
}
-func (o *BikeAPIStationOK) GetPayload() []*models.ServiceDTOVersion2BikeBikeStation {
+func (o *BikeAPIStationOK) GetPayload() []*models.PTXServiceDTOBikeSpecificationV2BikeStation {
return o.Payload
}
diff --git a/bike/v2/client/bike/bike_client.go b/bike/v2/client/bike/bike_client.go
index 8df12763..0eada2b4 100644
--- a/bike/v2/client/bike/bike_client.go
+++ b/bike/v2/client/bike/bike_client.go
@@ -51,7 +51,7 @@ func (a *Client) BikeAPIAvailability(params *BikeAPIAvailabilityParams) (*BikeAP
ID: "BikeApi_Availability",
Method: "GET",
PathPattern: "/v2/Bike/Availability/{City}",
- ProducesMediaTypes: []string{"application/json", "text/json"},
+ ProducesMediaTypes: []string{"application/json", "application/xml"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"https"},
Params: params,
@@ -87,7 +87,7 @@ func (a *Client) BikeAPIStation(params *BikeAPIStationParams) (*BikeAPIStationOK
ID: "BikeApi_Station",
Method: "GET",
PathPattern: "/v2/Bike/Station/{City}",
- ProducesMediaTypes: []string{"application/json", "text/json"},
+ ProducesMediaTypes: []string{"application/json", "application/xml"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"https"},
Params: params,
@@ -123,7 +123,7 @@ func (a *Client) CyclingAPIShape(params *CyclingAPIShapeParams) (*CyclingAPIShap
ID: "CyclingApi_Shape",
Method: "GET",
PathPattern: "/v2/Cycling/Shape/{City}",
- ProducesMediaTypes: []string{"application/json", "text/json"},
+ ProducesMediaTypes: []string{"application/json", "application/xml"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"https"},
Params: params,
diff --git a/bike/v2/client/bike/cycling_api_shape_responses.go b/bike/v2/client/bike/cycling_api_shape_responses.go
index 681fd5d9..ea7ffdda 100644
--- a/bike/v2/client/bike/cycling_api_shape_responses.go
+++ b/bike/v2/client/bike/cycling_api_shape_responses.go
@@ -31,7 +31,7 @@ func (o *CyclingAPIShapeReader) ReadResponse(response runtime.ClientResponse, co
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
@@ -42,17 +42,17 @@ func NewCyclingAPIShapeOK() *CyclingAPIShapeOK {
/*CyclingAPIShapeOK handles this case with default header values.
-OK
+Success
*/
type CyclingAPIShapeOK struct {
- Payload []*models.ServiceDTOVersion2BikeBikeShape
+ Payload []*models.PTXServiceDTOBikeSpecificationV2BikeShape
}
func (o *CyclingAPIShapeOK) Error() string {
return fmt.Sprintf("[GET /v2/Cycling/Shape/{City}][%d] cyclingApiShapeOK %+v", 200, o.Payload)
}
-func (o *CyclingAPIShapeOK) GetPayload() []*models.ServiceDTOVersion2BikeBikeShape {
+func (o *CyclingAPIShapeOK) GetPayload() []*models.PTXServiceDTOBikeSpecificationV2BikeShape {
return o.Payload
}
diff --git a/bike/v2/client/m_o_t_c_transport_api_v2_client.go b/bike/v2/client/m_o_t_c_transport_api_v2_client.go
index b65deb73..108c89b5 100644
--- a/bike/v2/client/m_o_t_c_transport_api_v2_client.go
+++ b/bike/v2/client/m_o_t_c_transport_api_v2_client.go
@@ -22,7 +22,7 @@ const (
DefaultHost string = "ptx.transportdata.tw"
// DefaultBasePath is the default BasePath
// found in Meta (info) section of spec file
- DefaultBasePath string = "/MOTC/"
+ DefaultBasePath string = "/MOTC"
)
// DefaultSchemes are the default schemes found in Meta (info) section of spec file
diff --git a/bike/v2/models/service_d_t_o_version2_bike_bike_availability.go b/bike/v2/models/p_t_x_service_d_t_o_bike_specification_v2_bike_availability.go
similarity index 62%
rename from bike/v2/models/service_d_t_o_version2_bike_bike_availability.go
rename to bike/v2/models/p_t_x_service_d_t_o_bike_specification_v2_bike_availability.go
index 47cb2b98..8f93d184 100644
--- a/bike/v2/models/service_d_t_o_version2_bike_bike_availability.go
+++ b/bike/v2/models/p_t_x_service_d_t_o_bike_specification_v2_bike_availability.go
@@ -12,16 +12,20 @@ import (
"github.com/go-openapi/validate"
)
-// ServiceDTOVersion2BikeBikeAvailability BikeAvailability
+// PTXServiceDTOBikeSpecificationV2BikeAvailability BikeAvailability
//
// 自行車站點剩餘數量資訊
//
-// swagger:model Service.DTO.Version2.Bike.BikeAvailability
-type ServiceDTOVersion2BikeBikeAvailability struct {
+// swagger:model PTX.Service.DTO.Bike.Specification.V2.BikeAvailability
+type PTXServiceDTOBikeSpecificationV2BikeAvailability struct {
+ // Int32
+ //
// 可租借車數
AvailableRentBikes int32 `json:"AvailableRentBikes,omitempty"`
+ // Int32
+ //
// 可歸還車數
AvailableReturnBikes int32 `json:"AvailableReturnBikes,omitempty"`
@@ -33,12 +37,15 @@ type ServiceDTOVersion2BikeBikeAvailability struct {
// DateTime
//
// 來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)
- // Required: true
- SrcUpdateTime *string `json:"SrcUpdateTime"`
+ SrcUpdateTime string `json:"SrcUpdateTime,omitempty"`
+ // String
+ //
// 站點代碼
StationID string `json:"StationID,omitempty"`
+ // String
+ //
// 站點唯一識別代碼,規則為 {業管機關代碼} + {StationID},其中 {業管機關代碼} 可於Authority API中的AuthorityCode欄位查詢
StationUID string `json:"StationUID,omitempty"`
@@ -49,14 +56,10 @@ type ServiceDTOVersion2BikeBikeAvailability struct {
UpdateTime *string `json:"UpdateTime"`
}
-// Validate validates this service d t o version2 bike bike availability
-func (m *ServiceDTOVersion2BikeBikeAvailability) Validate(formats strfmt.Registry) error {
+// Validate validates this p t x service d t o bike specification v2 bike availability
+func (m *PTXServiceDTOBikeSpecificationV2BikeAvailability) Validate(formats strfmt.Registry) error {
var res []error
- if err := m.validateSrcUpdateTime(formats); err != nil {
- res = append(res, err)
- }
-
if err := m.validateUpdateTime(formats); err != nil {
res = append(res, err)
}
@@ -67,16 +70,7 @@ func (m *ServiceDTOVersion2BikeBikeAvailability) Validate(formats strfmt.Registr
return nil
}
-func (m *ServiceDTOVersion2BikeBikeAvailability) validateSrcUpdateTime(formats strfmt.Registry) error {
-
- if err := validate.Required("SrcUpdateTime", "body", m.SrcUpdateTime); err != nil {
- return err
- }
-
- return nil
-}
-
-func (m *ServiceDTOVersion2BikeBikeAvailability) validateUpdateTime(formats strfmt.Registry) error {
+func (m *PTXServiceDTOBikeSpecificationV2BikeAvailability) validateUpdateTime(formats strfmt.Registry) error {
if err := validate.Required("UpdateTime", "body", m.UpdateTime); err != nil {
return err
@@ -86,7 +80,7 @@ func (m *ServiceDTOVersion2BikeBikeAvailability) validateUpdateTime(formats strf
}
// MarshalBinary interface implementation
-func (m *ServiceDTOVersion2BikeBikeAvailability) MarshalBinary() ([]byte, error) {
+func (m *PTXServiceDTOBikeSpecificationV2BikeAvailability) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
@@ -94,8 +88,8 @@ func (m *ServiceDTOVersion2BikeBikeAvailability) MarshalBinary() ([]byte, error)
}
// UnmarshalBinary interface implementation
-func (m *ServiceDTOVersion2BikeBikeAvailability) UnmarshalBinary(b []byte) error {
- var res ServiceDTOVersion2BikeBikeAvailability
+func (m *PTXServiceDTOBikeSpecificationV2BikeAvailability) UnmarshalBinary(b []byte) error {
+ var res PTXServiceDTOBikeSpecificationV2BikeAvailability
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
diff --git a/bike/v2/models/service_d_t_o_version2_bike_bike_shape.go b/bike/v2/models/p_t_x_service_d_t_o_bike_specification_v2_bike_shape.go
similarity index 69%
rename from bike/v2/models/service_d_t_o_version2_bike_bike_shape.go
rename to bike/v2/models/p_t_x_service_d_t_o_bike_specification_v2_bike_shape.go
index efea1e87..f3c5a379 100644
--- a/bike/v2/models/service_d_t_o_version2_bike_bike_shape.go
+++ b/bike/v2/models/p_t_x_service_d_t_o_bike_specification_v2_bike_shape.go
@@ -12,18 +12,24 @@ import (
"github.com/go-openapi/validate"
)
-// ServiceDTOVersion2BikeBikeShape BikeShape
+// PTXServiceDTOBikeSpecificationV2BikeShape BikeShape
//
-// swagger:model Service.DTO.Version2.Bike.BikeShape
-type ServiceDTOVersion2BikeBikeShape struct {
+// swagger:model PTX.Service.DTO.Bike.Specification.V2.BikeShape
+type PTXServiceDTOBikeSpecificationV2BikeShape struct {
+ // String
+ //
// 業管機關名稱(可能包含多個業管機關)
AuthorityName string `json:"AuthorityName,omitempty"`
+ // String
+ //
// 路線所在縣市名稱
// Required: true
City *string `json:"City"`
+ // String
+ //
// 路線所在縣市代碼
// Required: true
CityCode *string `json:"CityCode"`
@@ -31,29 +37,45 @@ type ServiceDTOVersion2BikeBikeShape struct {
// 自行車道長度
CyclingLength float64 `json:"CyclingLength,omitempty"`
+ // String
+ //
// 自行車道類型
CyclingType string `json:"CyclingType,omitempty"`
+ // String
+ //
// 自行車道車行方向
Direction string `json:"Direction,omitempty"`
+ // String
+ //
// 自行車道完工日期時間
FinishedTime string `json:"FinishedTime,omitempty"`
+ // String
+ //
// 路線軌跡資料
// Required: true
Geometry *string `json:"Geometry"`
+ // String
+ //
// 路線迄點描述
RoadSectionEnd string `json:"RoadSectionEnd,omitempty"`
+ // String
+ //
// 路線起點描述
RoadSectionStart string `json:"RoadSectionStart,omitempty"`
+ // String
+ //
// 路線名稱
// Required: true
RouteName *string `json:"RouteName"`
+ // String
+ //
// 路線所在鄉鎮名稱(可能包含多個鄉鎮)
Town string `json:"Town,omitempty"`
@@ -64,8 +86,8 @@ type ServiceDTOVersion2BikeBikeShape struct {
UpdateTime *string `json:"UpdateTime"`
}
-// Validate validates this service d t o version2 bike bike shape
-func (m *ServiceDTOVersion2BikeBikeShape) Validate(formats strfmt.Registry) error {
+// Validate validates this p t x service d t o bike specification v2 bike shape
+func (m *PTXServiceDTOBikeSpecificationV2BikeShape) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateCity(formats); err != nil {
@@ -94,7 +116,7 @@ func (m *ServiceDTOVersion2BikeBikeShape) Validate(formats strfmt.Registry) erro
return nil
}
-func (m *ServiceDTOVersion2BikeBikeShape) validateCity(formats strfmt.Registry) error {
+func (m *PTXServiceDTOBikeSpecificationV2BikeShape) validateCity(formats strfmt.Registry) error {
if err := validate.Required("City", "body", m.City); err != nil {
return err
@@ -103,7 +125,7 @@ func (m *ServiceDTOVersion2BikeBikeShape) validateCity(formats strfmt.Registry)
return nil
}
-func (m *ServiceDTOVersion2BikeBikeShape) validateCityCode(formats strfmt.Registry) error {
+func (m *PTXServiceDTOBikeSpecificationV2BikeShape) validateCityCode(formats strfmt.Registry) error {
if err := validate.Required("CityCode", "body", m.CityCode); err != nil {
return err
@@ -112,7 +134,7 @@ func (m *ServiceDTOVersion2BikeBikeShape) validateCityCode(formats strfmt.Regist
return nil
}
-func (m *ServiceDTOVersion2BikeBikeShape) validateGeometry(formats strfmt.Registry) error {
+func (m *PTXServiceDTOBikeSpecificationV2BikeShape) validateGeometry(formats strfmt.Registry) error {
if err := validate.Required("Geometry", "body", m.Geometry); err != nil {
return err
@@ -121,7 +143,7 @@ func (m *ServiceDTOVersion2BikeBikeShape) validateGeometry(formats strfmt.Regist
return nil
}
-func (m *ServiceDTOVersion2BikeBikeShape) validateRouteName(formats strfmt.Registry) error {
+func (m *PTXServiceDTOBikeSpecificationV2BikeShape) validateRouteName(formats strfmt.Registry) error {
if err := validate.Required("RouteName", "body", m.RouteName); err != nil {
return err
@@ -130,7 +152,7 @@ func (m *ServiceDTOVersion2BikeBikeShape) validateRouteName(formats strfmt.Regis
return nil
}
-func (m *ServiceDTOVersion2BikeBikeShape) validateUpdateTime(formats strfmt.Registry) error {
+func (m *PTXServiceDTOBikeSpecificationV2BikeShape) validateUpdateTime(formats strfmt.Registry) error {
if err := validate.Required("UpdateTime", "body", m.UpdateTime); err != nil {
return err
@@ -140,7 +162,7 @@ func (m *ServiceDTOVersion2BikeBikeShape) validateUpdateTime(formats strfmt.Regi
}
// MarshalBinary interface implementation
-func (m *ServiceDTOVersion2BikeBikeShape) MarshalBinary() ([]byte, error) {
+func (m *PTXServiceDTOBikeSpecificationV2BikeShape) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
@@ -148,8 +170,8 @@ func (m *ServiceDTOVersion2BikeBikeShape) MarshalBinary() ([]byte, error) {
}
// UnmarshalBinary interface implementation
-func (m *ServiceDTOVersion2BikeBikeShape) UnmarshalBinary(b []byte) error {
- var res ServiceDTOVersion2BikeBikeShape
+func (m *PTXServiceDTOBikeSpecificationV2BikeShape) UnmarshalBinary(b []byte) error {
+ var res PTXServiceDTOBikeSpecificationV2BikeShape
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
diff --git a/bike/v2/models/service_d_t_o_version2_bike_bike_station.go b/bike/v2/models/p_t_x_service_d_t_o_bike_specification_v2_bike_station.go
similarity index 52%
rename from bike/v2/models/service_d_t_o_version2_bike_bike_station.go
rename to bike/v2/models/p_t_x_service_d_t_o_bike_specification_v2_bike_station.go
index 15dc428c..0d4b5586 100644
--- a/bike/v2/models/service_d_t_o_version2_bike_bike_station.go
+++ b/bike/v2/models/p_t_x_service_d_t_o_bike_specification_v2_bike_station.go
@@ -12,46 +12,61 @@ import (
"github.com/go-openapi/validate"
)
-// ServiceDTOVersion2BikeBikeStation BikeStation
+// PTXServiceDTOBikeSpecificationV2BikeStation BikeStation
//
// 自行車站點資訊
//
-// swagger:model Service.DTO.Version2.Bike.BikeStation
-type ServiceDTOVersion2BikeBikeStation struct {
+// swagger:model PTX.Service.DTO.Bike.Specification.V2.BikeStation
+type PTXServiceDTOBikeSpecificationV2BikeStation struct {
+ // String
+ //
// 業管單位代碼
AuthorityID string `json:"AuthorityID,omitempty"`
+ // Int32
+ //
// 可容納之自行車總數
BikesCapacity int32 `json:"BikesCapacity,omitempty"`
// DateTime
//
// 來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)
- // Required: true
- SrcUpdateTime *string `json:"SrcUpdateTime"`
+ SrcUpdateTime string `json:"SrcUpdateTime,omitempty"`
// NameType
//
// 站點地址
- StationAddress *ServiceDTOVersion2BaseNameType `json:"StationAddress,omitempty"`
+ StationAddress struct {
+ PTXServiceDTOSharedSpecificationV2BaseNameType
+ } `json:"StationAddress,omitempty"`
+ // String
+ //
// 站點代碼
StationID string `json:"StationID,omitempty"`
// NameType
//
// 站點名稱
- StationName *ServiceDTOVersion2BaseNameType `json:"StationName,omitempty"`
+ StationName struct {
+ PTXServiceDTOSharedSpecificationV2BaseNameType
+ } `json:"StationName,omitempty"`
// PointType
//
// 站點位置
- StationPosition *ServiceDTOVersion2BasePointType `json:"StationPosition,omitempty"`
+ StationPosition struct {
+ PTXServiceDTOSharedSpecificationV2BasePointType
+ } `json:"StationPosition,omitempty"`
+ // String
+ //
// 站點唯一識別代碼,規則為 {業管機關代碼} + {StationID},其中 {業管機關代碼} 可於Authority API中的AuthorityCode欄位查詢
StationUID string `json:"StationUID,omitempty"`
+ // String
+ //
// 站點描述
StopDescription string `json:"StopDescription,omitempty"`
@@ -62,14 +77,10 @@ type ServiceDTOVersion2BikeBikeStation struct {
UpdateTime *string `json:"UpdateTime"`
}
-// Validate validates this service d t o version2 bike bike station
-func (m *ServiceDTOVersion2BikeBikeStation) Validate(formats strfmt.Registry) error {
+// Validate validates this p t x service d t o bike specification v2 bike station
+func (m *PTXServiceDTOBikeSpecificationV2BikeStation) Validate(formats strfmt.Registry) error {
var res []error
- if err := m.validateSrcUpdateTime(formats); err != nil {
- res = append(res, err)
- }
-
if err := m.validateStationAddress(formats); err != nil {
res = append(res, err)
}
@@ -92,70 +103,34 @@ func (m *ServiceDTOVersion2BikeBikeStation) Validate(formats strfmt.Registry) er
return nil
}
-func (m *ServiceDTOVersion2BikeBikeStation) validateSrcUpdateTime(formats strfmt.Registry) error {
-
- if err := validate.Required("SrcUpdateTime", "body", m.SrcUpdateTime); err != nil {
- return err
- }
-
- return nil
-}
-
-func (m *ServiceDTOVersion2BikeBikeStation) validateStationAddress(formats strfmt.Registry) error {
+func (m *PTXServiceDTOBikeSpecificationV2BikeStation) validateStationAddress(formats strfmt.Registry) error {
if swag.IsZero(m.StationAddress) { // not required
return nil
}
- if m.StationAddress != nil {
- if err := m.StationAddress.Validate(formats); err != nil {
- if ve, ok := err.(*errors.Validation); ok {
- return ve.ValidateName("StationAddress")
- }
- return err
- }
- }
-
return nil
}
-func (m *ServiceDTOVersion2BikeBikeStation) validateStationName(formats strfmt.Registry) error {
+func (m *PTXServiceDTOBikeSpecificationV2BikeStation) validateStationName(formats strfmt.Registry) error {
if swag.IsZero(m.StationName) { // not required
return nil
}
- if m.StationName != nil {
- if err := m.StationName.Validate(formats); err != nil {
- if ve, ok := err.(*errors.Validation); ok {
- return ve.ValidateName("StationName")
- }
- return err
- }
- }
-
return nil
}
-func (m *ServiceDTOVersion2BikeBikeStation) validateStationPosition(formats strfmt.Registry) error {
+func (m *PTXServiceDTOBikeSpecificationV2BikeStation) validateStationPosition(formats strfmt.Registry) error {
if swag.IsZero(m.StationPosition) { // not required
return nil
}
- if m.StationPosition != nil {
- if err := m.StationPosition.Validate(formats); err != nil {
- if ve, ok := err.(*errors.Validation); ok {
- return ve.ValidateName("StationPosition")
- }
- return err
- }
- }
-
return nil
}
-func (m *ServiceDTOVersion2BikeBikeStation) validateUpdateTime(formats strfmt.Registry) error {
+func (m *PTXServiceDTOBikeSpecificationV2BikeStation) validateUpdateTime(formats strfmt.Registry) error {
if err := validate.Required("UpdateTime", "body", m.UpdateTime); err != nil {
return err
@@ -165,7 +140,7 @@ func (m *ServiceDTOVersion2BikeBikeStation) validateUpdateTime(formats strfmt.Re
}
// MarshalBinary interface implementation
-func (m *ServiceDTOVersion2BikeBikeStation) MarshalBinary() ([]byte, error) {
+func (m *PTXServiceDTOBikeSpecificationV2BikeStation) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
@@ -173,8 +148,8 @@ func (m *ServiceDTOVersion2BikeBikeStation) MarshalBinary() ([]byte, error) {
}
// UnmarshalBinary interface implementation
-func (m *ServiceDTOVersion2BikeBikeStation) UnmarshalBinary(b []byte) error {
- var res ServiceDTOVersion2BikeBikeStation
+func (m *PTXServiceDTOBikeSpecificationV2BikeStation) UnmarshalBinary(b []byte) error {
+ var res PTXServiceDTOBikeSpecificationV2BikeStation
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
diff --git a/bike/v2/models/service_d_t_o_version2_base_name_type.go b/bike/v2/models/p_t_x_service_d_t_o_shared_specification_v2_base_name_type.go
similarity index 50%
rename from bike/v2/models/service_d_t_o_version2_base_name_type.go
rename to bike/v2/models/p_t_x_service_d_t_o_shared_specification_v2_base_name_type.go
index 56abdf5a..ae2f0ea5 100644
--- a/bike/v2/models/service_d_t_o_version2_base_name_type.go
+++ b/bike/v2/models/p_t_x_service_d_t_o_shared_specification_v2_base_name_type.go
@@ -10,27 +10,31 @@ import (
"github.com/go-openapi/swag"
)
-// ServiceDTOVersion2BaseNameType NameType
+// PTXServiceDTOSharedSpecificationV2BaseNameType NameType
//
// 名稱資料型別
//
-// swagger:model Service.DTO.Version2.Base.NameType
-type ServiceDTOVersion2BaseNameType struct {
+// swagger:model PTX.Service.DTO.Shared.Specification.V2.Base.NameType
+type PTXServiceDTOSharedSpecificationV2BaseNameType struct {
+ // String
+ //
// 英文名稱
En string `json:"En,omitempty"`
+ // String
+ //
// 中文繁體名稱
ZhTw string `json:"Zh_tw,omitempty"`
}
-// Validate validates this service d t o version2 base name type
-func (m *ServiceDTOVersion2BaseNameType) Validate(formats strfmt.Registry) error {
+// Validate validates this p t x service d t o shared specification v2 base name type
+func (m *PTXServiceDTOSharedSpecificationV2BaseNameType) Validate(formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
-func (m *ServiceDTOVersion2BaseNameType) MarshalBinary() ([]byte, error) {
+func (m *PTXServiceDTOSharedSpecificationV2BaseNameType) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
@@ -38,8 +42,8 @@ func (m *ServiceDTOVersion2BaseNameType) MarshalBinary() ([]byte, error) {
}
// UnmarshalBinary interface implementation
-func (m *ServiceDTOVersion2BaseNameType) UnmarshalBinary(b []byte) error {
- var res ServiceDTOVersion2BaseNameType
+func (m *PTXServiceDTOSharedSpecificationV2BaseNameType) UnmarshalBinary(b []byte) error {
+ var res PTXServiceDTOSharedSpecificationV2BaseNameType
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
diff --git a/air/v2/models/service_d_t_o_version2_base_point_type.go b/bike/v2/models/p_t_x_service_d_t_o_shared_specification_v2_base_point_type.go
similarity index 50%
rename from air/v2/models/service_d_t_o_version2_base_point_type.go
rename to bike/v2/models/p_t_x_service_d_t_o_shared_specification_v2_base_point_type.go
index 171a47ea..65354297 100644
--- a/air/v2/models/service_d_t_o_version2_base_point_type.go
+++ b/bike/v2/models/p_t_x_service_d_t_o_shared_specification_v2_base_point_type.go
@@ -10,12 +10,17 @@ import (
"github.com/go-openapi/swag"
)
-// ServiceDTOVersion2BasePointType PointType
+// PTXServiceDTOSharedSpecificationV2BasePointType PointType
//
// 座標資料型別
//
-// swagger:model Service.DTO.Version2.Base.PointType
-type ServiceDTOVersion2BasePointType struct {
+// swagger:model PTX.Service.DTO.Shared.Specification.V2.Base.PointType
+type PTXServiceDTOSharedSpecificationV2BasePointType struct {
+
+ // String
+ //
+ // 位置雜湊
+ GeoHash string `json:"GeoHash,omitempty"`
// 位置緯度(WGS84)
PositionLat float64 `json:"PositionLat,omitempty"`
@@ -24,13 +29,13 @@ type ServiceDTOVersion2BasePointType struct {
PositionLon float64 `json:"PositionLon,omitempty"`
}
-// Validate validates this service d t o version2 base point type
-func (m *ServiceDTOVersion2BasePointType) Validate(formats strfmt.Registry) error {
+// Validate validates this p t x service d t o shared specification v2 base point type
+func (m *PTXServiceDTOSharedSpecificationV2BasePointType) Validate(formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
-func (m *ServiceDTOVersion2BasePointType) MarshalBinary() ([]byte, error) {
+func (m *PTXServiceDTOSharedSpecificationV2BasePointType) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
@@ -38,8 +43,8 @@ func (m *ServiceDTOVersion2BasePointType) MarshalBinary() ([]byte, error) {
}
// UnmarshalBinary interface implementation
-func (m *ServiceDTOVersion2BasePointType) UnmarshalBinary(b []byte) error {
- var res ServiceDTOVersion2BasePointType
+func (m *PTXServiceDTOSharedSpecificationV2BasePointType) UnmarshalBinary(b []byte) error {
+ var res PTXServiceDTOSharedSpecificationV2BasePointType
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
diff --git a/bus/v2/client/city_bus/city_bus_api_data_version_responses.go b/bus/v2/client/city_bus/city_bus_api_data_version_responses.go
index c8dab072..532ba50e 100644
--- a/bus/v2/client/city_bus/city_bus_api_data_version_responses.go
+++ b/bus/v2/client/city_bus/city_bus_api_data_version_responses.go
@@ -37,7 +37,7 @@ func (o *CityBusAPIDataVersionReader) ReadResponse(response runtime.ClientRespon
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/bus/v2/client/city_bus/city_bus_api_display_stop_of_route1_responses.go b/bus/v2/client/city_bus/city_bus_api_display_stop_of_route1_responses.go
index 0d741883..f8a7213a 100644
--- a/bus/v2/client/city_bus/city_bus_api_display_stop_of_route1_responses.go
+++ b/bus/v2/client/city_bus/city_bus_api_display_stop_of_route1_responses.go
@@ -37,7 +37,7 @@ func (o *CityBusAPIDisplayStopOfRoute1Reader) ReadResponse(response runtime.Clie
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/bus/v2/client/city_bus/city_bus_api_display_stop_of_route_responses.go b/bus/v2/client/city_bus/city_bus_api_display_stop_of_route_responses.go
index 75017703..42a88f14 100644
--- a/bus/v2/client/city_bus/city_bus_api_display_stop_of_route_responses.go
+++ b/bus/v2/client/city_bus/city_bus_api_display_stop_of_route_responses.go
@@ -37,7 +37,7 @@ func (o *CityBusAPIDisplayStopOfRouteReader) ReadResponse(response runtime.Clien
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/bus/v2/client/city_bus/city_bus_api_estimated_time_of_arrival1_responses.go b/bus/v2/client/city_bus/city_bus_api_estimated_time_of_arrival1_responses.go
index db968bed..39ce6324 100644
--- a/bus/v2/client/city_bus/city_bus_api_estimated_time_of_arrival1_responses.go
+++ b/bus/v2/client/city_bus/city_bus_api_estimated_time_of_arrival1_responses.go
@@ -37,7 +37,7 @@ func (o *CityBusAPIEstimatedTimeOfArrival1Reader) ReadResponse(response runtime.
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/bus/v2/client/city_bus/city_bus_api_estimated_time_of_arrival_responses.go b/bus/v2/client/city_bus/city_bus_api_estimated_time_of_arrival_responses.go
index d9d10916..2e301ce0 100644
--- a/bus/v2/client/city_bus/city_bus_api_estimated_time_of_arrival_responses.go
+++ b/bus/v2/client/city_bus/city_bus_api_estimated_time_of_arrival_responses.go
@@ -37,7 +37,7 @@ func (o *CityBusAPIEstimatedTimeOfArrivalReader) ReadResponse(response runtime.C
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/bus/v2/client/city_bus/city_bus_api_estimated_time_of_arrival_udp_1_responses.go b/bus/v2/client/city_bus/city_bus_api_estimated_time_of_arrival_udp_1_responses.go
index 3ec8cdd8..13e0f5a9 100644
--- a/bus/v2/client/city_bus/city_bus_api_estimated_time_of_arrival_udp_1_responses.go
+++ b/bus/v2/client/city_bus/city_bus_api_estimated_time_of_arrival_udp_1_responses.go
@@ -37,7 +37,7 @@ func (o *CityBusAPIEstimatedTimeOfArrivalUDP1Reader) ReadResponse(response runti
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/bus/v2/client/city_bus/city_bus_api_estimated_time_of_arrival_udp_responses.go b/bus/v2/client/city_bus/city_bus_api_estimated_time_of_arrival_udp_responses.go
index b954c285..40821b11 100644
--- a/bus/v2/client/city_bus/city_bus_api_estimated_time_of_arrival_udp_responses.go
+++ b/bus/v2/client/city_bus/city_bus_api_estimated_time_of_arrival_udp_responses.go
@@ -37,7 +37,7 @@ func (o *CityBusAPIEstimatedTimeOfArrivalUDPReader) ReadResponse(response runtim
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/bus/v2/client/city_bus/city_bus_api_first_last_trip_info1_parameters.go b/bus/v2/client/city_bus/city_bus_api_first_last_trip_info1_parameters.go
new file mode 100644
index 00000000..3a9ffdd6
--- /dev/null
+++ b/bus/v2/client/city_bus/city_bus_api_first_last_trip_info1_parameters.go
@@ -0,0 +1,386 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+package city_bus
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "context"
+ "net/http"
+ "time"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/strfmt"
+ "github.com/go-openapi/swag"
+)
+
+// NewCityBusAPIFirstLastTripInfo1Params creates a new CityBusAPIFirstLastTripInfo1Params object
+// with the default values initialized.
+func NewCityBusAPIFirstLastTripInfo1Params() *CityBusAPIFirstLastTripInfo1Params {
+ var (
+ dollarTopDefault = int64(30)
+ )
+ return &CityBusAPIFirstLastTripInfo1Params{
+ DollarTop: &dollarTopDefault,
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewCityBusAPIFirstLastTripInfo1ParamsWithTimeout creates a new CityBusAPIFirstLastTripInfo1Params object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewCityBusAPIFirstLastTripInfo1ParamsWithTimeout(timeout time.Duration) *CityBusAPIFirstLastTripInfo1Params {
+ var (
+ dollarTopDefault = int64(30)
+ )
+ return &CityBusAPIFirstLastTripInfo1Params{
+ DollarTop: &dollarTopDefault,
+
+ timeout: timeout,
+ }
+}
+
+// NewCityBusAPIFirstLastTripInfo1ParamsWithContext creates a new CityBusAPIFirstLastTripInfo1Params object
+// with the default values initialized, and the ability to set a context for a request
+func NewCityBusAPIFirstLastTripInfo1ParamsWithContext(ctx context.Context) *CityBusAPIFirstLastTripInfo1Params {
+ var (
+ dollarTopDefault = int64(30)
+ )
+ return &CityBusAPIFirstLastTripInfo1Params{
+ DollarTop: &dollarTopDefault,
+
+ Context: ctx,
+ }
+}
+
+// NewCityBusAPIFirstLastTripInfo1ParamsWithHTTPClient creates a new CityBusAPIFirstLastTripInfo1Params object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewCityBusAPIFirstLastTripInfo1ParamsWithHTTPClient(client *http.Client) *CityBusAPIFirstLastTripInfo1Params {
+ var (
+ dollarTopDefault = int64(30)
+ )
+ return &CityBusAPIFirstLastTripInfo1Params{
+ DollarTop: &dollarTopDefault,
+ HTTPClient: client,
+ }
+}
+
+/*CityBusAPIFirstLastTripInfo1Params contains all the parameters to send to the API endpoint
+for the city bus Api first last trip info 1 operation typically these are written to a http.Request
+*/
+type CityBusAPIFirstLastTripInfo1Params struct {
+
+ /*DollarFilter
+ 過濾
+
+ */
+ DollarFilter *string
+ /*DollarFormat
+ 指定來源格式
+
+ */
+ DollarFormat string
+ /*DollarOrderby
+ 排序
+
+ */
+ DollarOrderby *string
+ /*DollarSelect
+ 挑選
+
+ */
+ DollarSelect *string
+ /*DollarSkip
+ 跳過前幾筆
+
+ */
+ DollarSkip *string
+ /*DollarTop
+ 取前幾筆
+
+ */
+ DollarTop *int64
+ /*City
+ 欲查詢縣市
+
+ */
+ City string
+ /*RouteName
+ 繁體中文路線名稱,如'307'
+
+ */
+ RouteName string
+ /*Health
+ 加入參數'?health=true'即可查詢此API服務的健康狀態
+
+ */
+ Health *string
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the city bus Api first last trip info 1 params
+func (o *CityBusAPIFirstLastTripInfo1Params) WithTimeout(timeout time.Duration) *CityBusAPIFirstLastTripInfo1Params {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the city bus Api first last trip info 1 params
+func (o *CityBusAPIFirstLastTripInfo1Params) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the city bus Api first last trip info 1 params
+func (o *CityBusAPIFirstLastTripInfo1Params) WithContext(ctx context.Context) *CityBusAPIFirstLastTripInfo1Params {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the city bus Api first last trip info 1 params
+func (o *CityBusAPIFirstLastTripInfo1Params) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the city bus Api first last trip info 1 params
+func (o *CityBusAPIFirstLastTripInfo1Params) WithHTTPClient(client *http.Client) *CityBusAPIFirstLastTripInfo1Params {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the city bus Api first last trip info 1 params
+func (o *CityBusAPIFirstLastTripInfo1Params) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithDollarFilter adds the dollarFilter to the city bus Api first last trip info 1 params
+func (o *CityBusAPIFirstLastTripInfo1Params) WithDollarFilter(dollarFilter *string) *CityBusAPIFirstLastTripInfo1Params {
+ o.SetDollarFilter(dollarFilter)
+ return o
+}
+
+// SetDollarFilter adds the dollarFilter to the city bus Api first last trip info 1 params
+func (o *CityBusAPIFirstLastTripInfo1Params) SetDollarFilter(dollarFilter *string) {
+ o.DollarFilter = dollarFilter
+}
+
+// WithDollarFormat adds the dollarFormat to the city bus Api first last trip info 1 params
+func (o *CityBusAPIFirstLastTripInfo1Params) WithDollarFormat(dollarFormat string) *CityBusAPIFirstLastTripInfo1Params {
+ o.SetDollarFormat(dollarFormat)
+ return o
+}
+
+// SetDollarFormat adds the dollarFormat to the city bus Api first last trip info 1 params
+func (o *CityBusAPIFirstLastTripInfo1Params) SetDollarFormat(dollarFormat string) {
+ o.DollarFormat = dollarFormat
+}
+
+// WithDollarOrderby adds the dollarOrderby to the city bus Api first last trip info 1 params
+func (o *CityBusAPIFirstLastTripInfo1Params) WithDollarOrderby(dollarOrderby *string) *CityBusAPIFirstLastTripInfo1Params {
+ o.SetDollarOrderby(dollarOrderby)
+ return o
+}
+
+// SetDollarOrderby adds the dollarOrderby to the city bus Api first last trip info 1 params
+func (o *CityBusAPIFirstLastTripInfo1Params) SetDollarOrderby(dollarOrderby *string) {
+ o.DollarOrderby = dollarOrderby
+}
+
+// WithDollarSelect adds the dollarSelect to the city bus Api first last trip info 1 params
+func (o *CityBusAPIFirstLastTripInfo1Params) WithDollarSelect(dollarSelect *string) *CityBusAPIFirstLastTripInfo1Params {
+ o.SetDollarSelect(dollarSelect)
+ return o
+}
+
+// SetDollarSelect adds the dollarSelect to the city bus Api first last trip info 1 params
+func (o *CityBusAPIFirstLastTripInfo1Params) SetDollarSelect(dollarSelect *string) {
+ o.DollarSelect = dollarSelect
+}
+
+// WithDollarSkip adds the dollarSkip to the city bus Api first last trip info 1 params
+func (o *CityBusAPIFirstLastTripInfo1Params) WithDollarSkip(dollarSkip *string) *CityBusAPIFirstLastTripInfo1Params {
+ o.SetDollarSkip(dollarSkip)
+ return o
+}
+
+// SetDollarSkip adds the dollarSkip to the city bus Api first last trip info 1 params
+func (o *CityBusAPIFirstLastTripInfo1Params) SetDollarSkip(dollarSkip *string) {
+ o.DollarSkip = dollarSkip
+}
+
+// WithDollarTop adds the dollarTop to the city bus Api first last trip info 1 params
+func (o *CityBusAPIFirstLastTripInfo1Params) WithDollarTop(dollarTop *int64) *CityBusAPIFirstLastTripInfo1Params {
+ o.SetDollarTop(dollarTop)
+ return o
+}
+
+// SetDollarTop adds the dollarTop to the city bus Api first last trip info 1 params
+func (o *CityBusAPIFirstLastTripInfo1Params) SetDollarTop(dollarTop *int64) {
+ o.DollarTop = dollarTop
+}
+
+// WithCity adds the city to the city bus Api first last trip info 1 params
+func (o *CityBusAPIFirstLastTripInfo1Params) WithCity(city string) *CityBusAPIFirstLastTripInfo1Params {
+ o.SetCity(city)
+ return o
+}
+
+// SetCity adds the city to the city bus Api first last trip info 1 params
+func (o *CityBusAPIFirstLastTripInfo1Params) SetCity(city string) {
+ o.City = city
+}
+
+// WithRouteName adds the routeName to the city bus Api first last trip info 1 params
+func (o *CityBusAPIFirstLastTripInfo1Params) WithRouteName(routeName string) *CityBusAPIFirstLastTripInfo1Params {
+ o.SetRouteName(routeName)
+ return o
+}
+
+// SetRouteName adds the routeName to the city bus Api first last trip info 1 params
+func (o *CityBusAPIFirstLastTripInfo1Params) SetRouteName(routeName string) {
+ o.RouteName = routeName
+}
+
+// WithHealth adds the health to the city bus Api first last trip info 1 params
+func (o *CityBusAPIFirstLastTripInfo1Params) WithHealth(health *string) *CityBusAPIFirstLastTripInfo1Params {
+ o.SetHealth(health)
+ return o
+}
+
+// SetHealth adds the health to the city bus Api first last trip info 1 params
+func (o *CityBusAPIFirstLastTripInfo1Params) SetHealth(health *string) {
+ o.Health = health
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *CityBusAPIFirstLastTripInfo1Params) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.DollarFilter != nil {
+
+ // query param $filter
+ var qrDollarFilter string
+ if o.DollarFilter != nil {
+ qrDollarFilter = *o.DollarFilter
+ }
+ qDollarFilter := qrDollarFilter
+ if qDollarFilter != "" {
+ if err := r.SetQueryParam("$filter", qDollarFilter); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ // query param $format
+ qrDollarFormat := o.DollarFormat
+ qDollarFormat := qrDollarFormat
+ if qDollarFormat != "" {
+ if err := r.SetQueryParam("$format", qDollarFormat); err != nil {
+ return err
+ }
+ }
+
+ if o.DollarOrderby != nil {
+
+ // query param $orderby
+ var qrDollarOrderby string
+ if o.DollarOrderby != nil {
+ qrDollarOrderby = *o.DollarOrderby
+ }
+ qDollarOrderby := qrDollarOrderby
+ if qDollarOrderby != "" {
+ if err := r.SetQueryParam("$orderby", qDollarOrderby); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.DollarSelect != nil {
+
+ // query param $select
+ var qrDollarSelect string
+ if o.DollarSelect != nil {
+ qrDollarSelect = *o.DollarSelect
+ }
+ qDollarSelect := qrDollarSelect
+ if qDollarSelect != "" {
+ if err := r.SetQueryParam("$select", qDollarSelect); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.DollarSkip != nil {
+
+ // query param $skip
+ var qrDollarSkip string
+ if o.DollarSkip != nil {
+ qrDollarSkip = *o.DollarSkip
+ }
+ qDollarSkip := qrDollarSkip
+ if qDollarSkip != "" {
+ if err := r.SetQueryParam("$skip", qDollarSkip); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.DollarTop != nil {
+
+ // query param $top
+ var qrDollarTop int64
+ if o.DollarTop != nil {
+ qrDollarTop = *o.DollarTop
+ }
+ qDollarTop := swag.FormatInt64(qrDollarTop)
+ if qDollarTop != "" {
+ if err := r.SetQueryParam("$top", qDollarTop); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ // path param City
+ if err := r.SetPathParam("City", o.City); err != nil {
+ return err
+ }
+
+ // path param RouteName
+ if err := r.SetPathParam("RouteName", o.RouteName); err != nil {
+ return err
+ }
+
+ if o.Health != nil {
+
+ // query param health
+ var qrHealth string
+ if o.Health != nil {
+ qrHealth = *o.Health
+ }
+ qHealth := qrHealth
+ if qHealth != "" {
+ if err := r.SetQueryParam("health", qHealth); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/bus/v2/client/city_bus/city_bus_api_first_last_trip_info1_responses.go b/bus/v2/client/city_bus/city_bus_api_first_last_trip_info1_responses.go
new file mode 100644
index 00000000..c65a190b
--- /dev/null
+++ b/bus/v2/client/city_bus/city_bus_api_first_last_trip_info1_responses.go
@@ -0,0 +1,106 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+package city_bus
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+ "github.com/go-openapi/strfmt"
+
+ "github.com/minchao/go-ptx/bus/v2/models"
+)
+
+// CityBusAPIFirstLastTripInfo1Reader is a Reader for the CityBusAPIFirstLastTripInfo1 structure.
+type CityBusAPIFirstLastTripInfo1Reader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *CityBusAPIFirstLastTripInfo1Reader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+ case 200:
+ result := NewCityBusAPIFirstLastTripInfo1OK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+ case 299:
+ result := NewCityBusAPIFirstLastTripInfo1Status299()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
+ }
+}
+
+// NewCityBusAPIFirstLastTripInfo1OK creates a CityBusAPIFirstLastTripInfo1OK with default headers values
+func NewCityBusAPIFirstLastTripInfo1OK() *CityBusAPIFirstLastTripInfo1OK {
+ return &CityBusAPIFirstLastTripInfo1OK{}
+}
+
+/*CityBusAPIFirstLastTripInfo1OK handles this case with default header values.
+
+OK
+*/
+type CityBusAPIFirstLastTripInfo1OK struct {
+ Payload []*models.ServiceDTOVersion2BusBusFirstLastTripInfo
+}
+
+func (o *CityBusAPIFirstLastTripInfo1OK) Error() string {
+ return fmt.Sprintf("[GET /v2/Bus/FirstLastTripInfo/City/{City}/{RouteName}][%d] cityBusApiFirstLastTripInfo1OK %+v", 200, o.Payload)
+}
+
+func (o *CityBusAPIFirstLastTripInfo1OK) GetPayload() []*models.ServiceDTOVersion2BusBusFirstLastTripInfo {
+ return o.Payload
+}
+
+func (o *CityBusAPIFirstLastTripInfo1OK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ // response payload
+ if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
+
+// NewCityBusAPIFirstLastTripInfo1Status299 creates a CityBusAPIFirstLastTripInfo1Status299 with default headers values
+func NewCityBusAPIFirstLastTripInfo1Status299() *CityBusAPIFirstLastTripInfo1Status299 {
+ return &CityBusAPIFirstLastTripInfo1Status299{}
+}
+
+/*CityBusAPIFirstLastTripInfo1Status299 handles this case with default header values.
+
+加入參數'?health=true'即可查詢此API服務的健康狀態
+*/
+type CityBusAPIFirstLastTripInfo1Status299 struct {
+ Payload *models.ServiceDTOVersion3BaseDisplayHealth
+}
+
+func (o *CityBusAPIFirstLastTripInfo1Status299) Error() string {
+ return fmt.Sprintf("[GET /v2/Bus/FirstLastTripInfo/City/{City}/{RouteName}][%d] cityBusApiFirstLastTripInfo1Status299 %+v", 299, o.Payload)
+}
+
+func (o *CityBusAPIFirstLastTripInfo1Status299) GetPayload() *models.ServiceDTOVersion3BaseDisplayHealth {
+ return o.Payload
+}
+
+func (o *CityBusAPIFirstLastTripInfo1Status299) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.ServiceDTOVersion3BaseDisplayHealth)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/bus/v2/client/city_bus/city_bus_api_first_last_trip_info_parameters.go b/bus/v2/client/city_bus/city_bus_api_first_last_trip_info_parameters.go
new file mode 100644
index 00000000..72c8b61b
--- /dev/null
+++ b/bus/v2/client/city_bus/city_bus_api_first_last_trip_info_parameters.go
@@ -0,0 +1,365 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+package city_bus
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "context"
+ "net/http"
+ "time"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/strfmt"
+ "github.com/go-openapi/swag"
+)
+
+// NewCityBusAPIFirstLastTripInfoParams creates a new CityBusAPIFirstLastTripInfoParams object
+// with the default values initialized.
+func NewCityBusAPIFirstLastTripInfoParams() *CityBusAPIFirstLastTripInfoParams {
+ var (
+ dollarTopDefault = int64(30)
+ )
+ return &CityBusAPIFirstLastTripInfoParams{
+ DollarTop: &dollarTopDefault,
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewCityBusAPIFirstLastTripInfoParamsWithTimeout creates a new CityBusAPIFirstLastTripInfoParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewCityBusAPIFirstLastTripInfoParamsWithTimeout(timeout time.Duration) *CityBusAPIFirstLastTripInfoParams {
+ var (
+ dollarTopDefault = int64(30)
+ )
+ return &CityBusAPIFirstLastTripInfoParams{
+ DollarTop: &dollarTopDefault,
+
+ timeout: timeout,
+ }
+}
+
+// NewCityBusAPIFirstLastTripInfoParamsWithContext creates a new CityBusAPIFirstLastTripInfoParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewCityBusAPIFirstLastTripInfoParamsWithContext(ctx context.Context) *CityBusAPIFirstLastTripInfoParams {
+ var (
+ dollarTopDefault = int64(30)
+ )
+ return &CityBusAPIFirstLastTripInfoParams{
+ DollarTop: &dollarTopDefault,
+
+ Context: ctx,
+ }
+}
+
+// NewCityBusAPIFirstLastTripInfoParamsWithHTTPClient creates a new CityBusAPIFirstLastTripInfoParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewCityBusAPIFirstLastTripInfoParamsWithHTTPClient(client *http.Client) *CityBusAPIFirstLastTripInfoParams {
+ var (
+ dollarTopDefault = int64(30)
+ )
+ return &CityBusAPIFirstLastTripInfoParams{
+ DollarTop: &dollarTopDefault,
+ HTTPClient: client,
+ }
+}
+
+/*CityBusAPIFirstLastTripInfoParams contains all the parameters to send to the API endpoint
+for the city bus Api first last trip info operation typically these are written to a http.Request
+*/
+type CityBusAPIFirstLastTripInfoParams struct {
+
+ /*DollarFilter
+ 過濾
+
+ */
+ DollarFilter *string
+ /*DollarFormat
+ 指定來源格式
+
+ */
+ DollarFormat string
+ /*DollarOrderby
+ 排序
+
+ */
+ DollarOrderby *string
+ /*DollarSelect
+ 挑選
+
+ */
+ DollarSelect *string
+ /*DollarSkip
+ 跳過前幾筆
+
+ */
+ DollarSkip *string
+ /*DollarTop
+ 取前幾筆
+
+ */
+ DollarTop *int64
+ /*City
+ 欲查詢縣市
+
+ */
+ City string
+ /*Health
+ 加入參數'?health=true'即可查詢此API服務的健康狀態
+
+ */
+ Health *string
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the city bus Api first last trip info params
+func (o *CityBusAPIFirstLastTripInfoParams) WithTimeout(timeout time.Duration) *CityBusAPIFirstLastTripInfoParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the city bus Api first last trip info params
+func (o *CityBusAPIFirstLastTripInfoParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the city bus Api first last trip info params
+func (o *CityBusAPIFirstLastTripInfoParams) WithContext(ctx context.Context) *CityBusAPIFirstLastTripInfoParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the city bus Api first last trip info params
+func (o *CityBusAPIFirstLastTripInfoParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the city bus Api first last trip info params
+func (o *CityBusAPIFirstLastTripInfoParams) WithHTTPClient(client *http.Client) *CityBusAPIFirstLastTripInfoParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the city bus Api first last trip info params
+func (o *CityBusAPIFirstLastTripInfoParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithDollarFilter adds the dollarFilter to the city bus Api first last trip info params
+func (o *CityBusAPIFirstLastTripInfoParams) WithDollarFilter(dollarFilter *string) *CityBusAPIFirstLastTripInfoParams {
+ o.SetDollarFilter(dollarFilter)
+ return o
+}
+
+// SetDollarFilter adds the dollarFilter to the city bus Api first last trip info params
+func (o *CityBusAPIFirstLastTripInfoParams) SetDollarFilter(dollarFilter *string) {
+ o.DollarFilter = dollarFilter
+}
+
+// WithDollarFormat adds the dollarFormat to the city bus Api first last trip info params
+func (o *CityBusAPIFirstLastTripInfoParams) WithDollarFormat(dollarFormat string) *CityBusAPIFirstLastTripInfoParams {
+ o.SetDollarFormat(dollarFormat)
+ return o
+}
+
+// SetDollarFormat adds the dollarFormat to the city bus Api first last trip info params
+func (o *CityBusAPIFirstLastTripInfoParams) SetDollarFormat(dollarFormat string) {
+ o.DollarFormat = dollarFormat
+}
+
+// WithDollarOrderby adds the dollarOrderby to the city bus Api first last trip info params
+func (o *CityBusAPIFirstLastTripInfoParams) WithDollarOrderby(dollarOrderby *string) *CityBusAPIFirstLastTripInfoParams {
+ o.SetDollarOrderby(dollarOrderby)
+ return o
+}
+
+// SetDollarOrderby adds the dollarOrderby to the city bus Api first last trip info params
+func (o *CityBusAPIFirstLastTripInfoParams) SetDollarOrderby(dollarOrderby *string) {
+ o.DollarOrderby = dollarOrderby
+}
+
+// WithDollarSelect adds the dollarSelect to the city bus Api first last trip info params
+func (o *CityBusAPIFirstLastTripInfoParams) WithDollarSelect(dollarSelect *string) *CityBusAPIFirstLastTripInfoParams {
+ o.SetDollarSelect(dollarSelect)
+ return o
+}
+
+// SetDollarSelect adds the dollarSelect to the city bus Api first last trip info params
+func (o *CityBusAPIFirstLastTripInfoParams) SetDollarSelect(dollarSelect *string) {
+ o.DollarSelect = dollarSelect
+}
+
+// WithDollarSkip adds the dollarSkip to the city bus Api first last trip info params
+func (o *CityBusAPIFirstLastTripInfoParams) WithDollarSkip(dollarSkip *string) *CityBusAPIFirstLastTripInfoParams {
+ o.SetDollarSkip(dollarSkip)
+ return o
+}
+
+// SetDollarSkip adds the dollarSkip to the city bus Api first last trip info params
+func (o *CityBusAPIFirstLastTripInfoParams) SetDollarSkip(dollarSkip *string) {
+ o.DollarSkip = dollarSkip
+}
+
+// WithDollarTop adds the dollarTop to the city bus Api first last trip info params
+func (o *CityBusAPIFirstLastTripInfoParams) WithDollarTop(dollarTop *int64) *CityBusAPIFirstLastTripInfoParams {
+ o.SetDollarTop(dollarTop)
+ return o
+}
+
+// SetDollarTop adds the dollarTop to the city bus Api first last trip info params
+func (o *CityBusAPIFirstLastTripInfoParams) SetDollarTop(dollarTop *int64) {
+ o.DollarTop = dollarTop
+}
+
+// WithCity adds the city to the city bus Api first last trip info params
+func (o *CityBusAPIFirstLastTripInfoParams) WithCity(city string) *CityBusAPIFirstLastTripInfoParams {
+ o.SetCity(city)
+ return o
+}
+
+// SetCity adds the city to the city bus Api first last trip info params
+func (o *CityBusAPIFirstLastTripInfoParams) SetCity(city string) {
+ o.City = city
+}
+
+// WithHealth adds the health to the city bus Api first last trip info params
+func (o *CityBusAPIFirstLastTripInfoParams) WithHealth(health *string) *CityBusAPIFirstLastTripInfoParams {
+ o.SetHealth(health)
+ return o
+}
+
+// SetHealth adds the health to the city bus Api first last trip info params
+func (o *CityBusAPIFirstLastTripInfoParams) SetHealth(health *string) {
+ o.Health = health
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *CityBusAPIFirstLastTripInfoParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.DollarFilter != nil {
+
+ // query param $filter
+ var qrDollarFilter string
+ if o.DollarFilter != nil {
+ qrDollarFilter = *o.DollarFilter
+ }
+ qDollarFilter := qrDollarFilter
+ if qDollarFilter != "" {
+ if err := r.SetQueryParam("$filter", qDollarFilter); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ // query param $format
+ qrDollarFormat := o.DollarFormat
+ qDollarFormat := qrDollarFormat
+ if qDollarFormat != "" {
+ if err := r.SetQueryParam("$format", qDollarFormat); err != nil {
+ return err
+ }
+ }
+
+ if o.DollarOrderby != nil {
+
+ // query param $orderby
+ var qrDollarOrderby string
+ if o.DollarOrderby != nil {
+ qrDollarOrderby = *o.DollarOrderby
+ }
+ qDollarOrderby := qrDollarOrderby
+ if qDollarOrderby != "" {
+ if err := r.SetQueryParam("$orderby", qDollarOrderby); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.DollarSelect != nil {
+
+ // query param $select
+ var qrDollarSelect string
+ if o.DollarSelect != nil {
+ qrDollarSelect = *o.DollarSelect
+ }
+ qDollarSelect := qrDollarSelect
+ if qDollarSelect != "" {
+ if err := r.SetQueryParam("$select", qDollarSelect); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.DollarSkip != nil {
+
+ // query param $skip
+ var qrDollarSkip string
+ if o.DollarSkip != nil {
+ qrDollarSkip = *o.DollarSkip
+ }
+ qDollarSkip := qrDollarSkip
+ if qDollarSkip != "" {
+ if err := r.SetQueryParam("$skip", qDollarSkip); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.DollarTop != nil {
+
+ // query param $top
+ var qrDollarTop int64
+ if o.DollarTop != nil {
+ qrDollarTop = *o.DollarTop
+ }
+ qDollarTop := swag.FormatInt64(qrDollarTop)
+ if qDollarTop != "" {
+ if err := r.SetQueryParam("$top", qDollarTop); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ // path param City
+ if err := r.SetPathParam("City", o.City); err != nil {
+ return err
+ }
+
+ if o.Health != nil {
+
+ // query param health
+ var qrHealth string
+ if o.Health != nil {
+ qrHealth = *o.Health
+ }
+ qHealth := qrHealth
+ if qHealth != "" {
+ if err := r.SetQueryParam("health", qHealth); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/bus/v2/client/city_bus/city_bus_api_first_last_trip_info_responses.go b/bus/v2/client/city_bus/city_bus_api_first_last_trip_info_responses.go
new file mode 100644
index 00000000..556a3cd1
--- /dev/null
+++ b/bus/v2/client/city_bus/city_bus_api_first_last_trip_info_responses.go
@@ -0,0 +1,106 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+package city_bus
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+ "github.com/go-openapi/strfmt"
+
+ "github.com/minchao/go-ptx/bus/v2/models"
+)
+
+// CityBusAPIFirstLastTripInfoReader is a Reader for the CityBusAPIFirstLastTripInfo structure.
+type CityBusAPIFirstLastTripInfoReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *CityBusAPIFirstLastTripInfoReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+ case 200:
+ result := NewCityBusAPIFirstLastTripInfoOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+ case 299:
+ result := NewCityBusAPIFirstLastTripInfoStatus299()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
+ }
+}
+
+// NewCityBusAPIFirstLastTripInfoOK creates a CityBusAPIFirstLastTripInfoOK with default headers values
+func NewCityBusAPIFirstLastTripInfoOK() *CityBusAPIFirstLastTripInfoOK {
+ return &CityBusAPIFirstLastTripInfoOK{}
+}
+
+/*CityBusAPIFirstLastTripInfoOK handles this case with default header values.
+
+OK
+*/
+type CityBusAPIFirstLastTripInfoOK struct {
+ Payload []*models.ServiceDTOVersion2BusBusFirstLastTripInfo
+}
+
+func (o *CityBusAPIFirstLastTripInfoOK) Error() string {
+ return fmt.Sprintf("[GET /v2/Bus/FirstLastTripInfo/City/{City}][%d] cityBusApiFirstLastTripInfoOK %+v", 200, o.Payload)
+}
+
+func (o *CityBusAPIFirstLastTripInfoOK) GetPayload() []*models.ServiceDTOVersion2BusBusFirstLastTripInfo {
+ return o.Payload
+}
+
+func (o *CityBusAPIFirstLastTripInfoOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ // response payload
+ if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
+
+// NewCityBusAPIFirstLastTripInfoStatus299 creates a CityBusAPIFirstLastTripInfoStatus299 with default headers values
+func NewCityBusAPIFirstLastTripInfoStatus299() *CityBusAPIFirstLastTripInfoStatus299 {
+ return &CityBusAPIFirstLastTripInfoStatus299{}
+}
+
+/*CityBusAPIFirstLastTripInfoStatus299 handles this case with default header values.
+
+加入參數'?health=true'即可查詢此API服務的健康狀態
+*/
+type CityBusAPIFirstLastTripInfoStatus299 struct {
+ Payload *models.ServiceDTOVersion3BaseDisplayHealth
+}
+
+func (o *CityBusAPIFirstLastTripInfoStatus299) Error() string {
+ return fmt.Sprintf("[GET /v2/Bus/FirstLastTripInfo/City/{City}][%d] cityBusApiFirstLastTripInfoStatus299 %+v", 299, o.Payload)
+}
+
+func (o *CityBusAPIFirstLastTripInfoStatus299) GetPayload() *models.ServiceDTOVersion3BaseDisplayHealth {
+ return o.Payload
+}
+
+func (o *CityBusAPIFirstLastTripInfoStatus299) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.ServiceDTOVersion3BaseDisplayHealth)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/bus/v2/client/city_bus/city_bus_api_news_responses.go b/bus/v2/client/city_bus/city_bus_api_news_responses.go
index 977aa1fe..0291e1e9 100644
--- a/bus/v2/client/city_bus/city_bus_api_news_responses.go
+++ b/bus/v2/client/city_bus/city_bus_api_news_responses.go
@@ -37,7 +37,7 @@ func (o *CityBusAPINewsReader) ReadResponse(response runtime.ClientResponse, con
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/bus/v2/client/city_bus/city_bus_api_operator_responses.go b/bus/v2/client/city_bus/city_bus_api_operator_responses.go
index ec07efd5..bfd9a4b4 100644
--- a/bus/v2/client/city_bus/city_bus_api_operator_responses.go
+++ b/bus/v2/client/city_bus/city_bus_api_operator_responses.go
@@ -37,7 +37,7 @@ func (o *CityBusAPIOperatorReader) ReadResponse(response runtime.ClientResponse,
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/bus/v2/client/city_bus/city_bus_api_real_time_by_frequency1_responses.go b/bus/v2/client/city_bus/city_bus_api_real_time_by_frequency1_responses.go
index 67f3f2b2..d2d176cf 100644
--- a/bus/v2/client/city_bus/city_bus_api_real_time_by_frequency1_responses.go
+++ b/bus/v2/client/city_bus/city_bus_api_real_time_by_frequency1_responses.go
@@ -37,7 +37,7 @@ func (o *CityBusAPIRealTimeByFrequency1Reader) ReadResponse(response runtime.Cli
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/bus/v2/client/city_bus/city_bus_api_real_time_by_frequency_responses.go b/bus/v2/client/city_bus/city_bus_api_real_time_by_frequency_responses.go
index b47a9962..e132e090 100644
--- a/bus/v2/client/city_bus/city_bus_api_real_time_by_frequency_responses.go
+++ b/bus/v2/client/city_bus/city_bus_api_real_time_by_frequency_responses.go
@@ -37,7 +37,7 @@ func (o *CityBusAPIRealTimeByFrequencyReader) ReadResponse(response runtime.Clie
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/bus/v2/client/city_bus/city_bus_api_real_time_by_frequency_udp_1_responses.go b/bus/v2/client/city_bus/city_bus_api_real_time_by_frequency_udp_1_responses.go
index 8fd0718f..ecb632a9 100644
--- a/bus/v2/client/city_bus/city_bus_api_real_time_by_frequency_udp_1_responses.go
+++ b/bus/v2/client/city_bus/city_bus_api_real_time_by_frequency_udp_1_responses.go
@@ -37,7 +37,7 @@ func (o *CityBusAPIRealTimeByFrequencyUDP1Reader) ReadResponse(response runtime.
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/bus/v2/client/city_bus/city_bus_api_real_time_by_frequency_udp_responses.go b/bus/v2/client/city_bus/city_bus_api_real_time_by_frequency_udp_responses.go
index 3d49010d..f4ab0431 100644
--- a/bus/v2/client/city_bus/city_bus_api_real_time_by_frequency_udp_responses.go
+++ b/bus/v2/client/city_bus/city_bus_api_real_time_by_frequency_udp_responses.go
@@ -37,7 +37,7 @@ func (o *CityBusAPIRealTimeByFrequencyUDPReader) ReadResponse(response runtime.C
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/bus/v2/client/city_bus/city_bus_api_real_time_near_stop1_responses.go b/bus/v2/client/city_bus/city_bus_api_real_time_near_stop1_responses.go
index a64b9a26..f8d5b38b 100644
--- a/bus/v2/client/city_bus/city_bus_api_real_time_near_stop1_responses.go
+++ b/bus/v2/client/city_bus/city_bus_api_real_time_near_stop1_responses.go
@@ -37,7 +37,7 @@ func (o *CityBusAPIRealTimeNearStop1Reader) ReadResponse(response runtime.Client
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/bus/v2/client/city_bus/city_bus_api_real_time_near_stop_responses.go b/bus/v2/client/city_bus/city_bus_api_real_time_near_stop_responses.go
index 9ccb187c..0c388a28 100644
--- a/bus/v2/client/city_bus/city_bus_api_real_time_near_stop_responses.go
+++ b/bus/v2/client/city_bus/city_bus_api_real_time_near_stop_responses.go
@@ -37,7 +37,7 @@ func (o *CityBusAPIRealTimeNearStopReader) ReadResponse(response runtime.ClientR
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/bus/v2/client/city_bus/city_bus_api_real_time_near_stop_udp_1_responses.go b/bus/v2/client/city_bus/city_bus_api_real_time_near_stop_udp_1_responses.go
index 20e8f1bb..ce82a156 100644
--- a/bus/v2/client/city_bus/city_bus_api_real_time_near_stop_udp_1_responses.go
+++ b/bus/v2/client/city_bus/city_bus_api_real_time_near_stop_udp_1_responses.go
@@ -37,7 +37,7 @@ func (o *CityBusAPIRealTimeNearStopUDP1Reader) ReadResponse(response runtime.Cli
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/bus/v2/client/city_bus/city_bus_api_real_time_near_stop_udp_responses.go b/bus/v2/client/city_bus/city_bus_api_real_time_near_stop_udp_responses.go
index e6eaebd4..65786209 100644
--- a/bus/v2/client/city_bus/city_bus_api_real_time_near_stop_udp_responses.go
+++ b/bus/v2/client/city_bus/city_bus_api_real_time_near_stop_udp_responses.go
@@ -37,7 +37,7 @@ func (o *CityBusAPIRealTimeNearStopUDPReader) ReadResponse(response runtime.Clie
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/bus/v2/client/city_bus/city_bus_api_route1_responses.go b/bus/v2/client/city_bus/city_bus_api_route1_responses.go
index 124e7752..7a921fb2 100644
--- a/bus/v2/client/city_bus/city_bus_api_route1_responses.go
+++ b/bus/v2/client/city_bus/city_bus_api_route1_responses.go
@@ -37,7 +37,7 @@ func (o *CityBusAPIRoute1Reader) ReadResponse(response runtime.ClientResponse, c
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/bus/v2/client/city_bus/city_bus_api_route_fare1_responses.go b/bus/v2/client/city_bus/city_bus_api_route_fare1_responses.go
index e188ccc9..ca366c24 100644
--- a/bus/v2/client/city_bus/city_bus_api_route_fare1_responses.go
+++ b/bus/v2/client/city_bus/city_bus_api_route_fare1_responses.go
@@ -37,7 +37,7 @@ func (o *CityBusAPIRouteFare1Reader) ReadResponse(response runtime.ClientRespons
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/bus/v2/client/city_bus/city_bus_api_route_fare_responses.go b/bus/v2/client/city_bus/city_bus_api_route_fare_responses.go
index b347a464..5091aad4 100644
--- a/bus/v2/client/city_bus/city_bus_api_route_fare_responses.go
+++ b/bus/v2/client/city_bus/city_bus_api_route_fare_responses.go
@@ -37,7 +37,7 @@ func (o *CityBusAPIRouteFareReader) ReadResponse(response runtime.ClientResponse
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/bus/v2/client/city_bus/city_bus_api_route_responses.go b/bus/v2/client/city_bus/city_bus_api_route_responses.go
index 83ab57c4..4e729025 100644
--- a/bus/v2/client/city_bus/city_bus_api_route_responses.go
+++ b/bus/v2/client/city_bus/city_bus_api_route_responses.go
@@ -37,7 +37,7 @@ func (o *CityBusAPIRouteReader) ReadResponse(response runtime.ClientResponse, co
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/bus/v2/client/city_bus/city_bus_api_schedule1_responses.go b/bus/v2/client/city_bus/city_bus_api_schedule1_responses.go
index 61517837..00543865 100644
--- a/bus/v2/client/city_bus/city_bus_api_schedule1_responses.go
+++ b/bus/v2/client/city_bus/city_bus_api_schedule1_responses.go
@@ -37,7 +37,7 @@ func (o *CityBusAPISchedule1Reader) ReadResponse(response runtime.ClientResponse
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/bus/v2/client/city_bus/city_bus_api_schedule_responses.go b/bus/v2/client/city_bus/city_bus_api_schedule_responses.go
index 2aa6ed53..1cb41ba2 100644
--- a/bus/v2/client/city_bus/city_bus_api_schedule_responses.go
+++ b/bus/v2/client/city_bus/city_bus_api_schedule_responses.go
@@ -37,7 +37,7 @@ func (o *CityBusAPIScheduleReader) ReadResponse(response runtime.ClientResponse,
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/bus/v2/client/city_bus/city_bus_api_shape1_responses.go b/bus/v2/client/city_bus/city_bus_api_shape1_responses.go
index 5bc812bf..5d5e0883 100644
--- a/bus/v2/client/city_bus/city_bus_api_shape1_responses.go
+++ b/bus/v2/client/city_bus/city_bus_api_shape1_responses.go
@@ -37,7 +37,7 @@ func (o *CityBusAPIShape1Reader) ReadResponse(response runtime.ClientResponse, c
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/bus/v2/client/city_bus/city_bus_api_shape_responses.go b/bus/v2/client/city_bus/city_bus_api_shape_responses.go
index ab4f3470..866ff4f4 100644
--- a/bus/v2/client/city_bus/city_bus_api_shape_responses.go
+++ b/bus/v2/client/city_bus/city_bus_api_shape_responses.go
@@ -37,7 +37,7 @@ func (o *CityBusAPIShapeReader) ReadResponse(response runtime.ClientResponse, co
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/bus/v2/client/city_bus/city_bus_api_station_group_responses.go b/bus/v2/client/city_bus/city_bus_api_station_group_responses.go
index d8d0470a..0de7174a 100644
--- a/bus/v2/client/city_bus/city_bus_api_station_group_responses.go
+++ b/bus/v2/client/city_bus/city_bus_api_station_group_responses.go
@@ -37,7 +37,7 @@ func (o *CityBusAPIStationGroupReader) ReadResponse(response runtime.ClientRespo
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/bus/v2/client/city_bus/city_bus_api_station_name_parameters.go b/bus/v2/client/city_bus/city_bus_api_station_name_parameters.go
deleted file mode 100644
index fa6acb1c..00000000
--- a/bus/v2/client/city_bus/city_bus_api_station_name_parameters.go
+++ /dev/null
@@ -1,397 +0,0 @@
-// Code generated by go-swagger; DO NOT EDIT.
-
-package city_bus
-
-// This file was generated by the swagger tool.
-// Editing this file might prove futile when you re-run the swagger generate command
-
-import (
- "context"
- "net/http"
- "time"
-
- "github.com/go-openapi/errors"
- "github.com/go-openapi/runtime"
- cr "github.com/go-openapi/runtime/client"
- "github.com/go-openapi/strfmt"
- "github.com/go-openapi/swag"
-)
-
-// NewCityBusAPIStationNameParams creates a new CityBusAPIStationNameParams object
-// with the default values initialized.
-func NewCityBusAPIStationNameParams() *CityBusAPIStationNameParams {
- var (
- dollarTopDefault = int64(30)
- )
- return &CityBusAPIStationNameParams{
- DollarTop: &dollarTopDefault,
-
- timeout: cr.DefaultTimeout,
- }
-}
-
-// NewCityBusAPIStationNameParamsWithTimeout creates a new CityBusAPIStationNameParams object
-// with the default values initialized, and the ability to set a timeout on a request
-func NewCityBusAPIStationNameParamsWithTimeout(timeout time.Duration) *CityBusAPIStationNameParams {
- var (
- dollarTopDefault = int64(30)
- )
- return &CityBusAPIStationNameParams{
- DollarTop: &dollarTopDefault,
-
- timeout: timeout,
- }
-}
-
-// NewCityBusAPIStationNameParamsWithContext creates a new CityBusAPIStationNameParams object
-// with the default values initialized, and the ability to set a context for a request
-func NewCityBusAPIStationNameParamsWithContext(ctx context.Context) *CityBusAPIStationNameParams {
- var (
- dollarTopDefault = int64(30)
- )
- return &CityBusAPIStationNameParams{
- DollarTop: &dollarTopDefault,
-
- Context: ctx,
- }
-}
-
-// NewCityBusAPIStationNameParamsWithHTTPClient creates a new CityBusAPIStationNameParams object
-// with the default values initialized, and the ability to set a custom HTTPClient for a request
-func NewCityBusAPIStationNameParamsWithHTTPClient(client *http.Client) *CityBusAPIStationNameParams {
- var (
- dollarTopDefault = int64(30)
- )
- return &CityBusAPIStationNameParams{
- DollarTop: &dollarTopDefault,
- HTTPClient: client,
- }
-}
-
-/*CityBusAPIStationNameParams contains all the parameters to send to the API endpoint
-for the city bus Api station name operation typically these are written to a http.Request
-*/
-type CityBusAPIStationNameParams struct {
-
- /*DollarFilter
- 過濾
-
- */
- DollarFilter *string
- /*DollarFormat
- 指定來源格式
-
- */
- DollarFormat string
- /*DollarOrderby
- 排序
-
- */
- DollarOrderby *string
- /*DollarSelect
- 挑選
-
- */
- DollarSelect *string
- /*DollarSkip
- 跳過前幾筆
-
- */
- DollarSkip *string
- /*DollarSpatialFilter
- 空間過濾
-
- */
- DollarSpatialFilter *string
- /*DollarTop
- 取前幾筆
-
- */
- DollarTop *int64
- /*City
- 欲查詢縣市
-
- */
- City string
- /*Health
- 加入參數'?health=true'即可查詢此API服務的健康狀態
-
- */
- Health *string
-
- timeout time.Duration
- Context context.Context
- HTTPClient *http.Client
-}
-
-// WithTimeout adds the timeout to the city bus Api station name params
-func (o *CityBusAPIStationNameParams) WithTimeout(timeout time.Duration) *CityBusAPIStationNameParams {
- o.SetTimeout(timeout)
- return o
-}
-
-// SetTimeout adds the timeout to the city bus Api station name params
-func (o *CityBusAPIStationNameParams) SetTimeout(timeout time.Duration) {
- o.timeout = timeout
-}
-
-// WithContext adds the context to the city bus Api station name params
-func (o *CityBusAPIStationNameParams) WithContext(ctx context.Context) *CityBusAPIStationNameParams {
- o.SetContext(ctx)
- return o
-}
-
-// SetContext adds the context to the city bus Api station name params
-func (o *CityBusAPIStationNameParams) SetContext(ctx context.Context) {
- o.Context = ctx
-}
-
-// WithHTTPClient adds the HTTPClient to the city bus Api station name params
-func (o *CityBusAPIStationNameParams) WithHTTPClient(client *http.Client) *CityBusAPIStationNameParams {
- o.SetHTTPClient(client)
- return o
-}
-
-// SetHTTPClient adds the HTTPClient to the city bus Api station name params
-func (o *CityBusAPIStationNameParams) SetHTTPClient(client *http.Client) {
- o.HTTPClient = client
-}
-
-// WithDollarFilter adds the dollarFilter to the city bus Api station name params
-func (o *CityBusAPIStationNameParams) WithDollarFilter(dollarFilter *string) *CityBusAPIStationNameParams {
- o.SetDollarFilter(dollarFilter)
- return o
-}
-
-// SetDollarFilter adds the dollarFilter to the city bus Api station name params
-func (o *CityBusAPIStationNameParams) SetDollarFilter(dollarFilter *string) {
- o.DollarFilter = dollarFilter
-}
-
-// WithDollarFormat adds the dollarFormat to the city bus Api station name params
-func (o *CityBusAPIStationNameParams) WithDollarFormat(dollarFormat string) *CityBusAPIStationNameParams {
- o.SetDollarFormat(dollarFormat)
- return o
-}
-
-// SetDollarFormat adds the dollarFormat to the city bus Api station name params
-func (o *CityBusAPIStationNameParams) SetDollarFormat(dollarFormat string) {
- o.DollarFormat = dollarFormat
-}
-
-// WithDollarOrderby adds the dollarOrderby to the city bus Api station name params
-func (o *CityBusAPIStationNameParams) WithDollarOrderby(dollarOrderby *string) *CityBusAPIStationNameParams {
- o.SetDollarOrderby(dollarOrderby)
- return o
-}
-
-// SetDollarOrderby adds the dollarOrderby to the city bus Api station name params
-func (o *CityBusAPIStationNameParams) SetDollarOrderby(dollarOrderby *string) {
- o.DollarOrderby = dollarOrderby
-}
-
-// WithDollarSelect adds the dollarSelect to the city bus Api station name params
-func (o *CityBusAPIStationNameParams) WithDollarSelect(dollarSelect *string) *CityBusAPIStationNameParams {
- o.SetDollarSelect(dollarSelect)
- return o
-}
-
-// SetDollarSelect adds the dollarSelect to the city bus Api station name params
-func (o *CityBusAPIStationNameParams) SetDollarSelect(dollarSelect *string) {
- o.DollarSelect = dollarSelect
-}
-
-// WithDollarSkip adds the dollarSkip to the city bus Api station name params
-func (o *CityBusAPIStationNameParams) WithDollarSkip(dollarSkip *string) *CityBusAPIStationNameParams {
- o.SetDollarSkip(dollarSkip)
- return o
-}
-
-// SetDollarSkip adds the dollarSkip to the city bus Api station name params
-func (o *CityBusAPIStationNameParams) SetDollarSkip(dollarSkip *string) {
- o.DollarSkip = dollarSkip
-}
-
-// WithDollarSpatialFilter adds the dollarSpatialFilter to the city bus Api station name params
-func (o *CityBusAPIStationNameParams) WithDollarSpatialFilter(dollarSpatialFilter *string) *CityBusAPIStationNameParams {
- o.SetDollarSpatialFilter(dollarSpatialFilter)
- return o
-}
-
-// SetDollarSpatialFilter adds the dollarSpatialFilter to the city bus Api station name params
-func (o *CityBusAPIStationNameParams) SetDollarSpatialFilter(dollarSpatialFilter *string) {
- o.DollarSpatialFilter = dollarSpatialFilter
-}
-
-// WithDollarTop adds the dollarTop to the city bus Api station name params
-func (o *CityBusAPIStationNameParams) WithDollarTop(dollarTop *int64) *CityBusAPIStationNameParams {
- o.SetDollarTop(dollarTop)
- return o
-}
-
-// SetDollarTop adds the dollarTop to the city bus Api station name params
-func (o *CityBusAPIStationNameParams) SetDollarTop(dollarTop *int64) {
- o.DollarTop = dollarTop
-}
-
-// WithCity adds the city to the city bus Api station name params
-func (o *CityBusAPIStationNameParams) WithCity(city string) *CityBusAPIStationNameParams {
- o.SetCity(city)
- return o
-}
-
-// SetCity adds the city to the city bus Api station name params
-func (o *CityBusAPIStationNameParams) SetCity(city string) {
- o.City = city
-}
-
-// WithHealth adds the health to the city bus Api station name params
-func (o *CityBusAPIStationNameParams) WithHealth(health *string) *CityBusAPIStationNameParams {
- o.SetHealth(health)
- return o
-}
-
-// SetHealth adds the health to the city bus Api station name params
-func (o *CityBusAPIStationNameParams) SetHealth(health *string) {
- o.Health = health
-}
-
-// WriteToRequest writes these params to a swagger request
-func (o *CityBusAPIStationNameParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
-
- if err := r.SetTimeout(o.timeout); err != nil {
- return err
- }
- var res []error
-
- if o.DollarFilter != nil {
-
- // query param $filter
- var qrDollarFilter string
- if o.DollarFilter != nil {
- qrDollarFilter = *o.DollarFilter
- }
- qDollarFilter := qrDollarFilter
- if qDollarFilter != "" {
- if err := r.SetQueryParam("$filter", qDollarFilter); err != nil {
- return err
- }
- }
-
- }
-
- // query param $format
- qrDollarFormat := o.DollarFormat
- qDollarFormat := qrDollarFormat
- if qDollarFormat != "" {
- if err := r.SetQueryParam("$format", qDollarFormat); err != nil {
- return err
- }
- }
-
- if o.DollarOrderby != nil {
-
- // query param $orderby
- var qrDollarOrderby string
- if o.DollarOrderby != nil {
- qrDollarOrderby = *o.DollarOrderby
- }
- qDollarOrderby := qrDollarOrderby
- if qDollarOrderby != "" {
- if err := r.SetQueryParam("$orderby", qDollarOrderby); err != nil {
- return err
- }
- }
-
- }
-
- if o.DollarSelect != nil {
-
- // query param $select
- var qrDollarSelect string
- if o.DollarSelect != nil {
- qrDollarSelect = *o.DollarSelect
- }
- qDollarSelect := qrDollarSelect
- if qDollarSelect != "" {
- if err := r.SetQueryParam("$select", qDollarSelect); err != nil {
- return err
- }
- }
-
- }
-
- if o.DollarSkip != nil {
-
- // query param $skip
- var qrDollarSkip string
- if o.DollarSkip != nil {
- qrDollarSkip = *o.DollarSkip
- }
- qDollarSkip := qrDollarSkip
- if qDollarSkip != "" {
- if err := r.SetQueryParam("$skip", qDollarSkip); err != nil {
- return err
- }
- }
-
- }
-
- if o.DollarSpatialFilter != nil {
-
- // query param $spatialFilter
- var qrDollarSpatialFilter string
- if o.DollarSpatialFilter != nil {
- qrDollarSpatialFilter = *o.DollarSpatialFilter
- }
- qDollarSpatialFilter := qrDollarSpatialFilter
- if qDollarSpatialFilter != "" {
- if err := r.SetQueryParam("$spatialFilter", qDollarSpatialFilter); err != nil {
- return err
- }
- }
-
- }
-
- if o.DollarTop != nil {
-
- // query param $top
- var qrDollarTop int64
- if o.DollarTop != nil {
- qrDollarTop = *o.DollarTop
- }
- qDollarTop := swag.FormatInt64(qrDollarTop)
- if qDollarTop != "" {
- if err := r.SetQueryParam("$top", qDollarTop); err != nil {
- return err
- }
- }
-
- }
-
- // path param City
- if err := r.SetPathParam("City", o.City); err != nil {
- return err
- }
-
- if o.Health != nil {
-
- // query param health
- var qrHealth string
- if o.Health != nil {
- qrHealth = *o.Health
- }
- qHealth := qrHealth
- if qHealth != "" {
- if err := r.SetQueryParam("health", qHealth); err != nil {
- return err
- }
- }
-
- }
-
- if len(res) > 0 {
- return errors.CompositeValidationError(res...)
- }
- return nil
-}
diff --git a/bus/v2/client/city_bus/city_bus_api_station_name_responses.go b/bus/v2/client/city_bus/city_bus_api_station_name_responses.go
deleted file mode 100644
index 159c913b..00000000
--- a/bus/v2/client/city_bus/city_bus_api_station_name_responses.go
+++ /dev/null
@@ -1,106 +0,0 @@
-// Code generated by go-swagger; DO NOT EDIT.
-
-package city_bus
-
-// This file was generated by the swagger tool.
-// Editing this file might prove futile when you re-run the swagger generate command
-
-import (
- "fmt"
- "io"
-
- "github.com/go-openapi/runtime"
- "github.com/go-openapi/strfmt"
-
- "github.com/minchao/go-ptx/bus/v2/models"
-)
-
-// CityBusAPIStationNameReader is a Reader for the CityBusAPIStationName structure.
-type CityBusAPIStationNameReader struct {
- formats strfmt.Registry
-}
-
-// ReadResponse reads a server response into the received o.
-func (o *CityBusAPIStationNameReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
- switch response.Code() {
- case 200:
- result := NewCityBusAPIStationNameOK()
- if err := result.readResponse(response, consumer, o.formats); err != nil {
- return nil, err
- }
- return result, nil
- case 299:
- result := NewCityBusAPIStationNameStatus299()
- if err := result.readResponse(response, consumer, o.formats); err != nil {
- return nil, err
- }
- return result, nil
-
- default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
- }
-}
-
-// NewCityBusAPIStationNameOK creates a CityBusAPIStationNameOK with default headers values
-func NewCityBusAPIStationNameOK() *CityBusAPIStationNameOK {
- return &CityBusAPIStationNameOK{}
-}
-
-/*CityBusAPIStationNameOK handles this case with default header values.
-
-OK
-*/
-type CityBusAPIStationNameOK struct {
- Payload []*models.ServiceDTOVersion2BusBusStationName
-}
-
-func (o *CityBusAPIStationNameOK) Error() string {
- return fmt.Sprintf("[GET /v2/Bus/StationName/City/{City}][%d] cityBusApiStationNameOK %+v", 200, o.Payload)
-}
-
-func (o *CityBusAPIStationNameOK) GetPayload() []*models.ServiceDTOVersion2BusBusStationName {
- return o.Payload
-}
-
-func (o *CityBusAPIStationNameOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
-
- // response payload
- if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF {
- return err
- }
-
- return nil
-}
-
-// NewCityBusAPIStationNameStatus299 creates a CityBusAPIStationNameStatus299 with default headers values
-func NewCityBusAPIStationNameStatus299() *CityBusAPIStationNameStatus299 {
- return &CityBusAPIStationNameStatus299{}
-}
-
-/*CityBusAPIStationNameStatus299 handles this case with default header values.
-
-加入參數'?health=true'即可查詢此API服務的健康狀態
-*/
-type CityBusAPIStationNameStatus299 struct {
- Payload *models.ServiceDTOVersion3BaseDisplayHealth
-}
-
-func (o *CityBusAPIStationNameStatus299) Error() string {
- return fmt.Sprintf("[GET /v2/Bus/StationName/City/{City}][%d] cityBusApiStationNameStatus299 %+v", 299, o.Payload)
-}
-
-func (o *CityBusAPIStationNameStatus299) GetPayload() *models.ServiceDTOVersion3BaseDisplayHealth {
- return o.Payload
-}
-
-func (o *CityBusAPIStationNameStatus299) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
-
- o.Payload = new(models.ServiceDTOVersion3BaseDisplayHealth)
-
- // response payload
- if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
- return err
- }
-
- return nil
-}
diff --git a/bus/v2/client/city_bus/city_bus_api_station_responses.go b/bus/v2/client/city_bus/city_bus_api_station_responses.go
index 1efa62e6..e6db0c14 100644
--- a/bus/v2/client/city_bus/city_bus_api_station_responses.go
+++ b/bus/v2/client/city_bus/city_bus_api_station_responses.go
@@ -37,7 +37,7 @@ func (o *CityBusAPIStationReader) ReadResponse(response runtime.ClientResponse,
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/bus/v2/client/city_bus/city_bus_api_stop_of_route1_responses.go b/bus/v2/client/city_bus/city_bus_api_stop_of_route1_responses.go
index 5807888b..918d2111 100644
--- a/bus/v2/client/city_bus/city_bus_api_stop_of_route1_responses.go
+++ b/bus/v2/client/city_bus/city_bus_api_stop_of_route1_responses.go
@@ -37,7 +37,7 @@ func (o *CityBusAPIStopOfRoute1Reader) ReadResponse(response runtime.ClientRespo
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/bus/v2/client/city_bus/city_bus_api_stop_of_route_responses.go b/bus/v2/client/city_bus/city_bus_api_stop_of_route_responses.go
index 4c0d0ccd..6e700e00 100644
--- a/bus/v2/client/city_bus/city_bus_api_stop_of_route_responses.go
+++ b/bus/v2/client/city_bus/city_bus_api_stop_of_route_responses.go
@@ -37,7 +37,7 @@ func (o *CityBusAPIStopOfRouteReader) ReadResponse(response runtime.ClientRespon
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/bus/v2/client/city_bus/city_bus_api_stop_responses.go b/bus/v2/client/city_bus/city_bus_api_stop_responses.go
index 8679db93..5fe13356 100644
--- a/bus/v2/client/city_bus/city_bus_api_stop_responses.go
+++ b/bus/v2/client/city_bus/city_bus_api_stop_responses.go
@@ -37,7 +37,7 @@ func (o *CityBusAPIStopReader) ReadResponse(response runtime.ClientResponse, con
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/bus/v2/client/city_bus/city_bus_api_vehicle_responses.go b/bus/v2/client/city_bus/city_bus_api_vehicle_responses.go
index d233616f..0ebfdc06 100644
--- a/bus/v2/client/city_bus/city_bus_api_vehicle_responses.go
+++ b/bus/v2/client/city_bus/city_bus_api_vehicle_responses.go
@@ -37,7 +37,7 @@ func (o *CityBusAPIVehicleReader) ReadResponse(response runtime.ClientResponse,
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/bus/v2/client/city_bus/city_bus_client.go b/bus/v2/client/city_bus/city_bus_client.go
index 56293fc9..3cf89219 100644
--- a/bus/v2/client/city_bus/city_bus_client.go
+++ b/bus/v2/client/city_bus/city_bus_client.go
@@ -41,6 +41,10 @@ type ClientService interface {
CityBusAPIEstimatedTimeOfArrivalUDP1(params *CityBusAPIEstimatedTimeOfArrivalUDP1Params) (*CityBusAPIEstimatedTimeOfArrivalUdp1OK, *CityBusAPIEstimatedTimeOfArrivalUdp1Status299, error)
+ CityBusAPIFirstLastTripInfo(params *CityBusAPIFirstLastTripInfoParams) (*CityBusAPIFirstLastTripInfoOK, *CityBusAPIFirstLastTripInfoStatus299, error)
+
+ CityBusAPIFirstLastTripInfo1(params *CityBusAPIFirstLastTripInfo1Params) (*CityBusAPIFirstLastTripInfo1OK, *CityBusAPIFirstLastTripInfo1Status299, error)
+
CityBusAPINews(params *CityBusAPINewsParams) (*CityBusAPINewsOK, *CityBusAPINewsStatus299, error)
CityBusAPIOperator(params *CityBusAPIOperatorParams) (*CityBusAPIOperatorOK, *CityBusAPIOperatorStatus299, error)
@@ -81,8 +85,6 @@ type ClientService interface {
CityBusAPIStationGroup(params *CityBusAPIStationGroupParams) (*CityBusAPIStationGroupOK, *CityBusAPIStationGroupStatus299, error)
- CityBusAPIStationName(params *CityBusAPIStationNameParams) (*CityBusAPIStationNameOK, *CityBusAPIStationNameStatus299, error)
-
CityBusAPIStop(params *CityBusAPIStopParams) (*CityBusAPIStopOK, *CityBusAPIStopStatus299, error)
CityBusAPIStopOfRoute(params *CityBusAPIStopOfRouteParams) (*CityBusAPIStopOfRouteOK, *CityBusAPIStopOfRouteStatus299, error)
@@ -363,6 +365,80 @@ func (a *Client) CityBusAPIEstimatedTimeOfArrivalUDP1(params *CityBusAPIEstimate
panic(msg)
}
+/*
+ CityBusAPIFirstLastTripInfo 取得指定s 縣市 的市區公車路線首末班車資料
+
+ 市區公車之路線首末班車資料
+*/
+func (a *Client) CityBusAPIFirstLastTripInfo(params *CityBusAPIFirstLastTripInfoParams) (*CityBusAPIFirstLastTripInfoOK, *CityBusAPIFirstLastTripInfoStatus299, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewCityBusAPIFirstLastTripInfoParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "CityBusApi_FirstLastTripInfo",
+ Method: "GET",
+ PathPattern: "/v2/Bus/FirstLastTripInfo/City/{City}",
+ ProducesMediaTypes: []string{"application/json", "text/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"https"},
+ Params: params,
+ Reader: &CityBusAPIFirstLastTripInfoReader{formats: a.formats},
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, nil, err
+ }
+ switch value := result.(type) {
+ case *CityBusAPIFirstLastTripInfoOK:
+ return value, nil, nil
+ case *CityBusAPIFirstLastTripInfoStatus299:
+ return nil, value, nil
+ }
+ // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
+ msg := fmt.Sprintf("unexpected success response for city_bus: API contract not enforced by server. Client expected to get an error, but got: %T", result)
+ panic(msg)
+}
+
+/*
+ CityBusAPIFirstLastTripInfo1 取得指定s 縣市 路線名稱 的路線首末班車資料
+
+ 市區公車之路線首末班車資料
+*/
+func (a *Client) CityBusAPIFirstLastTripInfo1(params *CityBusAPIFirstLastTripInfo1Params) (*CityBusAPIFirstLastTripInfo1OK, *CityBusAPIFirstLastTripInfo1Status299, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewCityBusAPIFirstLastTripInfo1Params()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "CityBusApi_FirstLastTripInfo_1",
+ Method: "GET",
+ PathPattern: "/v2/Bus/FirstLastTripInfo/City/{City}/{RouteName}",
+ ProducesMediaTypes: []string{"application/json", "text/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"https"},
+ Params: params,
+ Reader: &CityBusAPIFirstLastTripInfo1Reader{formats: a.formats},
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, nil, err
+ }
+ switch value := result.(type) {
+ case *CityBusAPIFirstLastTripInfo1OK:
+ return value, nil, nil
+ case *CityBusAPIFirstLastTripInfo1Status299:
+ return nil, value, nil
+ }
+ // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
+ msg := fmt.Sprintf("unexpected success response for city_bus: API contract not enforced by server. Client expected to get an error, but got: %T", result)
+ panic(msg)
+}
+
/*
CityBusAPINews 取得指定s 縣市 的市區公車最新消息資料
@@ -1111,43 +1187,6 @@ func (a *Client) CityBusAPIStationGroup(params *CityBusAPIStationGroupParams) (*
panic(msg)
}
-/*
- CityBusAPIStationName 取得指定s 縣市 的市區公車站名碼資料
-
- 市區公車之各站牌所屬的站名碼資料
-*/
-func (a *Client) CityBusAPIStationName(params *CityBusAPIStationNameParams) (*CityBusAPIStationNameOK, *CityBusAPIStationNameStatus299, error) {
- // TODO: Validate the params before sending
- if params == nil {
- params = NewCityBusAPIStationNameParams()
- }
-
- result, err := a.transport.Submit(&runtime.ClientOperation{
- ID: "CityBusApi_StationName",
- Method: "GET",
- PathPattern: "/v2/Bus/StationName/City/{City}",
- ProducesMediaTypes: []string{"application/json", "text/json"},
- ConsumesMediaTypes: []string{"application/json"},
- Schemes: []string{"https"},
- Params: params,
- Reader: &CityBusAPIStationNameReader{formats: a.formats},
- Context: params.Context,
- Client: params.HTTPClient,
- })
- if err != nil {
- return nil, nil, err
- }
- switch value := result.(type) {
- case *CityBusAPIStationNameOK:
- return value, nil, nil
- case *CityBusAPIStationNameStatus299:
- return nil, value, nil
- }
- // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
- msg := fmt.Sprintf("unexpected success response for city_bus: API contract not enforced by server. Client expected to get an error, but got: %T", result)
- panic(msg)
-}
-
/*
CityBusAPIStop 取得指定s 縣市 的市區公車站牌資料
diff --git a/bus/v2/client/inter_city_bus/inter_city_bus_api_data_version_responses.go b/bus/v2/client/inter_city_bus/inter_city_bus_api_data_version_responses.go
index c8ff5f31..9c3422fd 100644
--- a/bus/v2/client/inter_city_bus/inter_city_bus_api_data_version_responses.go
+++ b/bus/v2/client/inter_city_bus/inter_city_bus_api_data_version_responses.go
@@ -37,7 +37,7 @@ func (o *InterCityBusAPIDataVersionReader) ReadResponse(response runtime.ClientR
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/bus/v2/client/inter_city_bus/inter_city_bus_api_estimated_time_of_arrival1_responses.go b/bus/v2/client/inter_city_bus/inter_city_bus_api_estimated_time_of_arrival1_responses.go
index 2671ffb5..f971aaeb 100644
--- a/bus/v2/client/inter_city_bus/inter_city_bus_api_estimated_time_of_arrival1_responses.go
+++ b/bus/v2/client/inter_city_bus/inter_city_bus_api_estimated_time_of_arrival1_responses.go
@@ -37,7 +37,7 @@ func (o *InterCityBusAPIEstimatedTimeOfArrival1Reader) ReadResponse(response run
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/bus/v2/client/inter_city_bus/inter_city_bus_api_estimated_time_of_arrival_responses.go b/bus/v2/client/inter_city_bus/inter_city_bus_api_estimated_time_of_arrival_responses.go
index 9b639b2c..1b7956b7 100644
--- a/bus/v2/client/inter_city_bus/inter_city_bus_api_estimated_time_of_arrival_responses.go
+++ b/bus/v2/client/inter_city_bus/inter_city_bus_api_estimated_time_of_arrival_responses.go
@@ -37,7 +37,7 @@ func (o *InterCityBusAPIEstimatedTimeOfArrivalReader) ReadResponse(response runt
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/bus/v2/client/inter_city_bus/inter_city_bus_api_estimated_time_of_arrival_udp_1_responses.go b/bus/v2/client/inter_city_bus/inter_city_bus_api_estimated_time_of_arrival_udp_1_responses.go
index 997cec54..71b53419 100644
--- a/bus/v2/client/inter_city_bus/inter_city_bus_api_estimated_time_of_arrival_udp_1_responses.go
+++ b/bus/v2/client/inter_city_bus/inter_city_bus_api_estimated_time_of_arrival_udp_1_responses.go
@@ -37,7 +37,7 @@ func (o *InterCityBusAPIEstimatedTimeOfArrivalUDP1Reader) ReadResponse(response
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/bus/v2/client/inter_city_bus/inter_city_bus_api_estimated_time_of_arrival_udp_responses.go b/bus/v2/client/inter_city_bus/inter_city_bus_api_estimated_time_of_arrival_udp_responses.go
index 2a7bb3e2..c96c3805 100644
--- a/bus/v2/client/inter_city_bus/inter_city_bus_api_estimated_time_of_arrival_udp_responses.go
+++ b/bus/v2/client/inter_city_bus/inter_city_bus_api_estimated_time_of_arrival_udp_responses.go
@@ -37,7 +37,7 @@ func (o *InterCityBusAPIEstimatedTimeOfArrivalUDPReader) ReadResponse(response r
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/bus/v2/client/inter_city_bus/inter_city_bus_api_news_responses.go b/bus/v2/client/inter_city_bus/inter_city_bus_api_news_responses.go
index 8d12739e..ea4ab044 100644
--- a/bus/v2/client/inter_city_bus/inter_city_bus_api_news_responses.go
+++ b/bus/v2/client/inter_city_bus/inter_city_bus_api_news_responses.go
@@ -37,7 +37,7 @@ func (o *InterCityBusAPINewsReader) ReadResponse(response runtime.ClientResponse
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/bus/v2/client/inter_city_bus/inter_city_bus_api_operator_responses.go b/bus/v2/client/inter_city_bus/inter_city_bus_api_operator_responses.go
index dea46e94..21c75315 100644
--- a/bus/v2/client/inter_city_bus/inter_city_bus_api_operator_responses.go
+++ b/bus/v2/client/inter_city_bus/inter_city_bus_api_operator_responses.go
@@ -37,7 +37,7 @@ func (o *InterCityBusAPIOperatorReader) ReadResponse(response runtime.ClientResp
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/bus/v2/client/inter_city_bus/inter_city_bus_api_real_time_by_frequency2_parameters.go b/bus/v2/client/inter_city_bus/inter_city_bus_api_real_time_by_frequency1_parameters.go
similarity index 63%
rename from bus/v2/client/inter_city_bus/inter_city_bus_api_real_time_by_frequency2_parameters.go
rename to bus/v2/client/inter_city_bus/inter_city_bus_api_real_time_by_frequency1_parameters.go
index f5bd30f9..866a6b5e 100644
--- a/bus/v2/client/inter_city_bus/inter_city_bus_api_real_time_by_frequency2_parameters.go
+++ b/bus/v2/client/inter_city_bus/inter_city_bus_api_real_time_by_frequency1_parameters.go
@@ -17,61 +17,61 @@ import (
"github.com/go-openapi/swag"
)
-// NewInterCityBusAPIRealTimeByFrequency2Params creates a new InterCityBusAPIRealTimeByFrequency2Params object
+// NewInterCityBusAPIRealTimeByFrequency1Params creates a new InterCityBusAPIRealTimeByFrequency1Params object
// with the default values initialized.
-func NewInterCityBusAPIRealTimeByFrequency2Params() *InterCityBusAPIRealTimeByFrequency2Params {
+func NewInterCityBusAPIRealTimeByFrequency1Params() *InterCityBusAPIRealTimeByFrequency1Params {
var (
dollarTopDefault = int64(30)
)
- return &InterCityBusAPIRealTimeByFrequency2Params{
+ return &InterCityBusAPIRealTimeByFrequency1Params{
DollarTop: &dollarTopDefault,
timeout: cr.DefaultTimeout,
}
}
-// NewInterCityBusAPIRealTimeByFrequency2ParamsWithTimeout creates a new InterCityBusAPIRealTimeByFrequency2Params object
+// NewInterCityBusAPIRealTimeByFrequency1ParamsWithTimeout creates a new InterCityBusAPIRealTimeByFrequency1Params object
// with the default values initialized, and the ability to set a timeout on a request
-func NewInterCityBusAPIRealTimeByFrequency2ParamsWithTimeout(timeout time.Duration) *InterCityBusAPIRealTimeByFrequency2Params {
+func NewInterCityBusAPIRealTimeByFrequency1ParamsWithTimeout(timeout time.Duration) *InterCityBusAPIRealTimeByFrequency1Params {
var (
dollarTopDefault = int64(30)
)
- return &InterCityBusAPIRealTimeByFrequency2Params{
+ return &InterCityBusAPIRealTimeByFrequency1Params{
DollarTop: &dollarTopDefault,
timeout: timeout,
}
}
-// NewInterCityBusAPIRealTimeByFrequency2ParamsWithContext creates a new InterCityBusAPIRealTimeByFrequency2Params object
+// NewInterCityBusAPIRealTimeByFrequency1ParamsWithContext creates a new InterCityBusAPIRealTimeByFrequency1Params object
// with the default values initialized, and the ability to set a context for a request
-func NewInterCityBusAPIRealTimeByFrequency2ParamsWithContext(ctx context.Context) *InterCityBusAPIRealTimeByFrequency2Params {
+func NewInterCityBusAPIRealTimeByFrequency1ParamsWithContext(ctx context.Context) *InterCityBusAPIRealTimeByFrequency1Params {
var (
dollarTopDefault = int64(30)
)
- return &InterCityBusAPIRealTimeByFrequency2Params{
+ return &InterCityBusAPIRealTimeByFrequency1Params{
DollarTop: &dollarTopDefault,
Context: ctx,
}
}
-// NewInterCityBusAPIRealTimeByFrequency2ParamsWithHTTPClient creates a new InterCityBusAPIRealTimeByFrequency2Params object
+// NewInterCityBusAPIRealTimeByFrequency1ParamsWithHTTPClient creates a new InterCityBusAPIRealTimeByFrequency1Params object
// with the default values initialized, and the ability to set a custom HTTPClient for a request
-func NewInterCityBusAPIRealTimeByFrequency2ParamsWithHTTPClient(client *http.Client) *InterCityBusAPIRealTimeByFrequency2Params {
+func NewInterCityBusAPIRealTimeByFrequency1ParamsWithHTTPClient(client *http.Client) *InterCityBusAPIRealTimeByFrequency1Params {
var (
dollarTopDefault = int64(30)
)
- return &InterCityBusAPIRealTimeByFrequency2Params{
+ return &InterCityBusAPIRealTimeByFrequency1Params{
DollarTop: &dollarTopDefault,
HTTPClient: client,
}
}
-/*InterCityBusAPIRealTimeByFrequency2Params contains all the parameters to send to the API endpoint
-for the inter city bus Api real time by frequency 2 operation typically these are written to a http.Request
+/*InterCityBusAPIRealTimeByFrequency1Params contains all the parameters to send to the API endpoint
+for the inter city bus Api real time by frequency 1 operation typically these are written to a http.Request
*/
-type InterCityBusAPIRealTimeByFrequency2Params struct {
+type InterCityBusAPIRealTimeByFrequency1Params struct {
/*DollarFilter
過濾
@@ -124,140 +124,140 @@ type InterCityBusAPIRealTimeByFrequency2Params struct {
HTTPClient *http.Client
}
-// WithTimeout adds the timeout to the inter city bus Api real time by frequency 2 params
-func (o *InterCityBusAPIRealTimeByFrequency2Params) WithTimeout(timeout time.Duration) *InterCityBusAPIRealTimeByFrequency2Params {
+// WithTimeout adds the timeout to the inter city bus Api real time by frequency 1 params
+func (o *InterCityBusAPIRealTimeByFrequency1Params) WithTimeout(timeout time.Duration) *InterCityBusAPIRealTimeByFrequency1Params {
o.SetTimeout(timeout)
return o
}
-// SetTimeout adds the timeout to the inter city bus Api real time by frequency 2 params
-func (o *InterCityBusAPIRealTimeByFrequency2Params) SetTimeout(timeout time.Duration) {
+// SetTimeout adds the timeout to the inter city bus Api real time by frequency 1 params
+func (o *InterCityBusAPIRealTimeByFrequency1Params) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
-// WithContext adds the context to the inter city bus Api real time by frequency 2 params
-func (o *InterCityBusAPIRealTimeByFrequency2Params) WithContext(ctx context.Context) *InterCityBusAPIRealTimeByFrequency2Params {
+// WithContext adds the context to the inter city bus Api real time by frequency 1 params
+func (o *InterCityBusAPIRealTimeByFrequency1Params) WithContext(ctx context.Context) *InterCityBusAPIRealTimeByFrequency1Params {
o.SetContext(ctx)
return o
}
-// SetContext adds the context to the inter city bus Api real time by frequency 2 params
-func (o *InterCityBusAPIRealTimeByFrequency2Params) SetContext(ctx context.Context) {
+// SetContext adds the context to the inter city bus Api real time by frequency 1 params
+func (o *InterCityBusAPIRealTimeByFrequency1Params) SetContext(ctx context.Context) {
o.Context = ctx
}
-// WithHTTPClient adds the HTTPClient to the inter city bus Api real time by frequency 2 params
-func (o *InterCityBusAPIRealTimeByFrequency2Params) WithHTTPClient(client *http.Client) *InterCityBusAPIRealTimeByFrequency2Params {
+// WithHTTPClient adds the HTTPClient to the inter city bus Api real time by frequency 1 params
+func (o *InterCityBusAPIRealTimeByFrequency1Params) WithHTTPClient(client *http.Client) *InterCityBusAPIRealTimeByFrequency1Params {
o.SetHTTPClient(client)
return o
}
-// SetHTTPClient adds the HTTPClient to the inter city bus Api real time by frequency 2 params
-func (o *InterCityBusAPIRealTimeByFrequency2Params) SetHTTPClient(client *http.Client) {
+// SetHTTPClient adds the HTTPClient to the inter city bus Api real time by frequency 1 params
+func (o *InterCityBusAPIRealTimeByFrequency1Params) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
-// WithDollarFilter adds the dollarFilter to the inter city bus Api real time by frequency 2 params
-func (o *InterCityBusAPIRealTimeByFrequency2Params) WithDollarFilter(dollarFilter *string) *InterCityBusAPIRealTimeByFrequency2Params {
+// WithDollarFilter adds the dollarFilter to the inter city bus Api real time by frequency 1 params
+func (o *InterCityBusAPIRealTimeByFrequency1Params) WithDollarFilter(dollarFilter *string) *InterCityBusAPIRealTimeByFrequency1Params {
o.SetDollarFilter(dollarFilter)
return o
}
-// SetDollarFilter adds the dollarFilter to the inter city bus Api real time by frequency 2 params
-func (o *InterCityBusAPIRealTimeByFrequency2Params) SetDollarFilter(dollarFilter *string) {
+// SetDollarFilter adds the dollarFilter to the inter city bus Api real time by frequency 1 params
+func (o *InterCityBusAPIRealTimeByFrequency1Params) SetDollarFilter(dollarFilter *string) {
o.DollarFilter = dollarFilter
}
-// WithDollarFormat adds the dollarFormat to the inter city bus Api real time by frequency 2 params
-func (o *InterCityBusAPIRealTimeByFrequency2Params) WithDollarFormat(dollarFormat string) *InterCityBusAPIRealTimeByFrequency2Params {
+// WithDollarFormat adds the dollarFormat to the inter city bus Api real time by frequency 1 params
+func (o *InterCityBusAPIRealTimeByFrequency1Params) WithDollarFormat(dollarFormat string) *InterCityBusAPIRealTimeByFrequency1Params {
o.SetDollarFormat(dollarFormat)
return o
}
-// SetDollarFormat adds the dollarFormat to the inter city bus Api real time by frequency 2 params
-func (o *InterCityBusAPIRealTimeByFrequency2Params) SetDollarFormat(dollarFormat string) {
+// SetDollarFormat adds the dollarFormat to the inter city bus Api real time by frequency 1 params
+func (o *InterCityBusAPIRealTimeByFrequency1Params) SetDollarFormat(dollarFormat string) {
o.DollarFormat = dollarFormat
}
-// WithDollarOrderby adds the dollarOrderby to the inter city bus Api real time by frequency 2 params
-func (o *InterCityBusAPIRealTimeByFrequency2Params) WithDollarOrderby(dollarOrderby *string) *InterCityBusAPIRealTimeByFrequency2Params {
+// WithDollarOrderby adds the dollarOrderby to the inter city bus Api real time by frequency 1 params
+func (o *InterCityBusAPIRealTimeByFrequency1Params) WithDollarOrderby(dollarOrderby *string) *InterCityBusAPIRealTimeByFrequency1Params {
o.SetDollarOrderby(dollarOrderby)
return o
}
-// SetDollarOrderby adds the dollarOrderby to the inter city bus Api real time by frequency 2 params
-func (o *InterCityBusAPIRealTimeByFrequency2Params) SetDollarOrderby(dollarOrderby *string) {
+// SetDollarOrderby adds the dollarOrderby to the inter city bus Api real time by frequency 1 params
+func (o *InterCityBusAPIRealTimeByFrequency1Params) SetDollarOrderby(dollarOrderby *string) {
o.DollarOrderby = dollarOrderby
}
-// WithDollarSelect adds the dollarSelect to the inter city bus Api real time by frequency 2 params
-func (o *InterCityBusAPIRealTimeByFrequency2Params) WithDollarSelect(dollarSelect *string) *InterCityBusAPIRealTimeByFrequency2Params {
+// WithDollarSelect adds the dollarSelect to the inter city bus Api real time by frequency 1 params
+func (o *InterCityBusAPIRealTimeByFrequency1Params) WithDollarSelect(dollarSelect *string) *InterCityBusAPIRealTimeByFrequency1Params {
o.SetDollarSelect(dollarSelect)
return o
}
-// SetDollarSelect adds the dollarSelect to the inter city bus Api real time by frequency 2 params
-func (o *InterCityBusAPIRealTimeByFrequency2Params) SetDollarSelect(dollarSelect *string) {
+// SetDollarSelect adds the dollarSelect to the inter city bus Api real time by frequency 1 params
+func (o *InterCityBusAPIRealTimeByFrequency1Params) SetDollarSelect(dollarSelect *string) {
o.DollarSelect = dollarSelect
}
-// WithDollarSkip adds the dollarSkip to the inter city bus Api real time by frequency 2 params
-func (o *InterCityBusAPIRealTimeByFrequency2Params) WithDollarSkip(dollarSkip *string) *InterCityBusAPIRealTimeByFrequency2Params {
+// WithDollarSkip adds the dollarSkip to the inter city bus Api real time by frequency 1 params
+func (o *InterCityBusAPIRealTimeByFrequency1Params) WithDollarSkip(dollarSkip *string) *InterCityBusAPIRealTimeByFrequency1Params {
o.SetDollarSkip(dollarSkip)
return o
}
-// SetDollarSkip adds the dollarSkip to the inter city bus Api real time by frequency 2 params
-func (o *InterCityBusAPIRealTimeByFrequency2Params) SetDollarSkip(dollarSkip *string) {
+// SetDollarSkip adds the dollarSkip to the inter city bus Api real time by frequency 1 params
+func (o *InterCityBusAPIRealTimeByFrequency1Params) SetDollarSkip(dollarSkip *string) {
o.DollarSkip = dollarSkip
}
-// WithDollarSpatialFilter adds the dollarSpatialFilter to the inter city bus Api real time by frequency 2 params
-func (o *InterCityBusAPIRealTimeByFrequency2Params) WithDollarSpatialFilter(dollarSpatialFilter *string) *InterCityBusAPIRealTimeByFrequency2Params {
+// WithDollarSpatialFilter adds the dollarSpatialFilter to the inter city bus Api real time by frequency 1 params
+func (o *InterCityBusAPIRealTimeByFrequency1Params) WithDollarSpatialFilter(dollarSpatialFilter *string) *InterCityBusAPIRealTimeByFrequency1Params {
o.SetDollarSpatialFilter(dollarSpatialFilter)
return o
}
-// SetDollarSpatialFilter adds the dollarSpatialFilter to the inter city bus Api real time by frequency 2 params
-func (o *InterCityBusAPIRealTimeByFrequency2Params) SetDollarSpatialFilter(dollarSpatialFilter *string) {
+// SetDollarSpatialFilter adds the dollarSpatialFilter to the inter city bus Api real time by frequency 1 params
+func (o *InterCityBusAPIRealTimeByFrequency1Params) SetDollarSpatialFilter(dollarSpatialFilter *string) {
o.DollarSpatialFilter = dollarSpatialFilter
}
-// WithDollarTop adds the dollarTop to the inter city bus Api real time by frequency 2 params
-func (o *InterCityBusAPIRealTimeByFrequency2Params) WithDollarTop(dollarTop *int64) *InterCityBusAPIRealTimeByFrequency2Params {
+// WithDollarTop adds the dollarTop to the inter city bus Api real time by frequency 1 params
+func (o *InterCityBusAPIRealTimeByFrequency1Params) WithDollarTop(dollarTop *int64) *InterCityBusAPIRealTimeByFrequency1Params {
o.SetDollarTop(dollarTop)
return o
}
-// SetDollarTop adds the dollarTop to the inter city bus Api real time by frequency 2 params
-func (o *InterCityBusAPIRealTimeByFrequency2Params) SetDollarTop(dollarTop *int64) {
+// SetDollarTop adds the dollarTop to the inter city bus Api real time by frequency 1 params
+func (o *InterCityBusAPIRealTimeByFrequency1Params) SetDollarTop(dollarTop *int64) {
o.DollarTop = dollarTop
}
-// WithRouteName adds the routeName to the inter city bus Api real time by frequency 2 params
-func (o *InterCityBusAPIRealTimeByFrequency2Params) WithRouteName(routeName string) *InterCityBusAPIRealTimeByFrequency2Params {
+// WithRouteName adds the routeName to the inter city bus Api real time by frequency 1 params
+func (o *InterCityBusAPIRealTimeByFrequency1Params) WithRouteName(routeName string) *InterCityBusAPIRealTimeByFrequency1Params {
o.SetRouteName(routeName)
return o
}
-// SetRouteName adds the routeName to the inter city bus Api real time by frequency 2 params
-func (o *InterCityBusAPIRealTimeByFrequency2Params) SetRouteName(routeName string) {
+// SetRouteName adds the routeName to the inter city bus Api real time by frequency 1 params
+func (o *InterCityBusAPIRealTimeByFrequency1Params) SetRouteName(routeName string) {
o.RouteName = routeName
}
-// WithHealth adds the health to the inter city bus Api real time by frequency 2 params
-func (o *InterCityBusAPIRealTimeByFrequency2Params) WithHealth(health *string) *InterCityBusAPIRealTimeByFrequency2Params {
+// WithHealth adds the health to the inter city bus Api real time by frequency 1 params
+func (o *InterCityBusAPIRealTimeByFrequency1Params) WithHealth(health *string) *InterCityBusAPIRealTimeByFrequency1Params {
o.SetHealth(health)
return o
}
-// SetHealth adds the health to the inter city bus Api real time by frequency 2 params
-func (o *InterCityBusAPIRealTimeByFrequency2Params) SetHealth(health *string) {
+// SetHealth adds the health to the inter city bus Api real time by frequency 1 params
+func (o *InterCityBusAPIRealTimeByFrequency1Params) SetHealth(health *string) {
o.Health = health
}
// WriteToRequest writes these params to a swagger request
-func (o *InterCityBusAPIRealTimeByFrequency2Params) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+func (o *InterCityBusAPIRealTimeByFrequency1Params) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
diff --git a/bus/v2/client/inter_city_bus/inter_city_bus_api_real_time_by_frequency2_responses.go b/bus/v2/client/inter_city_bus/inter_city_bus_api_real_time_by_frequency1_responses.go
similarity index 51%
rename from bus/v2/client/inter_city_bus/inter_city_bus_api_real_time_by_frequency2_responses.go
rename to bus/v2/client/inter_city_bus/inter_city_bus_api_real_time_by_frequency1_responses.go
index 77bba730..53aa830a 100644
--- a/bus/v2/client/inter_city_bus/inter_city_bus_api_real_time_by_frequency2_responses.go
+++ b/bus/v2/client/inter_city_bus/inter_city_bus_api_real_time_by_frequency1_responses.go
@@ -15,54 +15,54 @@ import (
"github.com/minchao/go-ptx/bus/v2/models"
)
-// InterCityBusAPIRealTimeByFrequency2Reader is a Reader for the InterCityBusAPIRealTimeByFrequency2 structure.
-type InterCityBusAPIRealTimeByFrequency2Reader struct {
+// InterCityBusAPIRealTimeByFrequency1Reader is a Reader for the InterCityBusAPIRealTimeByFrequency1 structure.
+type InterCityBusAPIRealTimeByFrequency1Reader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
-func (o *InterCityBusAPIRealTimeByFrequency2Reader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+func (o *InterCityBusAPIRealTimeByFrequency1Reader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
- result := NewInterCityBusAPIRealTimeByFrequency2OK()
+ result := NewInterCityBusAPIRealTimeByFrequency1OK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
case 299:
- result := NewInterCityBusAPIRealTimeByFrequency2Status299()
+ result := NewInterCityBusAPIRealTimeByFrequency1Status299()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
-// NewInterCityBusAPIRealTimeByFrequency2OK creates a InterCityBusAPIRealTimeByFrequency2OK with default headers values
-func NewInterCityBusAPIRealTimeByFrequency2OK() *InterCityBusAPIRealTimeByFrequency2OK {
- return &InterCityBusAPIRealTimeByFrequency2OK{}
+// NewInterCityBusAPIRealTimeByFrequency1OK creates a InterCityBusAPIRealTimeByFrequency1OK with default headers values
+func NewInterCityBusAPIRealTimeByFrequency1OK() *InterCityBusAPIRealTimeByFrequency1OK {
+ return &InterCityBusAPIRealTimeByFrequency1OK{}
}
-/*InterCityBusAPIRealTimeByFrequency2OK handles this case with default header values.
+/*InterCityBusAPIRealTimeByFrequency1OK handles this case with default header values.
OK
*/
-type InterCityBusAPIRealTimeByFrequency2OK struct {
+type InterCityBusAPIRealTimeByFrequency1OK struct {
Payload []*models.ServiceDTOVersion2BusBusA1Data
}
-func (o *InterCityBusAPIRealTimeByFrequency2OK) Error() string {
- return fmt.Sprintf("[GET /v2/Bus/RealTimeByFrequency/InterCity/{RouteName}][%d] interCityBusApiRealTimeByFrequency2OK %+v", 200, o.Payload)
+func (o *InterCityBusAPIRealTimeByFrequency1OK) Error() string {
+ return fmt.Sprintf("[GET /v2/Bus/RealTimeByFrequency/InterCity/{RouteName}][%d] interCityBusApiRealTimeByFrequency1OK %+v", 200, o.Payload)
}
-func (o *InterCityBusAPIRealTimeByFrequency2OK) GetPayload() []*models.ServiceDTOVersion2BusBusA1Data {
+func (o *InterCityBusAPIRealTimeByFrequency1OK) GetPayload() []*models.ServiceDTOVersion2BusBusA1Data {
return o.Payload
}
-func (o *InterCityBusAPIRealTimeByFrequency2OK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+func (o *InterCityBusAPIRealTimeByFrequency1OK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// response payload
if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF {
@@ -72,28 +72,28 @@ func (o *InterCityBusAPIRealTimeByFrequency2OK) readResponse(response runtime.Cl
return nil
}
-// NewInterCityBusAPIRealTimeByFrequency2Status299 creates a InterCityBusAPIRealTimeByFrequency2Status299 with default headers values
-func NewInterCityBusAPIRealTimeByFrequency2Status299() *InterCityBusAPIRealTimeByFrequency2Status299 {
- return &InterCityBusAPIRealTimeByFrequency2Status299{}
+// NewInterCityBusAPIRealTimeByFrequency1Status299 creates a InterCityBusAPIRealTimeByFrequency1Status299 with default headers values
+func NewInterCityBusAPIRealTimeByFrequency1Status299() *InterCityBusAPIRealTimeByFrequency1Status299 {
+ return &InterCityBusAPIRealTimeByFrequency1Status299{}
}
-/*InterCityBusAPIRealTimeByFrequency2Status299 handles this case with default header values.
+/*InterCityBusAPIRealTimeByFrequency1Status299 handles this case with default header values.
加入參數'?health=true'即可查詢此API服務的健康狀態
*/
-type InterCityBusAPIRealTimeByFrequency2Status299 struct {
+type InterCityBusAPIRealTimeByFrequency1Status299 struct {
Payload *models.ServiceDTOVersion3BaseDisplayHealth
}
-func (o *InterCityBusAPIRealTimeByFrequency2Status299) Error() string {
- return fmt.Sprintf("[GET /v2/Bus/RealTimeByFrequency/InterCity/{RouteName}][%d] interCityBusApiRealTimeByFrequency2Status299 %+v", 299, o.Payload)
+func (o *InterCityBusAPIRealTimeByFrequency1Status299) Error() string {
+ return fmt.Sprintf("[GET /v2/Bus/RealTimeByFrequency/InterCity/{RouteName}][%d] interCityBusApiRealTimeByFrequency1Status299 %+v", 299, o.Payload)
}
-func (o *InterCityBusAPIRealTimeByFrequency2Status299) GetPayload() *models.ServiceDTOVersion3BaseDisplayHealth {
+func (o *InterCityBusAPIRealTimeByFrequency1Status299) GetPayload() *models.ServiceDTOVersion3BaseDisplayHealth {
return o.Payload
}
-func (o *InterCityBusAPIRealTimeByFrequency2Status299) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+func (o *InterCityBusAPIRealTimeByFrequency1Status299) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(models.ServiceDTOVersion3BaseDisplayHealth)
diff --git a/bus/v2/client/inter_city_bus/inter_city_bus_api_real_time_by_frequency_responses.go b/bus/v2/client/inter_city_bus/inter_city_bus_api_real_time_by_frequency_responses.go
index 21c6c047..f0497fff 100644
--- a/bus/v2/client/inter_city_bus/inter_city_bus_api_real_time_by_frequency_responses.go
+++ b/bus/v2/client/inter_city_bus/inter_city_bus_api_real_time_by_frequency_responses.go
@@ -37,7 +37,7 @@ func (o *InterCityBusAPIRealTimeByFrequencyReader) ReadResponse(response runtime
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/bus/v2/client/inter_city_bus/inter_city_bus_api_real_time_by_frequency_udp_1_responses.go b/bus/v2/client/inter_city_bus/inter_city_bus_api_real_time_by_frequency_udp_1_responses.go
index 7df8effc..6938ce0a 100644
--- a/bus/v2/client/inter_city_bus/inter_city_bus_api_real_time_by_frequency_udp_1_responses.go
+++ b/bus/v2/client/inter_city_bus/inter_city_bus_api_real_time_by_frequency_udp_1_responses.go
@@ -37,7 +37,7 @@ func (o *InterCityBusAPIRealTimeByFrequencyUDP1Reader) ReadResponse(response run
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/bus/v2/client/inter_city_bus/inter_city_bus_api_real_time_by_frequency_udp_responses.go b/bus/v2/client/inter_city_bus/inter_city_bus_api_real_time_by_frequency_udp_responses.go
index 172c274e..dc3016e8 100644
--- a/bus/v2/client/inter_city_bus/inter_city_bus_api_real_time_by_frequency_udp_responses.go
+++ b/bus/v2/client/inter_city_bus/inter_city_bus_api_real_time_by_frequency_udp_responses.go
@@ -37,7 +37,7 @@ func (o *InterCityBusAPIRealTimeByFrequencyUDPReader) ReadResponse(response runt
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/bus/v2/client/inter_city_bus/inter_city_bus_api_real_time_near_stop1_responses.go b/bus/v2/client/inter_city_bus/inter_city_bus_api_real_time_near_stop1_responses.go
index d53e04ea..87c32473 100644
--- a/bus/v2/client/inter_city_bus/inter_city_bus_api_real_time_near_stop1_responses.go
+++ b/bus/v2/client/inter_city_bus/inter_city_bus_api_real_time_near_stop1_responses.go
@@ -37,7 +37,7 @@ func (o *InterCityBusAPIRealTimeNearStop1Reader) ReadResponse(response runtime.C
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/bus/v2/client/inter_city_bus/inter_city_bus_api_real_time_near_stop_responses.go b/bus/v2/client/inter_city_bus/inter_city_bus_api_real_time_near_stop_responses.go
index 0927e6ab..3f2f3ab9 100644
--- a/bus/v2/client/inter_city_bus/inter_city_bus_api_real_time_near_stop_responses.go
+++ b/bus/v2/client/inter_city_bus/inter_city_bus_api_real_time_near_stop_responses.go
@@ -37,7 +37,7 @@ func (o *InterCityBusAPIRealTimeNearStopReader) ReadResponse(response runtime.Cl
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/bus/v2/client/inter_city_bus/inter_city_bus_api_real_time_near_stop_udp_1_responses.go b/bus/v2/client/inter_city_bus/inter_city_bus_api_real_time_near_stop_udp_1_responses.go
index 71b04bcf..b411ae4d 100644
--- a/bus/v2/client/inter_city_bus/inter_city_bus_api_real_time_near_stop_udp_1_responses.go
+++ b/bus/v2/client/inter_city_bus/inter_city_bus_api_real_time_near_stop_udp_1_responses.go
@@ -37,7 +37,7 @@ func (o *InterCityBusAPIRealTimeNearStopUDP1Reader) ReadResponse(response runtim
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/bus/v2/client/inter_city_bus/inter_city_bus_api_real_time_near_stop_udp_responses.go b/bus/v2/client/inter_city_bus/inter_city_bus_api_real_time_near_stop_udp_responses.go
index 926ba3ec..7b1e5c1f 100644
--- a/bus/v2/client/inter_city_bus/inter_city_bus_api_real_time_near_stop_udp_responses.go
+++ b/bus/v2/client/inter_city_bus/inter_city_bus_api_real_time_near_stop_udp_responses.go
@@ -37,7 +37,7 @@ func (o *InterCityBusAPIRealTimeNearStopUDPReader) ReadResponse(response runtime
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/bus/v2/client/inter_city_bus/inter_city_bus_api_route1_responses.go b/bus/v2/client/inter_city_bus/inter_city_bus_api_route1_responses.go
index 69c772fa..1c1df602 100644
--- a/bus/v2/client/inter_city_bus/inter_city_bus_api_route1_responses.go
+++ b/bus/v2/client/inter_city_bus/inter_city_bus_api_route1_responses.go
@@ -37,7 +37,7 @@ func (o *InterCityBusAPIRoute1Reader) ReadResponse(response runtime.ClientRespon
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/bus/v2/client/inter_city_bus/inter_city_bus_api_route_fare1_responses.go b/bus/v2/client/inter_city_bus/inter_city_bus_api_route_fare1_responses.go
index de45438f..6c121538 100644
--- a/bus/v2/client/inter_city_bus/inter_city_bus_api_route_fare1_responses.go
+++ b/bus/v2/client/inter_city_bus/inter_city_bus_api_route_fare1_responses.go
@@ -37,7 +37,7 @@ func (o *InterCityBusAPIRouteFare1Reader) ReadResponse(response runtime.ClientRe
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/bus/v2/client/inter_city_bus/inter_city_bus_api_route_fare_responses.go b/bus/v2/client/inter_city_bus/inter_city_bus_api_route_fare_responses.go
index 20900a92..8fc58df7 100644
--- a/bus/v2/client/inter_city_bus/inter_city_bus_api_route_fare_responses.go
+++ b/bus/v2/client/inter_city_bus/inter_city_bus_api_route_fare_responses.go
@@ -37,7 +37,7 @@ func (o *InterCityBusAPIRouteFareReader) ReadResponse(response runtime.ClientRes
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/bus/v2/client/inter_city_bus/inter_city_bus_api_route_responses.go b/bus/v2/client/inter_city_bus/inter_city_bus_api_route_responses.go
index 34d55ec6..be665ed7 100644
--- a/bus/v2/client/inter_city_bus/inter_city_bus_api_route_responses.go
+++ b/bus/v2/client/inter_city_bus/inter_city_bus_api_route_responses.go
@@ -37,7 +37,7 @@ func (o *InterCityBusAPIRouteReader) ReadResponse(response runtime.ClientRespons
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/bus/v2/client/inter_city_bus/inter_city_bus_api_schedule1_responses.go b/bus/v2/client/inter_city_bus/inter_city_bus_api_schedule1_responses.go
index 4c1a3b4d..b8b2bef2 100644
--- a/bus/v2/client/inter_city_bus/inter_city_bus_api_schedule1_responses.go
+++ b/bus/v2/client/inter_city_bus/inter_city_bus_api_schedule1_responses.go
@@ -37,7 +37,7 @@ func (o *InterCityBusAPISchedule1Reader) ReadResponse(response runtime.ClientRes
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/bus/v2/client/inter_city_bus/inter_city_bus_api_schedule_responses.go b/bus/v2/client/inter_city_bus/inter_city_bus_api_schedule_responses.go
index cfec800c..e44a084c 100644
--- a/bus/v2/client/inter_city_bus/inter_city_bus_api_schedule_responses.go
+++ b/bus/v2/client/inter_city_bus/inter_city_bus_api_schedule_responses.go
@@ -37,7 +37,7 @@ func (o *InterCityBusAPIScheduleReader) ReadResponse(response runtime.ClientResp
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/bus/v2/client/inter_city_bus/inter_city_bus_api_station_group_responses.go b/bus/v2/client/inter_city_bus/inter_city_bus_api_station_group_responses.go
index 19ac2fb8..56952744 100644
--- a/bus/v2/client/inter_city_bus/inter_city_bus_api_station_group_responses.go
+++ b/bus/v2/client/inter_city_bus/inter_city_bus_api_station_group_responses.go
@@ -37,7 +37,7 @@ func (o *InterCityBusAPIStationGroupReader) ReadResponse(response runtime.Client
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/bus/v2/client/inter_city_bus/inter_city_bus_api_station_name_parameters.go b/bus/v2/client/inter_city_bus/inter_city_bus_api_station_name_parameters.go
deleted file mode 100644
index f07265e0..00000000
--- a/bus/v2/client/inter_city_bus/inter_city_bus_api_station_name_parameters.go
+++ /dev/null
@@ -1,376 +0,0 @@
-// Code generated by go-swagger; DO NOT EDIT.
-
-package inter_city_bus
-
-// This file was generated by the swagger tool.
-// Editing this file might prove futile when you re-run the swagger generate command
-
-import (
- "context"
- "net/http"
- "time"
-
- "github.com/go-openapi/errors"
- "github.com/go-openapi/runtime"
- cr "github.com/go-openapi/runtime/client"
- "github.com/go-openapi/strfmt"
- "github.com/go-openapi/swag"
-)
-
-// NewInterCityBusAPIStationNameParams creates a new InterCityBusAPIStationNameParams object
-// with the default values initialized.
-func NewInterCityBusAPIStationNameParams() *InterCityBusAPIStationNameParams {
- var (
- dollarTopDefault = int64(30)
- )
- return &InterCityBusAPIStationNameParams{
- DollarTop: &dollarTopDefault,
-
- timeout: cr.DefaultTimeout,
- }
-}
-
-// NewInterCityBusAPIStationNameParamsWithTimeout creates a new InterCityBusAPIStationNameParams object
-// with the default values initialized, and the ability to set a timeout on a request
-func NewInterCityBusAPIStationNameParamsWithTimeout(timeout time.Duration) *InterCityBusAPIStationNameParams {
- var (
- dollarTopDefault = int64(30)
- )
- return &InterCityBusAPIStationNameParams{
- DollarTop: &dollarTopDefault,
-
- timeout: timeout,
- }
-}
-
-// NewInterCityBusAPIStationNameParamsWithContext creates a new InterCityBusAPIStationNameParams object
-// with the default values initialized, and the ability to set a context for a request
-func NewInterCityBusAPIStationNameParamsWithContext(ctx context.Context) *InterCityBusAPIStationNameParams {
- var (
- dollarTopDefault = int64(30)
- )
- return &InterCityBusAPIStationNameParams{
- DollarTop: &dollarTopDefault,
-
- Context: ctx,
- }
-}
-
-// NewInterCityBusAPIStationNameParamsWithHTTPClient creates a new InterCityBusAPIStationNameParams object
-// with the default values initialized, and the ability to set a custom HTTPClient for a request
-func NewInterCityBusAPIStationNameParamsWithHTTPClient(client *http.Client) *InterCityBusAPIStationNameParams {
- var (
- dollarTopDefault = int64(30)
- )
- return &InterCityBusAPIStationNameParams{
- DollarTop: &dollarTopDefault,
- HTTPClient: client,
- }
-}
-
-/*InterCityBusAPIStationNameParams contains all the parameters to send to the API endpoint
-for the inter city bus Api station name operation typically these are written to a http.Request
-*/
-type InterCityBusAPIStationNameParams struct {
-
- /*DollarFilter
- 過濾
-
- */
- DollarFilter *string
- /*DollarFormat
- 指定來源格式
-
- */
- DollarFormat string
- /*DollarOrderby
- 排序
-
- */
- DollarOrderby *string
- /*DollarSelect
- 挑選
-
- */
- DollarSelect *string
- /*DollarSkip
- 跳過前幾筆
-
- */
- DollarSkip *string
- /*DollarSpatialFilter
- 空間過濾
-
- */
- DollarSpatialFilter *string
- /*DollarTop
- 取前幾筆
-
- */
- DollarTop *int64
- /*Health
- 加入參數'?health=true'即可查詢此API服務的健康狀態
-
- */
- Health *string
-
- timeout time.Duration
- Context context.Context
- HTTPClient *http.Client
-}
-
-// WithTimeout adds the timeout to the inter city bus Api station name params
-func (o *InterCityBusAPIStationNameParams) WithTimeout(timeout time.Duration) *InterCityBusAPIStationNameParams {
- o.SetTimeout(timeout)
- return o
-}
-
-// SetTimeout adds the timeout to the inter city bus Api station name params
-func (o *InterCityBusAPIStationNameParams) SetTimeout(timeout time.Duration) {
- o.timeout = timeout
-}
-
-// WithContext adds the context to the inter city bus Api station name params
-func (o *InterCityBusAPIStationNameParams) WithContext(ctx context.Context) *InterCityBusAPIStationNameParams {
- o.SetContext(ctx)
- return o
-}
-
-// SetContext adds the context to the inter city bus Api station name params
-func (o *InterCityBusAPIStationNameParams) SetContext(ctx context.Context) {
- o.Context = ctx
-}
-
-// WithHTTPClient adds the HTTPClient to the inter city bus Api station name params
-func (o *InterCityBusAPIStationNameParams) WithHTTPClient(client *http.Client) *InterCityBusAPIStationNameParams {
- o.SetHTTPClient(client)
- return o
-}
-
-// SetHTTPClient adds the HTTPClient to the inter city bus Api station name params
-func (o *InterCityBusAPIStationNameParams) SetHTTPClient(client *http.Client) {
- o.HTTPClient = client
-}
-
-// WithDollarFilter adds the dollarFilter to the inter city bus Api station name params
-func (o *InterCityBusAPIStationNameParams) WithDollarFilter(dollarFilter *string) *InterCityBusAPIStationNameParams {
- o.SetDollarFilter(dollarFilter)
- return o
-}
-
-// SetDollarFilter adds the dollarFilter to the inter city bus Api station name params
-func (o *InterCityBusAPIStationNameParams) SetDollarFilter(dollarFilter *string) {
- o.DollarFilter = dollarFilter
-}
-
-// WithDollarFormat adds the dollarFormat to the inter city bus Api station name params
-func (o *InterCityBusAPIStationNameParams) WithDollarFormat(dollarFormat string) *InterCityBusAPIStationNameParams {
- o.SetDollarFormat(dollarFormat)
- return o
-}
-
-// SetDollarFormat adds the dollarFormat to the inter city bus Api station name params
-func (o *InterCityBusAPIStationNameParams) SetDollarFormat(dollarFormat string) {
- o.DollarFormat = dollarFormat
-}
-
-// WithDollarOrderby adds the dollarOrderby to the inter city bus Api station name params
-func (o *InterCityBusAPIStationNameParams) WithDollarOrderby(dollarOrderby *string) *InterCityBusAPIStationNameParams {
- o.SetDollarOrderby(dollarOrderby)
- return o
-}
-
-// SetDollarOrderby adds the dollarOrderby to the inter city bus Api station name params
-func (o *InterCityBusAPIStationNameParams) SetDollarOrderby(dollarOrderby *string) {
- o.DollarOrderby = dollarOrderby
-}
-
-// WithDollarSelect adds the dollarSelect to the inter city bus Api station name params
-func (o *InterCityBusAPIStationNameParams) WithDollarSelect(dollarSelect *string) *InterCityBusAPIStationNameParams {
- o.SetDollarSelect(dollarSelect)
- return o
-}
-
-// SetDollarSelect adds the dollarSelect to the inter city bus Api station name params
-func (o *InterCityBusAPIStationNameParams) SetDollarSelect(dollarSelect *string) {
- o.DollarSelect = dollarSelect
-}
-
-// WithDollarSkip adds the dollarSkip to the inter city bus Api station name params
-func (o *InterCityBusAPIStationNameParams) WithDollarSkip(dollarSkip *string) *InterCityBusAPIStationNameParams {
- o.SetDollarSkip(dollarSkip)
- return o
-}
-
-// SetDollarSkip adds the dollarSkip to the inter city bus Api station name params
-func (o *InterCityBusAPIStationNameParams) SetDollarSkip(dollarSkip *string) {
- o.DollarSkip = dollarSkip
-}
-
-// WithDollarSpatialFilter adds the dollarSpatialFilter to the inter city bus Api station name params
-func (o *InterCityBusAPIStationNameParams) WithDollarSpatialFilter(dollarSpatialFilter *string) *InterCityBusAPIStationNameParams {
- o.SetDollarSpatialFilter(dollarSpatialFilter)
- return o
-}
-
-// SetDollarSpatialFilter adds the dollarSpatialFilter to the inter city bus Api station name params
-func (o *InterCityBusAPIStationNameParams) SetDollarSpatialFilter(dollarSpatialFilter *string) {
- o.DollarSpatialFilter = dollarSpatialFilter
-}
-
-// WithDollarTop adds the dollarTop to the inter city bus Api station name params
-func (o *InterCityBusAPIStationNameParams) WithDollarTop(dollarTop *int64) *InterCityBusAPIStationNameParams {
- o.SetDollarTop(dollarTop)
- return o
-}
-
-// SetDollarTop adds the dollarTop to the inter city bus Api station name params
-func (o *InterCityBusAPIStationNameParams) SetDollarTop(dollarTop *int64) {
- o.DollarTop = dollarTop
-}
-
-// WithHealth adds the health to the inter city bus Api station name params
-func (o *InterCityBusAPIStationNameParams) WithHealth(health *string) *InterCityBusAPIStationNameParams {
- o.SetHealth(health)
- return o
-}
-
-// SetHealth adds the health to the inter city bus Api station name params
-func (o *InterCityBusAPIStationNameParams) SetHealth(health *string) {
- o.Health = health
-}
-
-// WriteToRequest writes these params to a swagger request
-func (o *InterCityBusAPIStationNameParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
-
- if err := r.SetTimeout(o.timeout); err != nil {
- return err
- }
- var res []error
-
- if o.DollarFilter != nil {
-
- // query param $filter
- var qrDollarFilter string
- if o.DollarFilter != nil {
- qrDollarFilter = *o.DollarFilter
- }
- qDollarFilter := qrDollarFilter
- if qDollarFilter != "" {
- if err := r.SetQueryParam("$filter", qDollarFilter); err != nil {
- return err
- }
- }
-
- }
-
- // query param $format
- qrDollarFormat := o.DollarFormat
- qDollarFormat := qrDollarFormat
- if qDollarFormat != "" {
- if err := r.SetQueryParam("$format", qDollarFormat); err != nil {
- return err
- }
- }
-
- if o.DollarOrderby != nil {
-
- // query param $orderby
- var qrDollarOrderby string
- if o.DollarOrderby != nil {
- qrDollarOrderby = *o.DollarOrderby
- }
- qDollarOrderby := qrDollarOrderby
- if qDollarOrderby != "" {
- if err := r.SetQueryParam("$orderby", qDollarOrderby); err != nil {
- return err
- }
- }
-
- }
-
- if o.DollarSelect != nil {
-
- // query param $select
- var qrDollarSelect string
- if o.DollarSelect != nil {
- qrDollarSelect = *o.DollarSelect
- }
- qDollarSelect := qrDollarSelect
- if qDollarSelect != "" {
- if err := r.SetQueryParam("$select", qDollarSelect); err != nil {
- return err
- }
- }
-
- }
-
- if o.DollarSkip != nil {
-
- // query param $skip
- var qrDollarSkip string
- if o.DollarSkip != nil {
- qrDollarSkip = *o.DollarSkip
- }
- qDollarSkip := qrDollarSkip
- if qDollarSkip != "" {
- if err := r.SetQueryParam("$skip", qDollarSkip); err != nil {
- return err
- }
- }
-
- }
-
- if o.DollarSpatialFilter != nil {
-
- // query param $spatialFilter
- var qrDollarSpatialFilter string
- if o.DollarSpatialFilter != nil {
- qrDollarSpatialFilter = *o.DollarSpatialFilter
- }
- qDollarSpatialFilter := qrDollarSpatialFilter
- if qDollarSpatialFilter != "" {
- if err := r.SetQueryParam("$spatialFilter", qDollarSpatialFilter); err != nil {
- return err
- }
- }
-
- }
-
- if o.DollarTop != nil {
-
- // query param $top
- var qrDollarTop int64
- if o.DollarTop != nil {
- qrDollarTop = *o.DollarTop
- }
- qDollarTop := swag.FormatInt64(qrDollarTop)
- if qDollarTop != "" {
- if err := r.SetQueryParam("$top", qDollarTop); err != nil {
- return err
- }
- }
-
- }
-
- if o.Health != nil {
-
- // query param health
- var qrHealth string
- if o.Health != nil {
- qrHealth = *o.Health
- }
- qHealth := qrHealth
- if qHealth != "" {
- if err := r.SetQueryParam("health", qHealth); err != nil {
- return err
- }
- }
-
- }
-
- if len(res) > 0 {
- return errors.CompositeValidationError(res...)
- }
- return nil
-}
diff --git a/bus/v2/client/inter_city_bus/inter_city_bus_api_station_name_responses.go b/bus/v2/client/inter_city_bus/inter_city_bus_api_station_name_responses.go
deleted file mode 100644
index ac7e111e..00000000
--- a/bus/v2/client/inter_city_bus/inter_city_bus_api_station_name_responses.go
+++ /dev/null
@@ -1,106 +0,0 @@
-// Code generated by go-swagger; DO NOT EDIT.
-
-package inter_city_bus
-
-// This file was generated by the swagger tool.
-// Editing this file might prove futile when you re-run the swagger generate command
-
-import (
- "fmt"
- "io"
-
- "github.com/go-openapi/runtime"
- "github.com/go-openapi/strfmt"
-
- "github.com/minchao/go-ptx/bus/v2/models"
-)
-
-// InterCityBusAPIStationNameReader is a Reader for the InterCityBusAPIStationName structure.
-type InterCityBusAPIStationNameReader struct {
- formats strfmt.Registry
-}
-
-// ReadResponse reads a server response into the received o.
-func (o *InterCityBusAPIStationNameReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
- switch response.Code() {
- case 200:
- result := NewInterCityBusAPIStationNameOK()
- if err := result.readResponse(response, consumer, o.formats); err != nil {
- return nil, err
- }
- return result, nil
- case 299:
- result := NewInterCityBusAPIStationNameStatus299()
- if err := result.readResponse(response, consumer, o.formats); err != nil {
- return nil, err
- }
- return result, nil
-
- default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
- }
-}
-
-// NewInterCityBusAPIStationNameOK creates a InterCityBusAPIStationNameOK with default headers values
-func NewInterCityBusAPIStationNameOK() *InterCityBusAPIStationNameOK {
- return &InterCityBusAPIStationNameOK{}
-}
-
-/*InterCityBusAPIStationNameOK handles this case with default header values.
-
-OK
-*/
-type InterCityBusAPIStationNameOK struct {
- Payload []*models.ServiceDTOVersion2BusBusStationName
-}
-
-func (o *InterCityBusAPIStationNameOK) Error() string {
- return fmt.Sprintf("[GET /v2/Bus/StationName/InterCity][%d] interCityBusApiStationNameOK %+v", 200, o.Payload)
-}
-
-func (o *InterCityBusAPIStationNameOK) GetPayload() []*models.ServiceDTOVersion2BusBusStationName {
- return o.Payload
-}
-
-func (o *InterCityBusAPIStationNameOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
-
- // response payload
- if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF {
- return err
- }
-
- return nil
-}
-
-// NewInterCityBusAPIStationNameStatus299 creates a InterCityBusAPIStationNameStatus299 with default headers values
-func NewInterCityBusAPIStationNameStatus299() *InterCityBusAPIStationNameStatus299 {
- return &InterCityBusAPIStationNameStatus299{}
-}
-
-/*InterCityBusAPIStationNameStatus299 handles this case with default header values.
-
-加入參數'?health=true'即可查詢此API服務的健康狀態
-*/
-type InterCityBusAPIStationNameStatus299 struct {
- Payload *models.ServiceDTOVersion3BaseDisplayHealth
-}
-
-func (o *InterCityBusAPIStationNameStatus299) Error() string {
- return fmt.Sprintf("[GET /v2/Bus/StationName/InterCity][%d] interCityBusApiStationNameStatus299 %+v", 299, o.Payload)
-}
-
-func (o *InterCityBusAPIStationNameStatus299) GetPayload() *models.ServiceDTOVersion3BaseDisplayHealth {
- return o.Payload
-}
-
-func (o *InterCityBusAPIStationNameStatus299) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
-
- o.Payload = new(models.ServiceDTOVersion3BaseDisplayHealth)
-
- // response payload
- if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
- return err
- }
-
- return nil
-}
diff --git a/bus/v2/client/inter_city_bus/inter_city_bus_api_station_responses.go b/bus/v2/client/inter_city_bus/inter_city_bus_api_station_responses.go
index 98078cfb..4b1dc567 100644
--- a/bus/v2/client/inter_city_bus/inter_city_bus_api_station_responses.go
+++ b/bus/v2/client/inter_city_bus/inter_city_bus_api_station_responses.go
@@ -37,7 +37,7 @@ func (o *InterCityBusAPIStationReader) ReadResponse(response runtime.ClientRespo
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/bus/v2/client/inter_city_bus/inter_city_bus_api_stop_of_route1_responses.go b/bus/v2/client/inter_city_bus/inter_city_bus_api_stop_of_route1_responses.go
index 264258bb..4552ffc4 100644
--- a/bus/v2/client/inter_city_bus/inter_city_bus_api_stop_of_route1_responses.go
+++ b/bus/v2/client/inter_city_bus/inter_city_bus_api_stop_of_route1_responses.go
@@ -37,7 +37,7 @@ func (o *InterCityBusAPIStopOfRoute1Reader) ReadResponse(response runtime.Client
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/bus/v2/client/inter_city_bus/inter_city_bus_api_stop_of_route_responses.go b/bus/v2/client/inter_city_bus/inter_city_bus_api_stop_of_route_responses.go
index df30e1bf..7e9140bb 100644
--- a/bus/v2/client/inter_city_bus/inter_city_bus_api_stop_of_route_responses.go
+++ b/bus/v2/client/inter_city_bus/inter_city_bus_api_stop_of_route_responses.go
@@ -37,7 +37,7 @@ func (o *InterCityBusAPIStopOfRouteReader) ReadResponse(response runtime.ClientR
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/bus/v2/client/inter_city_bus/inter_city_bus_api_stop_responses.go b/bus/v2/client/inter_city_bus/inter_city_bus_api_stop_responses.go
index 7fbbac13..99d279ee 100644
--- a/bus/v2/client/inter_city_bus/inter_city_bus_api_stop_responses.go
+++ b/bus/v2/client/inter_city_bus/inter_city_bus_api_stop_responses.go
@@ -37,7 +37,7 @@ func (o *InterCityBusAPIStopReader) ReadResponse(response runtime.ClientResponse
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/bus/v2/client/inter_city_bus/inter_city_bus_api_vehicle_responses.go b/bus/v2/client/inter_city_bus/inter_city_bus_api_vehicle_responses.go
index 16c502ef..1f1fad12 100644
--- a/bus/v2/client/inter_city_bus/inter_city_bus_api_vehicle_responses.go
+++ b/bus/v2/client/inter_city_bus/inter_city_bus_api_vehicle_responses.go
@@ -37,7 +37,7 @@ func (o *InterCityBusAPIVehicleReader) ReadResponse(response runtime.ClientRespo
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/bus/v2/client/inter_city_bus/inter_city_bus_client.go b/bus/v2/client/inter_city_bus/inter_city_bus_client.go
index 39e49356..143adc6b 100644
--- a/bus/v2/client/inter_city_bus/inter_city_bus_client.go
+++ b/bus/v2/client/inter_city_bus/inter_city_bus_client.go
@@ -43,7 +43,7 @@ type ClientService interface {
InterCityBusAPIRealTimeByFrequency(params *InterCityBusAPIRealTimeByFrequencyParams) (*InterCityBusAPIRealTimeByFrequencyOK, *InterCityBusAPIRealTimeByFrequencyStatus299, error)
- InterCityBusAPIRealTimeByFrequency2(params *InterCityBusAPIRealTimeByFrequency2Params) (*InterCityBusAPIRealTimeByFrequency2OK, *InterCityBusAPIRealTimeByFrequency2Status299, error)
+ InterCityBusAPIRealTimeByFrequency1(params *InterCityBusAPIRealTimeByFrequency1Params) (*InterCityBusAPIRealTimeByFrequency1OK, *InterCityBusAPIRealTimeByFrequency1Status299, error)
InterCityBusAPIRealTimeByFrequencyUDP(params *InterCityBusAPIRealTimeByFrequencyUDPParams) (*InterCityBusAPIRealTimeByFrequencyUDPOK, *InterCityBusAPIRealTimeByFrequencyUDPStatus299, error)
@@ -73,8 +73,6 @@ type ClientService interface {
InterCityBusAPIStationGroup(params *InterCityBusAPIStationGroupParams) (*InterCityBusAPIStationGroupOK, *InterCityBusAPIStationGroupStatus299, error)
- InterCityBusAPIStationName(params *InterCityBusAPIStationNameParams) (*InterCityBusAPIStationNameOK, *InterCityBusAPIStationNameStatus299, error)
-
InterCityBusAPIStop(params *InterCityBusAPIStopParams) (*InterCityBusAPIStopOK, *InterCityBusAPIStopStatus299, error)
InterCityBusAPIStopOfRoute(params *InterCityBusAPIStopOfRouteParams) (*InterCityBusAPIStopOfRouteOK, *InterCityBusAPIStopOfRouteStatus299, error)
@@ -394,26 +392,26 @@ func (a *Client) InterCityBusAPIRealTimeByFrequency(params *InterCityBusAPIRealT
}
/*
- InterCityBusAPIRealTimeByFrequency2 取得指定s 路線名稱 的公路客運動態定時資料 a1 批次更新
+ InterCityBusAPIRealTimeByFrequency1 取得指定s 路線名稱 的公路客運動態定時資料 a1 批次更新
### 公路客運之定時資料(A1) ###
- [逐筆更新]與[批次更新]之差異請詳見資料使用葵花寶典([連結](https://ptxmotc.gitbooks.io/ptx-api-documentation/content/api-zi-liao-shi-yong-zhu-yi-shi-xiang/buslive.html))
*/
-func (a *Client) InterCityBusAPIRealTimeByFrequency2(params *InterCityBusAPIRealTimeByFrequency2Params) (*InterCityBusAPIRealTimeByFrequency2OK, *InterCityBusAPIRealTimeByFrequency2Status299, error) {
+func (a *Client) InterCityBusAPIRealTimeByFrequency1(params *InterCityBusAPIRealTimeByFrequency1Params) (*InterCityBusAPIRealTimeByFrequency1OK, *InterCityBusAPIRealTimeByFrequency1Status299, error) {
// TODO: Validate the params before sending
if params == nil {
- params = NewInterCityBusAPIRealTimeByFrequency2Params()
+ params = NewInterCityBusAPIRealTimeByFrequency1Params()
}
result, err := a.transport.Submit(&runtime.ClientOperation{
- ID: "InterCityBusApi_RealTimeByFrequency_2",
+ ID: "InterCityBusApi_RealTimeByFrequency_1",
Method: "GET",
PathPattern: "/v2/Bus/RealTimeByFrequency/InterCity/{RouteName}",
ProducesMediaTypes: []string{"application/json", "text/json"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"https"},
Params: params,
- Reader: &InterCityBusAPIRealTimeByFrequency2Reader{formats: a.formats},
+ Reader: &InterCityBusAPIRealTimeByFrequency1Reader{formats: a.formats},
Context: params.Context,
Client: params.HTTPClient,
})
@@ -421,9 +419,9 @@ func (a *Client) InterCityBusAPIRealTimeByFrequency2(params *InterCityBusAPIReal
return nil, nil, err
}
switch value := result.(type) {
- case *InterCityBusAPIRealTimeByFrequency2OK:
+ case *InterCityBusAPIRealTimeByFrequency1OK:
return value, nil, nil
- case *InterCityBusAPIRealTimeByFrequency2Status299:
+ case *InterCityBusAPIRealTimeByFrequency1Status299:
return nil, value, nil
}
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
@@ -955,43 +953,6 @@ func (a *Client) InterCityBusAPIStationGroup(params *InterCityBusAPIStationGroup
panic(msg)
}
-/*
- InterCityBusAPIStationName 取得公路客運站名碼資料s
-
- 公路客運之各站牌所屬的站名碼資料
-*/
-func (a *Client) InterCityBusAPIStationName(params *InterCityBusAPIStationNameParams) (*InterCityBusAPIStationNameOK, *InterCityBusAPIStationNameStatus299, error) {
- // TODO: Validate the params before sending
- if params == nil {
- params = NewInterCityBusAPIStationNameParams()
- }
-
- result, err := a.transport.Submit(&runtime.ClientOperation{
- ID: "InterCityBusApi_StationName",
- Method: "GET",
- PathPattern: "/v2/Bus/StationName/InterCity",
- ProducesMediaTypes: []string{"application/json", "text/json"},
- ConsumesMediaTypes: []string{"application/json"},
- Schemes: []string{"https"},
- Params: params,
- Reader: &InterCityBusAPIStationNameReader{formats: a.formats},
- Context: params.Context,
- Client: params.HTTPClient,
- })
- if err != nil {
- return nil, nil, err
- }
- switch value := result.(type) {
- case *InterCityBusAPIStationNameOK:
- return value, nil, nil
- case *InterCityBusAPIStationNameStatus299:
- return nil, value, nil
- }
- // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
- msg := fmt.Sprintf("unexpected success response for inter_city_bus: API contract not enforced by server. Client expected to get an error, but got: %T", result)
- panic(msg)
-}
-
/*
InterCityBusAPIStop 取得公路客運站牌資料s
diff --git a/bus/v2/models/service_d_t_o_version2_bus_bus_first_last_trip_info.go b/bus/v2/models/service_d_t_o_version2_bus_bus_first_last_trip_info.go
new file mode 100644
index 00000000..0099a0a7
--- /dev/null
+++ b/bus/v2/models/service_d_t_o_version2_bus_bus_first_last_trip_info.go
@@ -0,0 +1,280 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "strconv"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/strfmt"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// ServiceDTOVersion2BusBusFirstLastTripInfo BusFirstLastTripInfo
+//
+// 路線首末班車資料型別
+//
+// swagger:model Service.DTO.Version2.Bus.BusFirstLastTripInfo
+type ServiceDTOVersion2BusBusFirstLastTripInfo struct {
+
+ // integer
+ //
+ // 去返程 : [0:'去程',1:'返程',2:'迴圈',255:'未知']
+ // Required: true
+ Direction *int32 `json:"Direction"`
+
+ // 首末班車
+ // Required: true
+ FirstLastTrips []*ServiceDTOVersion2BusFirstLastTrip `json:"FirstLastTrips"`
+
+ // 營運業者代碼
+ // Required: true
+ OperatorID *string `json:"OperatorID"`
+
+ // 地區既用中之路線代碼(為原資料內碼)
+ // Required: true
+ RouteID *string `json:"RouteID"`
+
+ // NameType
+ //
+ // 路線名稱
+ // Required: true
+ RouteName *ServiceDTOVersion2BaseNameType `json:"RouteName"`
+
+ // 路線唯一識別代碼,規則為 {業管機關簡碼} + {RouteID},其中 {業管機關簡碼} 可於Authority API中的AuthorityCode欄位查詢
+ // Required: true
+ RouteUID *string `json:"RouteUID"`
+
+ // 地區既用中之附屬路線代碼(為原資料內碼)
+ // Required: true
+ SubRouteID *string `json:"SubRouteID"`
+
+ // NameType
+ //
+ // 附屬路線名稱
+ // Required: true
+ SubRouteName *ServiceDTOVersion2BaseNameType `json:"SubRouteName"`
+
+ // 附屬路線唯一識別代碼,規則為 {業管機關簡碼} + {SubRouteID},其中 {業管機關簡碼} 可於Authority API中的AuthorityCode欄位查詢
+ // Required: true
+ SubRouteUID *string `json:"SubRouteUID"`
+
+ // DateTime
+ //
+ // 資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)
+ // Required: true
+ UpdateTime *string `json:"UpdateTime"`
+
+ // 資料版本編號
+ // Required: true
+ VersionID *int32 `json:"VersionID"`
+}
+
+// Validate validates this service d t o version2 bus bus first last trip info
+func (m *ServiceDTOVersion2BusBusFirstLastTripInfo) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateDirection(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateFirstLastTrips(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateOperatorID(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateRouteID(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateRouteName(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateRouteUID(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateSubRouteID(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateSubRouteName(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateSubRouteUID(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateUpdateTime(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateVersionID(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *ServiceDTOVersion2BusBusFirstLastTripInfo) validateDirection(formats strfmt.Registry) error {
+
+ if err := validate.Required("Direction", "body", m.Direction); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *ServiceDTOVersion2BusBusFirstLastTripInfo) validateFirstLastTrips(formats strfmt.Registry) error {
+
+ if err := validate.Required("FirstLastTrips", "body", m.FirstLastTrips); err != nil {
+ return err
+ }
+
+ for i := 0; i < len(m.FirstLastTrips); i++ {
+ if swag.IsZero(m.FirstLastTrips[i]) { // not required
+ continue
+ }
+
+ if m.FirstLastTrips[i] != nil {
+ if err := m.FirstLastTrips[i].Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("FirstLastTrips" + "." + strconv.Itoa(i))
+ }
+ return err
+ }
+ }
+
+ }
+
+ return nil
+}
+
+func (m *ServiceDTOVersion2BusBusFirstLastTripInfo) validateOperatorID(formats strfmt.Registry) error {
+
+ if err := validate.Required("OperatorID", "body", m.OperatorID); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *ServiceDTOVersion2BusBusFirstLastTripInfo) validateRouteID(formats strfmt.Registry) error {
+
+ if err := validate.Required("RouteID", "body", m.RouteID); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *ServiceDTOVersion2BusBusFirstLastTripInfo) validateRouteName(formats strfmt.Registry) error {
+
+ if err := validate.Required("RouteName", "body", m.RouteName); err != nil {
+ return err
+ }
+
+ if m.RouteName != nil {
+ if err := m.RouteName.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("RouteName")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *ServiceDTOVersion2BusBusFirstLastTripInfo) validateRouteUID(formats strfmt.Registry) error {
+
+ if err := validate.Required("RouteUID", "body", m.RouteUID); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *ServiceDTOVersion2BusBusFirstLastTripInfo) validateSubRouteID(formats strfmt.Registry) error {
+
+ if err := validate.Required("SubRouteID", "body", m.SubRouteID); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *ServiceDTOVersion2BusBusFirstLastTripInfo) validateSubRouteName(formats strfmt.Registry) error {
+
+ if err := validate.Required("SubRouteName", "body", m.SubRouteName); err != nil {
+ return err
+ }
+
+ if m.SubRouteName != nil {
+ if err := m.SubRouteName.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("SubRouteName")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *ServiceDTOVersion2BusBusFirstLastTripInfo) validateSubRouteUID(formats strfmt.Registry) error {
+
+ if err := validate.Required("SubRouteUID", "body", m.SubRouteUID); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *ServiceDTOVersion2BusBusFirstLastTripInfo) validateUpdateTime(formats strfmt.Registry) error {
+
+ if err := validate.Required("UpdateTime", "body", m.UpdateTime); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *ServiceDTOVersion2BusBusFirstLastTripInfo) validateVersionID(formats strfmt.Registry) error {
+
+ if err := validate.Required("VersionID", "body", m.VersionID); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *ServiceDTOVersion2BusBusFirstLastTripInfo) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *ServiceDTOVersion2BusBusFirstLastTripInfo) UnmarshalBinary(b []byte) error {
+ var res ServiceDTOVersion2BusBusFirstLastTripInfo
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/bus/v2/models/service_d_t_o_version2_bus_bus_first_last_trip_info_service_day.go b/bus/v2/models/service_d_t_o_version2_bus_bus_first_last_trip_info_service_day.go
new file mode 100644
index 00000000..2be61821
--- /dev/null
+++ b/bus/v2/models/service_d_t_o_version2_bus_bus_first_last_trip_info_service_day.go
@@ -0,0 +1,200 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/strfmt"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// ServiceDTOVersion2BusBusFirstLastTripInfoServiceDay ServiceDay
+//
+// swagger:model Service.DTO.Version2.Bus.BusFirstLastTripInfo.ServiceDay
+type ServiceDTOVersion2BusBusFirstLastTripInfoServiceDay struct {
+
+ // integer
+ //
+ // 國定假日後一日營運與否 : [0:'否',1:'是']
+ DayAfterNationalHoliday int32 `json:"DayAfterNationalHoliday,omitempty"`
+
+ // integer
+ //
+ // 國定假日前一日營運與否 : [0:'否',1:'是']
+ DayBeforeNationalHoliday int32 `json:"DayBeforeNationalHoliday,omitempty"`
+
+ // integer
+ //
+ // 星期五是否營運 : [0:'否',1:'是']
+ // Required: true
+ Friday *int32 `json:"Friday"`
+
+ // integer
+ //
+ // 星期一是否營運 : [0:'否',1:'是']
+ // Required: true
+ Monday *int32 `json:"Monday"`
+
+ // integer
+ //
+ // 國定假日營運與否 : [0:'否',1:'是']
+ NationalHolidays int32 `json:"NationalHolidays,omitempty"`
+
+ // integer
+ //
+ // 星期六是否營運 : [0:'否',1:'是']
+ // Required: true
+ Saturday *int32 `json:"Saturday"`
+
+ // integer
+ //
+ // 星期日是否營運 : [0:'否',1:'是']
+ // Required: true
+ Sunday *int32 `json:"Sunday"`
+
+ // integer
+ //
+ // 星期四是否營運 : [0:'否',1:'是']
+ // Required: true
+ Thursday *int32 `json:"Thursday"`
+
+ // integer
+ //
+ // 星期二是否營運 : [0:'否',1:'是']
+ // Required: true
+ Tuesday *int32 `json:"Tuesday"`
+
+ // integer
+ //
+ // 颱風停止上班上課期間營運與否 : [0:'否',1:'是']
+ TyphoonDay int32 `json:"TyphoonDay,omitempty"`
+
+ // integer
+ //
+ // 星期三是否營運 : [0:'否',1:'是']
+ // Required: true
+ Wednesday *int32 `json:"Wednesday"`
+}
+
+// Validate validates this service d t o version2 bus bus first last trip info service day
+func (m *ServiceDTOVersion2BusBusFirstLastTripInfoServiceDay) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateFriday(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateMonday(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateSaturday(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateSunday(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateThursday(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateTuesday(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateWednesday(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *ServiceDTOVersion2BusBusFirstLastTripInfoServiceDay) validateFriday(formats strfmt.Registry) error {
+
+ if err := validate.Required("Friday", "body", m.Friday); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *ServiceDTOVersion2BusBusFirstLastTripInfoServiceDay) validateMonday(formats strfmt.Registry) error {
+
+ if err := validate.Required("Monday", "body", m.Monday); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *ServiceDTOVersion2BusBusFirstLastTripInfoServiceDay) validateSaturday(formats strfmt.Registry) error {
+
+ if err := validate.Required("Saturday", "body", m.Saturday); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *ServiceDTOVersion2BusBusFirstLastTripInfoServiceDay) validateSunday(formats strfmt.Registry) error {
+
+ if err := validate.Required("Sunday", "body", m.Sunday); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *ServiceDTOVersion2BusBusFirstLastTripInfoServiceDay) validateThursday(formats strfmt.Registry) error {
+
+ if err := validate.Required("Thursday", "body", m.Thursday); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *ServiceDTOVersion2BusBusFirstLastTripInfoServiceDay) validateTuesday(formats strfmt.Registry) error {
+
+ if err := validate.Required("Tuesday", "body", m.Tuesday); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *ServiceDTOVersion2BusBusFirstLastTripInfoServiceDay) validateWednesday(formats strfmt.Registry) error {
+
+ if err := validate.Required("Wednesday", "body", m.Wednesday); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *ServiceDTOVersion2BusBusFirstLastTripInfoServiceDay) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *ServiceDTOVersion2BusBusFirstLastTripInfoServiceDay) UnmarshalBinary(b []byte) error {
+ var res ServiceDTOVersion2BusBusFirstLastTripInfoServiceDay
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/bus/v2/models/service_d_t_o_version2_bus_bus_station.go b/bus/v2/models/service_d_t_o_version2_bus_bus_station.go
index 0584614c..fdc12aae 100644
--- a/bus/v2/models/service_d_t_o_version2_bus_bus_station.go
+++ b/bus/v2/models/service_d_t_o_version2_bus_bus_station.go
@@ -38,10 +38,6 @@ type ServiceDTOVersion2BusBusStation struct {
// Required: true
StationName *ServiceDTOVersion2BaseNameType `json:"StationName"`
- // 站牌所屬的站名碼ID
- // Required: true
- StationNameID *string `json:"StationNameID"`
-
// PointType
//
// 站位位置
@@ -82,10 +78,6 @@ func (m *ServiceDTOVersion2BusBusStation) Validate(formats strfmt.Registry) erro
res = append(res, err)
}
- if err := m.validateStationNameID(formats); err != nil {
- res = append(res, err)
- }
-
if err := m.validateStationPosition(formats); err != nil {
res = append(res, err)
}
@@ -148,15 +140,6 @@ func (m *ServiceDTOVersion2BusBusStation) validateStationName(formats strfmt.Reg
return nil
}
-func (m *ServiceDTOVersion2BusBusStation) validateStationNameID(formats strfmt.Registry) error {
-
- if err := validate.Required("StationNameID", "body", m.StationNameID); err != nil {
- return err
- }
-
- return nil
-}
-
func (m *ServiceDTOVersion2BusBusStation) validateStationPosition(formats strfmt.Registry) error {
if err := validate.Required("StationPosition", "body", m.StationPosition); err != nil {
diff --git a/bus/v2/models/service_d_t_o_version2_bus_bus_station_name.go b/bus/v2/models/service_d_t_o_version2_bus_bus_station_name.go
deleted file mode 100644
index a3d0c1c1..00000000
--- a/bus/v2/models/service_d_t_o_version2_bus_bus_station_name.go
+++ /dev/null
@@ -1,175 +0,0 @@
-// Code generated by go-swagger; DO NOT EDIT.
-
-package models
-
-// This file was generated by the swagger tool.
-// Editing this file might prove futile when you re-run the swagger generate command
-
-import (
- "github.com/go-openapi/errors"
- "github.com/go-openapi/strfmt"
- "github.com/go-openapi/swag"
- "github.com/go-openapi/validate"
-)
-
-// ServiceDTOVersion2BusBusStationName BusStationName
-//
-// 站名碼資料型別
-//
-// swagger:model Service.DTO.Version2.Bus.BusStationName
-type ServiceDTOVersion2BusBusStationName struct {
-
- // 站名碼代碼
- // Required: true
- StationNameID *string `json:"StationNameID"`
-
- // NameType
- //
- // 站名碼名稱
- // Required: true
- StationNameName *ServiceDTOVersion2BaseNameType `json:"StationNameName"`
-
- // PointType
- //
- // 站名碼位置
- // Required: true
- StationNamePosition *ServiceDTOVersion2BasePointType `json:"StationNamePosition"`
-
- // 站名碼唯一識別代碼,規則為 {業管機關簡碼} + {StationID},其中 {業管機關簡碼} 可於Authority API中的AuthorityCode欄位查詢
- // Required: true
- StationNameUID *string `json:"StationNameUID"`
-
- // DateTime
- //
- // 資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)
- // Required: true
- UpdateTime *string `json:"UpdateTime"`
-
- // 資料版本編號
- // Required: true
- VersionID *int32 `json:"VersionID"`
-}
-
-// Validate validates this service d t o version2 bus bus station name
-func (m *ServiceDTOVersion2BusBusStationName) Validate(formats strfmt.Registry) error {
- var res []error
-
- if err := m.validateStationNameID(formats); err != nil {
- res = append(res, err)
- }
-
- if err := m.validateStationNameName(formats); err != nil {
- res = append(res, err)
- }
-
- if err := m.validateStationNamePosition(formats); err != nil {
- res = append(res, err)
- }
-
- if err := m.validateStationNameUID(formats); err != nil {
- res = append(res, err)
- }
-
- if err := m.validateUpdateTime(formats); err != nil {
- res = append(res, err)
- }
-
- if err := m.validateVersionID(formats); err != nil {
- res = append(res, err)
- }
-
- if len(res) > 0 {
- return errors.CompositeValidationError(res...)
- }
- return nil
-}
-
-func (m *ServiceDTOVersion2BusBusStationName) validateStationNameID(formats strfmt.Registry) error {
-
- if err := validate.Required("StationNameID", "body", m.StationNameID); err != nil {
- return err
- }
-
- return nil
-}
-
-func (m *ServiceDTOVersion2BusBusStationName) validateStationNameName(formats strfmt.Registry) error {
-
- if err := validate.Required("StationNameName", "body", m.StationNameName); err != nil {
- return err
- }
-
- if m.StationNameName != nil {
- if err := m.StationNameName.Validate(formats); err != nil {
- if ve, ok := err.(*errors.Validation); ok {
- return ve.ValidateName("StationNameName")
- }
- return err
- }
- }
-
- return nil
-}
-
-func (m *ServiceDTOVersion2BusBusStationName) validateStationNamePosition(formats strfmt.Registry) error {
-
- if err := validate.Required("StationNamePosition", "body", m.StationNamePosition); err != nil {
- return err
- }
-
- if m.StationNamePosition != nil {
- if err := m.StationNamePosition.Validate(formats); err != nil {
- if ve, ok := err.(*errors.Validation); ok {
- return ve.ValidateName("StationNamePosition")
- }
- return err
- }
- }
-
- return nil
-}
-
-func (m *ServiceDTOVersion2BusBusStationName) validateStationNameUID(formats strfmt.Registry) error {
-
- if err := validate.Required("StationNameUID", "body", m.StationNameUID); err != nil {
- return err
- }
-
- return nil
-}
-
-func (m *ServiceDTOVersion2BusBusStationName) validateUpdateTime(formats strfmt.Registry) error {
-
- if err := validate.Required("UpdateTime", "body", m.UpdateTime); err != nil {
- return err
- }
-
- return nil
-}
-
-func (m *ServiceDTOVersion2BusBusStationName) validateVersionID(formats strfmt.Registry) error {
-
- if err := validate.Required("VersionID", "body", m.VersionID); err != nil {
- return err
- }
-
- return nil
-}
-
-// MarshalBinary interface implementation
-func (m *ServiceDTOVersion2BusBusStationName) MarshalBinary() ([]byte, error) {
- if m == nil {
- return nil, nil
- }
- return swag.WriteJSON(m)
-}
-
-// UnmarshalBinary interface implementation
-func (m *ServiceDTOVersion2BusBusStationName) UnmarshalBinary(b []byte) error {
- var res ServiceDTOVersion2BusBusStationName
- if err := swag.ReadJSON(b, &res); err != nil {
- return err
- }
- *m = res
- return nil
-}
diff --git a/bus/v2/models/service_d_t_o_version2_bus_bus_stop.go b/bus/v2/models/service_d_t_o_version2_bus_bus_stop.go
index 09815886..3cec669c 100644
--- a/bus/v2/models/service_d_t_o_version2_bus_bus_stop.go
+++ b/bus/v2/models/service_d_t_o_version2_bus_bus_stop.go
@@ -42,10 +42,6 @@ type ServiceDTOVersion2BusBusStop struct {
// 站牌所屬的站位ID
StationID string `json:"StationID,omitempty"`
- // 站牌所屬的站名碼ID
- // Required: true
- StationNameID *string `json:"StationNameID"`
-
// 站牌地址
StopAddress string `json:"StopAddress,omitempty"`
@@ -95,10 +91,6 @@ func (m *ServiceDTOVersion2BusBusStop) Validate(formats strfmt.Registry) error {
res = append(res, err)
}
- if err := m.validateStationNameID(formats); err != nil {
- res = append(res, err)
- }
-
if err := m.validateStopID(formats); err != nil {
res = append(res, err)
}
@@ -147,15 +139,6 @@ func (m *ServiceDTOVersion2BusBusStop) validateStationGroupID(formats strfmt.Reg
return nil
}
-func (m *ServiceDTOVersion2BusBusStop) validateStationNameID(formats strfmt.Registry) error {
-
- if err := validate.Required("StationNameID", "body", m.StationNameID); err != nil {
- return err
- }
-
- return nil
-}
-
func (m *ServiceDTOVersion2BusBusStop) validateStopID(formats strfmt.Registry) error {
if err := validate.Required("StopID", "body", m.StopID); err != nil {
diff --git a/bus/v2/models/service_d_t_o_version2_bus_first_last_trip.go b/bus/v2/models/service_d_t_o_version2_bus_first_last_trip.go
new file mode 100644
index 00000000..f3f39588
--- /dev/null
+++ b/bus/v2/models/service_d_t_o_version2_bus_first_last_trip.go
@@ -0,0 +1,111 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/strfmt"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// ServiceDTOVersion2BusFirstLastTrip FirstLastTrip
+//
+// 首末班車資料型別
+//
+// swagger:model Service.DTO.Version2.Bus.FirstLastTrip
+type ServiceDTOVersion2BusFirstLastTrip struct {
+
+ // 頭班車發車時間(HH:mm)
+ // Required: true
+ FirstTripDepTime *string `json:"FirstTripDepTime"`
+
+ // 末班車發車時間(HH:mm)
+ // Required: true
+ LastTripDepTime *string `json:"LastTripDepTime"`
+
+ // ServiceDay
+ //
+ // 服務日型態
+ // Required: true
+ ServiceDay *ServiceDTOVersion2BusBusFirstLastTripInfoServiceDay `json:"ServiceDay"`
+}
+
+// Validate validates this service d t o version2 bus first last trip
+func (m *ServiceDTOVersion2BusFirstLastTrip) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateFirstTripDepTime(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateLastTripDepTime(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateServiceDay(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *ServiceDTOVersion2BusFirstLastTrip) validateFirstTripDepTime(formats strfmt.Registry) error {
+
+ if err := validate.Required("FirstTripDepTime", "body", m.FirstTripDepTime); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *ServiceDTOVersion2BusFirstLastTrip) validateLastTripDepTime(formats strfmt.Registry) error {
+
+ if err := validate.Required("LastTripDepTime", "body", m.LastTripDepTime); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *ServiceDTOVersion2BusFirstLastTrip) validateServiceDay(formats strfmt.Registry) error {
+
+ if err := validate.Required("ServiceDay", "body", m.ServiceDay); err != nil {
+ return err
+ }
+
+ if m.ServiceDay != nil {
+ if err := m.ServiceDay.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("ServiceDay")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *ServiceDTOVersion2BusFirstLastTrip) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *ServiceDTOVersion2BusFirstLastTrip) UnmarshalBinary(b []byte) error {
+ var res ServiceDTOVersion2BusFirstLastTrip
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/bus/v2/models/service_d_t_o_version2_bus_stop.go b/bus/v2/models/service_d_t_o_version2_bus_stop.go
index af202d2f..ceeff00a 100644
--- a/bus/v2/models/service_d_t_o_version2_bus_stop.go
+++ b/bus/v2/models/service_d_t_o_version2_bus_stop.go
@@ -29,10 +29,6 @@ type ServiceDTOVersion2BusStop struct {
// 站牌所屬的站位ID
StationID string `json:"StationID,omitempty"`
- // 站牌所屬的站名碼ID
- // Required: true
- StationNameID *string `json:"StationNameID"`
-
// integer
//
// 上下車站別 : [-1:'可下車',0:'可上下車',1:'可上車']
@@ -71,10 +67,6 @@ func (m *ServiceDTOVersion2BusStop) Validate(formats strfmt.Registry) error {
res = append(res, err)
}
- if err := m.validateStationNameID(formats); err != nil {
- res = append(res, err)
- }
-
if err := m.validateStopID(formats); err != nil {
res = append(res, err)
}
@@ -110,15 +102,6 @@ func (m *ServiceDTOVersion2BusStop) validateStationGroupID(formats strfmt.Regist
return nil
}
-func (m *ServiceDTOVersion2BusStop) validateStationNameID(formats strfmt.Registry) error {
-
- if err := validate.Required("StationNameID", "body", m.StationNameID); err != nil {
- return err
- }
-
- return nil
-}
-
func (m *ServiceDTOVersion2BusStop) validateStopID(formats strfmt.Registry) error {
if err := validate.Required("StopID", "body", m.StopID); err != nil {
diff --git a/bus/v3/client/city_bus/city_bus_api_alert_responses.go b/bus/v3/client/city_bus/city_bus_api_alert_responses.go
index 5b97825d..3d08cf90 100644
--- a/bus/v3/client/city_bus/city_bus_api_alert_responses.go
+++ b/bus/v3/client/city_bus/city_bus_api_alert_responses.go
@@ -37,7 +37,7 @@ func (o *CityBusAPIAlertReader) ReadResponse(response runtime.ClientResponse, co
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/bus/v3/client/city_bus/city_bus_api_daily_time_table_responses.go b/bus/v3/client/city_bus/city_bus_api_daily_time_table_responses.go
index 9ba29382..8571d762 100644
--- a/bus/v3/client/city_bus/city_bus_api_daily_time_table_responses.go
+++ b/bus/v3/client/city_bus/city_bus_api_daily_time_table_responses.go
@@ -37,7 +37,7 @@ func (o *CityBusAPIDailyTimeTableReader) ReadResponse(response runtime.ClientRes
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/bus/v3/client/city_bus/city_bus_api_depot_responses.go b/bus/v3/client/city_bus/city_bus_api_depot_responses.go
index 9e67ca16..7e337c4c 100644
--- a/bus/v3/client/city_bus/city_bus_api_depot_responses.go
+++ b/bus/v3/client/city_bus/city_bus_api_depot_responses.go
@@ -37,7 +37,7 @@ func (o *CityBusAPIDepotReader) ReadResponse(response runtime.ClientResponse, co
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/bus/v3/client/city_bus/city_bus_api_display_stop_of_route_responses.go b/bus/v3/client/city_bus/city_bus_api_display_stop_of_route_responses.go
index 0b8cb183..0d09d924 100644
--- a/bus/v3/client/city_bus/city_bus_api_display_stop_of_route_responses.go
+++ b/bus/v3/client/city_bus/city_bus_api_display_stop_of_route_responses.go
@@ -37,7 +37,7 @@ func (o *CityBusAPIDisplayStopOfRouteReader) ReadResponse(response runtime.Clien
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/bus/v3/client/city_bus/city_bus_api_estimated_time_of_arrival1_responses.go b/bus/v3/client/city_bus/city_bus_api_estimated_time_of_arrival1_responses.go
index b1a2c238..e515b700 100644
--- a/bus/v3/client/city_bus/city_bus_api_estimated_time_of_arrival1_responses.go
+++ b/bus/v3/client/city_bus/city_bus_api_estimated_time_of_arrival1_responses.go
@@ -37,7 +37,7 @@ func (o *CityBusAPIEstimatedTimeOfArrival1Reader) ReadResponse(response runtime.
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/bus/v3/client/city_bus/city_bus_api_estimated_time_of_arrival_responses.go b/bus/v3/client/city_bus/city_bus_api_estimated_time_of_arrival_responses.go
index 62de8b2c..23ae4abb 100644
--- a/bus/v3/client/city_bus/city_bus_api_estimated_time_of_arrival_responses.go
+++ b/bus/v3/client/city_bus/city_bus_api_estimated_time_of_arrival_responses.go
@@ -37,7 +37,7 @@ func (o *CityBusAPIEstimatedTimeOfArrivalReader) ReadResponse(response runtime.C
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/bus/v3/client/city_bus/city_bus_api_first_last_trip_info_responses.go b/bus/v3/client/city_bus/city_bus_api_first_last_trip_info_responses.go
index cef29224..0d6f4808 100644
--- a/bus/v3/client/city_bus/city_bus_api_first_last_trip_info_responses.go
+++ b/bus/v3/client/city_bus/city_bus_api_first_last_trip_info_responses.go
@@ -37,7 +37,7 @@ func (o *CityBusAPIFirstLastTripInfoReader) ReadResponse(response runtime.Client
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/bus/v3/client/city_bus/city_bus_api_network_responses.go b/bus/v3/client/city_bus/city_bus_api_network_responses.go
index 77763a2e..19fe83b7 100644
--- a/bus/v3/client/city_bus/city_bus_api_network_responses.go
+++ b/bus/v3/client/city_bus/city_bus_api_network_responses.go
@@ -37,7 +37,7 @@ func (o *CityBusAPINetworkReader) ReadResponse(response runtime.ClientResponse,
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/bus/v3/client/city_bus/city_bus_api_news_responses.go b/bus/v3/client/city_bus/city_bus_api_news_responses.go
index 57c048d3..8d8eea77 100644
--- a/bus/v3/client/city_bus/city_bus_api_news_responses.go
+++ b/bus/v3/client/city_bus/city_bus_api_news_responses.go
@@ -37,7 +37,7 @@ func (o *CityBusAPINewsReader) ReadResponse(response runtime.ClientResponse, con
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/bus/v3/client/city_bus/city_bus_api_operator_responses.go b/bus/v3/client/city_bus/city_bus_api_operator_responses.go
index 3bae5fb3..53fb3f2e 100644
--- a/bus/v3/client/city_bus/city_bus_api_operator_responses.go
+++ b/bus/v3/client/city_bus/city_bus_api_operator_responses.go
@@ -37,7 +37,7 @@ func (o *CityBusAPIOperatorReader) ReadResponse(response runtime.ClientResponse,
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/bus/v3/client/city_bus/city_bus_api_real_time_by_frequency1_responses.go b/bus/v3/client/city_bus/city_bus_api_real_time_by_frequency1_responses.go
index 2b9cbfc6..e655d327 100644
--- a/bus/v3/client/city_bus/city_bus_api_real_time_by_frequency1_responses.go
+++ b/bus/v3/client/city_bus/city_bus_api_real_time_by_frequency1_responses.go
@@ -37,7 +37,7 @@ func (o *CityBusAPIRealTimeByFrequency1Reader) ReadResponse(response runtime.Cli
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/bus/v3/client/city_bus/city_bus_api_real_time_by_frequency_responses.go b/bus/v3/client/city_bus/city_bus_api_real_time_by_frequency_responses.go
index 3593118f..7056646a 100644
--- a/bus/v3/client/city_bus/city_bus_api_real_time_by_frequency_responses.go
+++ b/bus/v3/client/city_bus/city_bus_api_real_time_by_frequency_responses.go
@@ -37,7 +37,7 @@ func (o *CityBusAPIRealTimeByFrequencyReader) ReadResponse(response runtime.Clie
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/bus/v3/client/city_bus/city_bus_api_real_time_near_stop1_responses.go b/bus/v3/client/city_bus/city_bus_api_real_time_near_stop1_responses.go
index bce8ca29..2fece85f 100644
--- a/bus/v3/client/city_bus/city_bus_api_real_time_near_stop1_responses.go
+++ b/bus/v3/client/city_bus/city_bus_api_real_time_near_stop1_responses.go
@@ -37,7 +37,7 @@ func (o *CityBusAPIRealTimeNearStop1Reader) ReadResponse(response runtime.Client
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/bus/v3/client/city_bus/city_bus_api_real_time_near_stop_responses.go b/bus/v3/client/city_bus/city_bus_api_real_time_near_stop_responses.go
index 3edc160b..f4af3b9e 100644
--- a/bus/v3/client/city_bus/city_bus_api_real_time_near_stop_responses.go
+++ b/bus/v3/client/city_bus/city_bus_api_real_time_near_stop_responses.go
@@ -37,7 +37,7 @@ func (o *CityBusAPIRealTimeNearStopReader) ReadResponse(response runtime.ClientR
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/bus/v3/client/city_bus/city_bus_api_route_fare_responses.go b/bus/v3/client/city_bus/city_bus_api_route_fare_responses.go
index 17a465a0..421c1a48 100644
--- a/bus/v3/client/city_bus/city_bus_api_route_fare_responses.go
+++ b/bus/v3/client/city_bus/city_bus_api_route_fare_responses.go
@@ -37,7 +37,7 @@ func (o *CityBusAPIRouteFareReader) ReadResponse(response runtime.ClientResponse
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/bus/v3/client/city_bus/city_bus_api_route_network_responses.go b/bus/v3/client/city_bus/city_bus_api_route_network_responses.go
index d8237476..e595f412 100644
--- a/bus/v3/client/city_bus/city_bus_api_route_network_responses.go
+++ b/bus/v3/client/city_bus/city_bus_api_route_network_responses.go
@@ -37,7 +37,7 @@ func (o *CityBusAPIRouteNetworkReader) ReadResponse(response runtime.ClientRespo
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/bus/v3/client/city_bus/city_bus_api_route_responses.go b/bus/v3/client/city_bus/city_bus_api_route_responses.go
index 61619e23..f3f49f8c 100644
--- a/bus/v3/client/city_bus/city_bus_api_route_responses.go
+++ b/bus/v3/client/city_bus/city_bus_api_route_responses.go
@@ -37,7 +37,7 @@ func (o *CityBusAPIRouteReader) ReadResponse(response runtime.ClientResponse, co
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/bus/v3/client/city_bus/city_bus_api_s2_s_travel_time_responses.go b/bus/v3/client/city_bus/city_bus_api_s2_s_travel_time_responses.go
index f954d315..b17b9082 100644
--- a/bus/v3/client/city_bus/city_bus_api_s2_s_travel_time_responses.go
+++ b/bus/v3/client/city_bus/city_bus_api_s2_s_travel_time_responses.go
@@ -37,7 +37,7 @@ func (o *CityBusAPIS2STravelTimeReader) ReadResponse(response runtime.ClientResp
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/bus/v3/client/city_bus/city_bus_api_schedule_responses.go b/bus/v3/client/city_bus/city_bus_api_schedule_responses.go
index 484c01de..83a81078 100644
--- a/bus/v3/client/city_bus/city_bus_api_schedule_responses.go
+++ b/bus/v3/client/city_bus/city_bus_api_schedule_responses.go
@@ -37,7 +37,7 @@ func (o *CityBusAPIScheduleReader) ReadResponse(response runtime.ClientResponse,
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/bus/v3/client/city_bus/city_bus_api_shape_responses.go b/bus/v3/client/city_bus/city_bus_api_shape_responses.go
index b994d625..b6dbcc9d 100644
--- a/bus/v3/client/city_bus/city_bus_api_shape_responses.go
+++ b/bus/v3/client/city_bus/city_bus_api_shape_responses.go
@@ -37,7 +37,7 @@ func (o *CityBusAPIShapeReader) ReadResponse(response runtime.ClientResponse, co
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/bus/v3/client/city_bus/city_bus_api_station_responses.go b/bus/v3/client/city_bus/city_bus_api_station_responses.go
index a50c901a..5972f2cf 100644
--- a/bus/v3/client/city_bus/city_bus_api_station_responses.go
+++ b/bus/v3/client/city_bus/city_bus_api_station_responses.go
@@ -37,7 +37,7 @@ func (o *CityBusAPIStationReader) ReadResponse(response runtime.ClientResponse,
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/bus/v3/client/city_bus/city_bus_api_stop_of_route_responses.go b/bus/v3/client/city_bus/city_bus_api_stop_of_route_responses.go
index 5f793f69..a8484f6c 100644
--- a/bus/v3/client/city_bus/city_bus_api_stop_of_route_responses.go
+++ b/bus/v3/client/city_bus/city_bus_api_stop_of_route_responses.go
@@ -37,7 +37,7 @@ func (o *CityBusAPIStopOfRouteReader) ReadResponse(response runtime.ClientRespon
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/bus/v3/client/city_bus/city_bus_api_stop_responses.go b/bus/v3/client/city_bus/city_bus_api_stop_responses.go
index dd97db75..a6eea172 100644
--- a/bus/v3/client/city_bus/city_bus_api_stop_responses.go
+++ b/bus/v3/client/city_bus/city_bus_api_stop_responses.go
@@ -37,7 +37,7 @@ func (o *CityBusAPIStopReader) ReadResponse(response runtime.ClientResponse, con
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/bus/v3/client/city_bus/city_bus_api_sub_route_responses.go b/bus/v3/client/city_bus/city_bus_api_sub_route_responses.go
index 047eac66..078b18d3 100644
--- a/bus/v3/client/city_bus/city_bus_api_sub_route_responses.go
+++ b/bus/v3/client/city_bus/city_bus_api_sub_route_responses.go
@@ -37,7 +37,7 @@ func (o *CityBusAPISubRouteReader) ReadResponse(response runtime.ClientResponse,
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/bus/v3/client/city_bus/city_bus_api_vehicle_depot_responses.go b/bus/v3/client/city_bus/city_bus_api_vehicle_depot_responses.go
index 51259a70..b2f1e1ba 100644
--- a/bus/v3/client/city_bus/city_bus_api_vehicle_depot_responses.go
+++ b/bus/v3/client/city_bus/city_bus_api_vehicle_depot_responses.go
@@ -37,7 +37,7 @@ func (o *CityBusAPIVehicleDepotReader) ReadResponse(response runtime.ClientRespo
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/bus/v3/client/city_bus/city_bus_api_vehicle_responses.go b/bus/v3/client/city_bus/city_bus_api_vehicle_responses.go
index 5d0d4c27..5c018b4a 100644
--- a/bus/v3/client/city_bus/city_bus_api_vehicle_responses.go
+++ b/bus/v3/client/city_bus/city_bus_api_vehicle_responses.go
@@ -37,7 +37,7 @@ func (o *CityBusAPIVehicleReader) ReadResponse(response runtime.ClientResponse,
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/bus/v3/client/city_bus/city_bus_api_vehicle_route_responses.go b/bus/v3/client/city_bus/city_bus_api_vehicle_route_responses.go
index 93929639..32c5411f 100644
--- a/bus/v3/client/city_bus/city_bus_api_vehicle_route_responses.go
+++ b/bus/v3/client/city_bus/city_bus_api_vehicle_route_responses.go
@@ -37,7 +37,7 @@ func (o *CityBusAPIVehicleRouteReader) ReadResponse(response runtime.ClientRespo
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/oas.air.v2.json b/oas.air.v2.json
index 9642657d..282bb79a 100644
--- a/oas.air.v2.json
+++ b/oas.air.v2.json
@@ -1,12 +1,12 @@
{
"swagger": "2.0",
"info": {
- "version": "v2",
"title": "MOTC Transport API V2",
- "description": "本平臺提供涵蓋全國尺度之公車、臺鐵、高鐵、捷運、航空、自行車等公共運輸旅運資料服務API,歡迎各產政學單位介接使用。\r\n
利用本平臺開放資料進行各項應用服務開發時,請考量不同特性使用者(如:性別/身心障礙/老幼等)的需求,並歡迎回饋寶貴意見。\r\n
資料使用葵花寶典:[請點我](https://ptxmotc.gitbooks.io/ptx-api-documentation/content/)\r\n
資料服務開發實作參考手冊:[請點我](https://docs.google.com/viewer?url=https://github.com/ptxmotc/PTX_Web/blob/master/Swagger%E6%9C%8D%E5%8B%99%E8%AA%AA%E6%98%8E%E4%B8%8A%E5%82%B3%E5%8F%83%E8%80%83%E6%AA%94%E6%A1%88/%E5%85%AC%E5%85%B1%E9%81%8B%E8%BC%B8%E6%95%B4%E5%90%88%E8%B3%87%E8%A8%8A%E5%B9%B3%E5%8F%B0%E8%B3%87%E6%96%99%E6%9C%8D%E5%8B%99%E9%96%8B%E7%99%BC%E5%AF%A6%E4%BD%9C.pdf?raw=true)\r\n
API URI Convention文件說明:[請點我](https://docs.google.com/viewer?url=https://github.com/ptxmotc/PTX_Web/blob/master/Swagger%E6%9C%8D%E5%8B%99%E8%AA%AA%E6%98%8E%E4%B8%8A%E5%82%B3%E5%8F%83%E8%80%83%E6%AA%94%E6%A1%88/API_URI_Convention%E6%96%87%E4%BB%B6_v1.pdf?raw=true)
資料文本OAS描述:[請點我](https://ptx.transportdata.tw/MOTC/v2/Air/api-docs/oas)"
+ "description": "本平臺提供涵蓋全國尺度之公車、臺鐵、高鐵、捷運、航空、自行車等公共運輸旅運資料服務API,歡迎各產政學單位介接使用。\n
利用本平臺開放資料進行各項應用服務開發時,請考量不同特性使用者(如:性別/身心障礙/老幼等)的需求,並歡迎回饋寶貴意見。\n
資料使用葵花寶典:[請點我](https://motc-ptx-api-documentation.gitbook.io/motc-ptx-api-documentation/)\n
資料服務開發實作參考手冊:[請點我](https://docs.google.com/viewer?url=https://github.com/ptxmotc/PTX_Web/blob/master/Swagger%E6%9C%8D%E5%8B%99%E8%AA%AA%E6%98%8E%E4%B8%8A%E5%82%B3%E5%8F%83%E8%80%83%E6%AA%94%E6%A1%88/%E5%85%AC%E5%85%B1%E9%81%8B%E8%BC%B8%E6%95%B4%E5%90%88%E8%B3%87%E8%A8%8A%E5%B9%B3%E5%8F%B0%E8%B3%87%E6%96%99%E6%9C%8D%E5%8B%99%E9%96%8B%E7%99%BC%E5%AF%A6%E4%BD%9C.pdf?raw=true)\n
API URI Convention文件說明:[請點我](https://docs.google.com/viewer?url=https://github.com/ptxmotc/PTX_Web/blob/master/Swagger%E6%9C%8D%E5%8B%99%E8%AA%AA%E6%98%8E%E4%B8%8A%E5%82%B3%E5%8F%83%E8%80%83%E6%AA%94%E6%A1%88/API_URI_Convention%E6%96%87%E4%BB%B6_v1.pdf?raw=true)
資料文本OAS描述:[請點我](https://ptx.transportdata.tw/MOTC/v2/Air/api-docs/oas)",
+ "version": "v2"
},
"host": "ptx.transportdata.tw",
- "basePath": "/MOTC/",
+ "basePath": "/MOTC",
"schemes": [
"https"
],
@@ -19,52 +19,51 @@
"summary": "取得機場資料",
"description": "取得所有機場資料",
"operationId": "AirApi_Airport",
- "consumes": [],
"produces": [
"application/json",
- "text/json"
+ "application/xml"
],
"parameters": [
{
- "name": "$select",
"in": "query",
+ "name": "$select",
"description": "挑選",
"type": "string"
},
{
- "name": "$filter",
"in": "query",
+ "name": "$filter",
"description": "過濾",
"type": "string"
},
{
- "name": "$orderby",
"in": "query",
+ "name": "$orderby",
"description": "排序",
"type": "string"
},
{
- "name": "$top",
"in": "query",
+ "name": "$top",
"description": "取前幾筆",
"type": "integer",
"default": 30
},
{
- "name": "$skip",
"in": "query",
+ "name": "$skip",
"description": "跳過前幾筆",
"type": "string"
},
{
- "name": "$spatialFilter",
"in": "query",
+ "name": "$spatialFilter",
"description": "空間過濾",
"type": "string"
},
{
- "name": "$format",
"in": "query",
+ "name": "$format",
"description": "指定來源格式",
"required": true,
"type": "string",
@@ -76,11 +75,12 @@
],
"responses": {
"200": {
- "description": "OK",
+ "description": "Success",
"schema": {
+ "title": "Array",
"type": "array",
"items": {
- "$ref": "#/definitions/Service.DTO.Version2.Aviation.Airport"
+ "$ref": "#/definitions/PTX.Service.DTO.Air.Specification.V2.Airport"
}
}
}
@@ -95,24 +95,23 @@
"summary": "取得指定[機場]資料",
"description": "取得指定[機場]資料",
"operationId": "AirApi_Airport_1",
- "consumes": [],
"produces": [
"application/json",
- "text/json",
"application/xml",
- "text/xml"
+ "text/plain",
+ "text/json"
],
"parameters": [
{
- "name": "IATA",
"in": "path",
+ "name": "IATA",
"description": "機場代碼",
"required": true,
"type": "string"
},
{
- "name": "$format",
"in": "query",
+ "name": "$format",
"description": "指定來源格式",
"required": true,
"type": "string",
@@ -124,9 +123,9 @@
],
"responses": {
"200": {
- "description": "OK",
+ "description": "Success",
"schema": {
- "$ref": "#/definitions/Service.DTO.Version2.Aviation.Airport"
+ "$ref": "#/definitions/PTX.Service.DTO.Air.Specification.V2.Airport"
}
}
}
@@ -140,24 +139,23 @@
"summary": "取得指定[航空公司]資料",
"description": "取得指定[航空公司]資料",
"operationId": "AirApi_Airline",
- "consumes": [],
"produces": [
"application/json",
- "text/json",
"application/xml",
- "text/xml"
+ "text/plain",
+ "text/json"
],
"parameters": [
{
- "name": "IATA",
"in": "path",
+ "name": "IATA",
"description": "航空公司代碼",
"required": true,
"type": "string"
},
{
- "name": "$format",
"in": "query",
+ "name": "$format",
"description": "指定來源格式",
"required": true,
"type": "string",
@@ -169,9 +167,9 @@
],
"responses": {
"200": {
- "description": "OK",
+ "description": "Success",
"schema": {
- "$ref": "#/definitions/Service.DTO.Version2.Aviation.Airline"
+ "$ref": "#/definitions/PTX.Service.DTO.Air.Specification.V2.Airline"
}
}
}
@@ -185,46 +183,45 @@
"summary": "取得航空公司資料",
"description": "取得所有航空公司資料",
"operationId": "AirApi_Airline_1",
- "consumes": [],
"produces": [
"application/json",
- "text/json"
+ "application/xml"
],
"parameters": [
{
- "name": "$select",
"in": "query",
+ "name": "$select",
"description": "挑選",
"type": "string"
},
{
- "name": "$filter",
"in": "query",
+ "name": "$filter",
"description": "過濾",
"type": "string"
},
{
- "name": "$orderby",
"in": "query",
+ "name": "$orderby",
"description": "排序",
"type": "string"
},
{
- "name": "$top",
"in": "query",
+ "name": "$top",
"description": "取前幾筆",
"type": "integer",
"default": 30
},
{
- "name": "$skip",
"in": "query",
+ "name": "$skip",
"description": "跳過前幾筆",
"type": "string"
},
{
- "name": "$format",
"in": "query",
+ "name": "$format",
"description": "指定來源格式",
"required": true,
"type": "string",
@@ -236,11 +233,12 @@
],
"responses": {
"200": {
- "description": "OK",
+ "description": "Success",
"schema": {
+ "title": "Array",
"type": "array",
"items": {
- "$ref": "#/definitions/Service.DTO.Version2.Aviation.Airline"
+ "$ref": "#/definitions/PTX.Service.DTO.Air.Specification.V2.Airline"
}
}
}
@@ -255,53 +253,51 @@
"summary": "取得機場的即時出境航班",
"description": "取得機場的即時出境航班",
"operationId": "AirApi_Departure",
- "consumes": [],
"produces": [
"application/json",
- "text/json"
+ "application/xml"
],
"parameters": [
{
- "name": "IsCargo",
"in": "query",
+ "name": "IsCargo",
"description": "是否為貨機",
- "required": false,
"type": "boolean"
},
{
- "name": "$select",
"in": "query",
+ "name": "$select",
"description": "挑選",
"type": "string"
},
{
- "name": "$filter",
"in": "query",
+ "name": "$filter",
"description": "過濾",
"type": "string"
},
{
- "name": "$orderby",
"in": "query",
+ "name": "$orderby",
"description": "排序",
"type": "string"
},
{
- "name": "$top",
"in": "query",
+ "name": "$top",
"description": "取前幾筆",
"type": "integer",
"default": 30
},
{
- "name": "$skip",
"in": "query",
+ "name": "$skip",
"description": "跳過前幾筆",
"type": "string"
},
{
- "name": "$format",
"in": "query",
+ "name": "$format",
"description": "指定來源格式",
"required": true,
"type": "string",
@@ -313,11 +309,12 @@
],
"responses": {
"200": {
- "description": "OK",
+ "description": "Success",
"schema": {
+ "title": "Array",
"type": "array",
"items": {
- "$ref": "#/definitions/Service.DTO.Version2.Aviation.FIDSDeparture"
+ "$ref": "#/definitions/PTX.Service.DTO.Air.Specification.V2.FIDSDeparture"
}
}
}
@@ -332,60 +329,58 @@
"summary": "取得指定[機場的即時出境航班]",
"description": "取得指定的[機場即時出境航班]",
"operationId": "AirApi_Departure_1",
- "consumes": [],
"produces": [
"application/json",
- "text/json"
+ "application/xml"
],
"parameters": [
{
- "name": "IATA",
"in": "path",
+ "name": "IATA",
"description": "機場代碼",
"required": true,
"type": "string"
},
{
- "name": "IsCargo",
"in": "query",
+ "name": "IsCargo",
"description": "是否為貨機",
- "required": false,
"type": "boolean"
},
{
- "name": "$select",
"in": "query",
+ "name": "$select",
"description": "挑選",
"type": "string"
},
{
- "name": "$filter",
"in": "query",
+ "name": "$filter",
"description": "過濾",
"type": "string"
},
{
- "name": "$orderby",
"in": "query",
+ "name": "$orderby",
"description": "排序",
"type": "string"
},
{
- "name": "$top",
"in": "query",
+ "name": "$top",
"description": "取前幾筆",
"type": "integer",
"default": 30
},
{
- "name": "$skip",
"in": "query",
+ "name": "$skip",
"description": "跳過前幾筆",
"type": "string"
},
{
- "name": "$format",
"in": "query",
+ "name": "$format",
"description": "指定來源格式",
"required": true,
"type": "string",
@@ -397,11 +392,12 @@
],
"responses": {
"200": {
- "description": "OK",
+ "description": "Success",
"schema": {
+ "title": "Array",
"type": "array",
"items": {
- "$ref": "#/definitions/Service.DTO.Version2.Aviation.FIDSDeparture"
+ "$ref": "#/definitions/PTX.Service.DTO.Air.Specification.V2.FIDSDeparture"
}
}
}
@@ -416,53 +412,51 @@
"summary": "取得機場的即時入境航班",
"description": "取得機場的即時入境航班",
"operationId": "AirApi_Arrival",
- "consumes": [],
"produces": [
"application/json",
- "text/json"
+ "application/xml"
],
"parameters": [
{
- "name": "IsCargo",
"in": "query",
+ "name": "IsCargo",
"description": "是否為貨機",
- "required": false,
"type": "boolean"
},
{
- "name": "$select",
"in": "query",
+ "name": "$select",
"description": "挑選",
"type": "string"
},
{
- "name": "$filter",
"in": "query",
+ "name": "$filter",
"description": "過濾",
"type": "string"
},
{
- "name": "$orderby",
"in": "query",
+ "name": "$orderby",
"description": "排序",
"type": "string"
},
{
- "name": "$top",
"in": "query",
+ "name": "$top",
"description": "取前幾筆",
"type": "integer",
"default": 30
},
{
- "name": "$skip",
"in": "query",
+ "name": "$skip",
"description": "跳過前幾筆",
"type": "string"
},
{
- "name": "$format",
"in": "query",
+ "name": "$format",
"description": "指定來源格式",
"required": true,
"type": "string",
@@ -474,11 +468,12 @@
],
"responses": {
"200": {
- "description": "OK",
+ "description": "Success",
"schema": {
+ "title": "Array",
"type": "array",
"items": {
- "$ref": "#/definitions/Service.DTO.Version2.Aviation.FIDSArrival"
+ "$ref": "#/definitions/PTX.Service.DTO.Air.Specification.V2.FIDSArrival"
}
}
}
@@ -493,60 +488,58 @@
"summary": "取得指定[機場的即時入境航班]",
"description": "取得[指定機場]的即時入境航班",
"operationId": "AirApi_Arrival_1",
- "consumes": [],
"produces": [
"application/json",
- "text/json"
+ "application/xml"
],
"parameters": [
{
- "name": "IATA",
"in": "path",
+ "name": "IATA",
"description": "機場代碼",
"required": true,
"type": "string"
},
{
- "name": "IsCargo",
"in": "query",
+ "name": "IsCargo",
"description": "是否為貨機",
- "required": false,
"type": "boolean"
},
{
- "name": "$select",
"in": "query",
+ "name": "$select",
"description": "挑選",
"type": "string"
},
{
- "name": "$filter",
"in": "query",
+ "name": "$filter",
"description": "過濾",
"type": "string"
},
{
- "name": "$orderby",
"in": "query",
+ "name": "$orderby",
"description": "排序",
"type": "string"
},
{
- "name": "$top",
"in": "query",
+ "name": "$top",
"description": "取前幾筆",
"type": "integer",
"default": 30
},
{
- "name": "$skip",
"in": "query",
+ "name": "$skip",
"description": "跳過前幾筆",
"type": "string"
},
{
- "name": "$format",
"in": "query",
+ "name": "$format",
"description": "指定來源格式",
"required": true,
"type": "string",
@@ -558,11 +551,12 @@
],
"responses": {
"200": {
- "description": "OK",
+ "description": "Success",
"schema": {
+ "title": "Array",
"type": "array",
"items": {
- "$ref": "#/definitions/Service.DTO.Version2.Aviation.FIDSArrival"
+ "$ref": "#/definitions/PTX.Service.DTO.Air.Specification.V2.FIDSArrival"
}
}
}
@@ -577,53 +571,51 @@
"summary": "取得即時航班資料",
"description": "取得即時航班資料",
"operationId": "AirApi_Flight",
- "consumes": [],
"produces": [
"application/json",
- "text/json"
+ "application/xml"
],
"parameters": [
{
- "name": "IsCargo",
"in": "query",
+ "name": "IsCargo",
"description": "是否為貨機",
- "required": false,
"type": "boolean"
},
{
- "name": "$select",
"in": "query",
+ "name": "$select",
"description": "挑選",
"type": "string"
},
{
- "name": "$filter",
"in": "query",
+ "name": "$filter",
"description": "過濾",
"type": "string"
},
{
- "name": "$orderby",
"in": "query",
+ "name": "$orderby",
"description": "排序",
"type": "string"
},
{
- "name": "$top",
"in": "query",
+ "name": "$top",
"description": "取前幾筆",
"type": "integer",
"default": 30
},
{
- "name": "$skip",
"in": "query",
+ "name": "$skip",
"description": "跳過前幾筆",
"type": "string"
},
{
- "name": "$format",
"in": "query",
+ "name": "$format",
"description": "指定來源格式",
"required": true,
"type": "string",
@@ -635,11 +627,12 @@
],
"responses": {
"200": {
- "description": "OK",
+ "description": "Success",
"schema": {
+ "title": "Array",
"type": "array",
"items": {
- "$ref": "#/definitions/Service.DTO.Version2.Aviation.FIDS"
+ "$ref": "#/definitions/PTX.Service.DTO.Air.Specification.V2.FIDS"
}
}
}
@@ -653,60 +646,58 @@
],
"summary": "取得指定[即時航班]資料",
"operationId": "AirApi_Flight_1",
- "consumes": [],
"produces": [
"application/json",
- "text/json"
+ "application/xml"
],
"parameters": [
{
- "name": "FlightNo",
"in": "path",
+ "name": "FlightNo",
"description": "航機班號",
"required": true,
"type": "string"
},
{
- "name": "IsCargo",
"in": "query",
+ "name": "IsCargo",
"description": "是否為貨機",
- "required": false,
"type": "boolean"
},
{
- "name": "$select",
"in": "query",
+ "name": "$select",
"description": "挑選",
"type": "string"
},
{
- "name": "$filter",
"in": "query",
+ "name": "$filter",
"description": "過濾",
"type": "string"
},
{
- "name": "$orderby",
"in": "query",
+ "name": "$orderby",
"description": "排序",
"type": "string"
},
{
- "name": "$top",
"in": "query",
+ "name": "$top",
"description": "取前幾筆",
"type": "integer",
"default": 30
},
{
- "name": "$skip",
"in": "query",
+ "name": "$skip",
"description": "跳過前幾筆",
"type": "string"
},
{
- "name": "$format",
"in": "query",
+ "name": "$format",
"description": "指定來源格式",
"required": true,
"type": "string",
@@ -718,11 +709,12 @@
],
"responses": {
"200": {
- "description": "OK",
+ "description": "Success",
"schema": {
+ "title": "Array",
"type": "array",
"items": {
- "$ref": "#/definitions/Service.DTO.Version2.Aviation.FIDS"
+ "$ref": "#/definitions/PTX.Service.DTO.Air.Specification.V2.FIDS"
}
}
}
@@ -737,46 +729,45 @@
"summary": "取得機場的即時航班資料",
"description": "取得即時航班資料",
"operationId": "AirApi_FIDS",
- "consumes": [],
"produces": [
"application/json",
- "text/json"
+ "application/xml"
],
"parameters": [
{
- "name": "$select",
"in": "query",
+ "name": "$select",
"description": "挑選",
"type": "string"
},
{
- "name": "$filter",
"in": "query",
+ "name": "$filter",
"description": "過濾",
"type": "string"
},
{
- "name": "$orderby",
"in": "query",
+ "name": "$orderby",
"description": "排序",
"type": "string"
},
{
- "name": "$top",
"in": "query",
+ "name": "$top",
"description": "取前幾筆",
"type": "integer",
"default": 30
},
{
- "name": "$skip",
"in": "query",
+ "name": "$skip",
"description": "跳過前幾筆",
"type": "string"
},
{
- "name": "$format",
"in": "query",
+ "name": "$format",
"description": "指定來源格式",
"required": true,
"type": "string",
@@ -788,11 +779,12 @@
],
"responses": {
"200": {
- "description": "OK",
+ "description": "Success",
"schema": {
+ "title": "Array",
"type": "array",
"items": {
- "$ref": "#/definitions/Service.DTO.Version2.Aviation.Airport_FIDS"
+ "$ref": "#/definitions/PTX.Service.DTO.Air.Specification.V2.Airport_FIDS"
}
}
}
@@ -807,53 +799,52 @@
"summary": "取得指定[機場的即時航班]資料",
"description": "取得指定[機場的即時航班]資料",
"operationId": "AirApi_FIDS_1",
- "consumes": [],
"produces": [
"application/json",
- "text/json"
+ "application/xml"
],
"parameters": [
{
- "name": "IATA",
"in": "path",
+ "name": "IATA",
"description": "機場代碼",
"required": true,
"type": "string"
},
{
- "name": "$select",
"in": "query",
+ "name": "$select",
"description": "挑選",
"type": "string"
},
{
- "name": "$filter",
"in": "query",
+ "name": "$filter",
"description": "過濾",
"type": "string"
},
{
- "name": "$orderby",
"in": "query",
+ "name": "$orderby",
"description": "排序",
"type": "string"
},
{
- "name": "$top",
"in": "query",
+ "name": "$top",
"description": "取前幾筆",
"type": "integer",
"default": 30
},
{
- "name": "$skip",
"in": "query",
+ "name": "$skip",
"description": "跳過前幾筆",
"type": "string"
},
{
- "name": "$format",
"in": "query",
+ "name": "$format",
"description": "指定來源格式",
"required": true,
"type": "string",
@@ -865,11 +856,12 @@
],
"responses": {
"200": {
- "description": "OK",
+ "description": "Success",
"schema": {
+ "title": "Array",
"type": "array",
"items": {
- "$ref": "#/definitions/Service.DTO.Version2.Aviation.Airport_FIDS"
+ "$ref": "#/definitions/PTX.Service.DTO.Air.Specification.V2.Airport_FIDS"
}
}
}
@@ -884,52 +876,51 @@
"summary": "取得[國內機場]氣象資訊觀測資料",
"description": "取得[國內機場]氣象資訊觀測資料\r\n
目前提供之機場氣象觀測站代碼清單\r\n
RCSS:松山機場 RCKH:高雄機場\r\n
RCTP:桃園機場 RCMT:北竿機場\r\n
RCFG:南竿機場 RCBS:金門機場\r\n
RCQC:馬公機場 RCMQ:臺中機場\r\n
RCKU:嘉義機場 RCNN:臺南機場\r\n
RCYU:花蓮機場 RCFN:臺東機場\r\n
RCLY:蘭嶼機場 RCGI:綠島機場",
"operationId": "AirApi_METAR",
- "consumes": [],
"produces": [
"application/json",
- "text/json"
+ "application/xml"
],
"parameters": [
{
- "name": "$select",
"in": "query",
+ "name": "$select",
"description": "挑選",
"type": "string"
},
{
- "name": "$filter",
"in": "query",
+ "name": "$filter",
"description": "過濾",
"type": "string"
},
{
- "name": "$orderby",
"in": "query",
+ "name": "$orderby",
"description": "排序",
"type": "string"
},
{
- "name": "$top",
"in": "query",
+ "name": "$top",
"description": "取前幾筆",
"type": "integer",
"default": 30
},
{
- "name": "$skip",
"in": "query",
+ "name": "$skip",
"description": "跳過前幾筆",
"type": "string"
},
{
- "name": "$spatialFilter",
"in": "query",
+ "name": "$spatialFilter",
"description": "空間過濾",
"type": "string"
},
{
- "name": "$format",
"in": "query",
+ "name": "$format",
"description": "指定來源格式",
"required": true,
"type": "string",
@@ -941,11 +932,12 @@
],
"responses": {
"200": {
- "description": "OK",
+ "description": "Success",
"schema": {
+ "title": "Array",
"type": "array",
"items": {
- "$ref": "#/definitions/Service.DTO.Version2.Application.METAR"
+ "$ref": "#/definitions/PTX.Service.DTO.Air.Specification.V2.METAR"
}
}
}
@@ -960,59 +952,58 @@
"summary": "取得指定[國內機場]氣象資訊觀測資料",
"description": "取得指定[國內機場]氣象資訊觀測資料",
"operationId": "AirApi_METAR_1",
- "consumes": [],
"produces": [
"application/json",
- "text/json"
+ "application/xml"
],
"parameters": [
{
- "name": "IATA",
"in": "path",
+ "name": "IATA",
"description": "機場代碼",
"required": true,
"type": "string"
},
{
- "name": "$select",
"in": "query",
+ "name": "$select",
"description": "挑選",
"type": "string"
},
{
- "name": "$filter",
"in": "query",
+ "name": "$filter",
"description": "過濾",
"type": "string"
},
{
- "name": "$orderby",
"in": "query",
+ "name": "$orderby",
"description": "排序",
"type": "string"
},
{
- "name": "$top",
"in": "query",
+ "name": "$top",
"description": "取前幾筆",
"type": "integer",
"default": 30
},
{
- "name": "$skip",
"in": "query",
+ "name": "$skip",
"description": "跳過前幾筆",
"type": "string"
},
{
- "name": "$spatialFilter",
"in": "query",
+ "name": "$spatialFilter",
"description": "空間過濾",
"type": "string"
},
{
- "name": "$format",
"in": "query",
+ "name": "$format",
"description": "指定來源格式",
"required": true,
"type": "string",
@@ -1024,11 +1015,12 @@
],
"responses": {
"200": {
- "description": "OK",
+ "description": "Success",
"schema": {
+ "title": "Array",
"type": "array",
"items": {
- "$ref": "#/definitions/Service.DTO.Version2.Application.METAR"
+ "$ref": "#/definitions/PTX.Service.DTO.Air.Specification.V2.METAR"
}
}
}
@@ -1042,46 +1034,45 @@
],
"summary": "取得國內航空定期時刻表",
"operationId": "AirApi_Domestic",
- "consumes": [],
"produces": [
"application/json",
- "text/json"
+ "application/xml"
],
"parameters": [
{
- "name": "$select",
"in": "query",
+ "name": "$select",
"description": "挑選",
"type": "string"
},
{
- "name": "$filter",
"in": "query",
+ "name": "$filter",
"description": "過濾",
"type": "string"
},
{
- "name": "$orderby",
"in": "query",
+ "name": "$orderby",
"description": "排序",
"type": "string"
},
{
- "name": "$top",
"in": "query",
+ "name": "$top",
"description": "取前幾筆",
"type": "integer",
"default": 30
},
{
- "name": "$skip",
"in": "query",
+ "name": "$skip",
"description": "跳過前幾筆",
"type": "string"
},
{
- "name": "$format",
"in": "query",
+ "name": "$format",
"description": "指定來源格式",
"required": true,
"type": "string",
@@ -1093,11 +1084,12 @@
],
"responses": {
"200": {
- "description": "OK",
+ "description": "Success",
"schema": {
+ "title": "Array",
"type": "array",
"items": {
- "$ref": "#/definitions/Service.DTO.Version2.Aviation.GeneralFlightSchedule"
+ "$ref": "#/definitions/PTX.Service.DTO.Air.Specification.V2.GeneralFlightSchedule"
}
}
}
@@ -1111,46 +1103,45 @@
],
"summary": "取得國際航空定期時刻表",
"operationId": "AirApi_International",
- "consumes": [],
"produces": [
"application/json",
- "text/json"
+ "application/xml"
],
"parameters": [
{
- "name": "$select",
"in": "query",
+ "name": "$select",
"description": "挑選",
"type": "string"
},
{
- "name": "$filter",
"in": "query",
+ "name": "$filter",
"description": "過濾",
"type": "string"
},
{
- "name": "$orderby",
"in": "query",
+ "name": "$orderby",
"description": "排序",
"type": "string"
},
{
- "name": "$top",
"in": "query",
+ "name": "$top",
"description": "取前幾筆",
"type": "integer",
"default": 30
},
{
- "name": "$skip",
"in": "query",
+ "name": "$skip",
"description": "跳過前幾筆",
"type": "string"
},
{
- "name": "$format",
"in": "query",
+ "name": "$format",
"description": "指定來源格式",
"required": true,
"type": "string",
@@ -1162,11 +1153,12 @@
],
"responses": {
"200": {
- "description": "OK",
+ "description": "Success",
"schema": {
+ "title": "Array",
"type": "array",
"items": {
- "$ref": "#/definitions/Service.DTO.Version2.Aviation.GeneralFlightSchedule"
+ "$ref": "#/definitions/PTX.Service.DTO.Air.Specification.V2.GeneralFlightSchedule"
}
}
}
@@ -1175,7 +1167,24 @@
}
},
"definitions": {
- "Service.DTO.Version2.Aviation.Airline": {
+ "PTX.Service.DTO.Shared.Specification.V2.Base.NameType": {
+ "title": "NameType",
+ "description": "名稱資料型別",
+ "type": "object",
+ "properties": {
+ "Zh_tw": {
+ "title": "String",
+ "description": "中文繁體名稱",
+ "type": "string"
+ },
+ "En": {
+ "title": "String",
+ "description": "英文名稱",
+ "type": "string"
+ }
+ }
+ },
+ "PTX.Service.DTO.Air.Specification.V2.Airline": {
"title": "Airline",
"description": "航空公司資料",
"required": [
@@ -1186,40 +1195,55 @@
"type": "object",
"properties": {
"AirlineID": {
+ "title": "String",
"description": "航空公司IATA國際代碼",
"type": "string"
},
"AirlineName": {
- "$ref": "#/definitions/Service.DTO.Version2.Base.NameType",
"title": "NameType",
- "description": "航空公司名稱"
+ "description": "航空公司名稱",
+ "allOf": [
+ {
+ "$ref": "#/definitions/PTX.Service.DTO.Shared.Specification.V2.Base.NameType"
+ }
+ ]
},
"AirlineNameAlias": {
- "$ref": "#/definitions/Service.DTO.Version2.Base.NameType",
"title": "NameType",
- "description": "航空公司簡稱"
+ "description": "航空公司簡稱",
+ "allOf": [
+ {
+ "$ref": "#/definitions/PTX.Service.DTO.Shared.Specification.V2.Base.NameType"
+ }
+ ]
},
"AirlineIATA": {
+ "title": "String",
"description": "航空公司IATA國際代碼",
"type": "string"
},
"AirlineICAO": {
+ "title": "String",
"description": "航空公司ICAO國際代碼",
"type": "string"
},
"AirlineEmail": {
+ "title": "String",
"description": "航空公司電子信箱",
"type": "string"
},
"AirlineAddress": {
+ "title": "String",
"description": "航空公司地址",
"type": "string"
},
"AirlinePhone": {
+ "title": "String",
"description": "航空公司聯繫電話",
"type": "string"
},
"AirlineNationality": {
+ "title": "String",
"description": "航空公司國籍",
"type": "string"
},
@@ -1230,27 +1254,35 @@
},
"VersionID": {
"format": "int32",
+ "title": "Int32",
"description": "資料版本編號",
"type": "integer"
}
}
},
- "Service.DTO.Version2.Base.NameType": {
- "title": "NameType",
- "description": "名稱資料型別",
+ "PTX.Service.DTO.Shared.Specification.V2.Base.PointType": {
+ "title": "PointType",
+ "description": "座標資料型別",
"type": "object",
"properties": {
- "Zh_tw": {
- "description": "中文繁體名稱",
- "type": "string"
+ "PositionLat": {
+ "format": "double",
+ "description": "位置緯度(WGS84)",
+ "type": "number"
},
- "En": {
- "description": "英文名稱",
+ "PositionLon": {
+ "format": "double",
+ "description": "位置經度(WGS84)",
+ "type": "number"
+ },
+ "GeoHash": {
+ "title": "String",
+ "description": "位置雜湊",
"type": "string"
}
}
},
- "Service.DTO.Version2.Aviation.Airport": {
+ "PTX.Service.DTO.Air.Specification.V2.Airport": {
"title": "Airport",
"description": "機場資料",
"required": [
@@ -1261,48 +1293,65 @@
"type": "object",
"properties": {
"AirportID": {
+ "title": "String",
"description": "機場IATA國際代碼",
"type": "string"
},
"AirportName": {
- "$ref": "#/definitions/Service.DTO.Version2.Base.NameType",
"title": "NameType",
- "description": "機場中文名稱"
+ "description": "機場中文名稱",
+ "allOf": [
+ {
+ "$ref": "#/definitions/PTX.Service.DTO.Shared.Specification.V2.Base.NameType"
+ }
+ ]
},
"AirportIATA": {
+ "title": "String",
"description": "機場IATA國際代碼",
"type": "string"
},
"AirportICAO": {
+ "title": "String",
"description": "機場ICAO國際代碼",
"type": "string"
},
"AirportPosition": {
- "$ref": "#/definitions/Service.DTO.Version2.Base.PointType",
"title": "PointType",
- "description": "機場位置"
+ "description": "機場位置",
+ "allOf": [
+ {
+ "$ref": "#/definitions/PTX.Service.DTO.Shared.Specification.V2.Base.PointType"
+ }
+ ]
},
"AirportCityName": {
- "$ref": "#/definitions/Service.DTO.Version2.Base.NameType",
"title": "NameType",
- "description": "機場所屬城市"
+ "description": "機場所屬城市",
+ "allOf": [
+ {
+ "$ref": "#/definitions/PTX.Service.DTO.Shared.Specification.V2.Base.NameType"
+ }
+ ]
},
"AirportAdrress": {
+ "title": "String",
"description": "機場地址",
"type": "string"
},
"AirportPhone": {
+ "title": "String",
"description": "機場聯繫電話",
"type": "string"
},
"AirportNationality": {
+ "title": "String",
"description": "機場國籍",
"type": "string"
},
"AuthorityID": {
+ "title": "String",
"description": "業管機關代碼(流水號)",
- "maxLength": 2,
- "minLength": 0,
"type": "string"
},
"UpdateTime": {
@@ -1312,71 +1361,21 @@
},
"VersionID": {
"format": "int32",
+ "title": "Int32",
"description": "資料版本編號",
"type": "integer"
}
}
},
- "Service.DTO.Version2.Base.PointType": {
- "title": "PointType",
- "description": "座標資料型別",
- "type": "object",
- "properties": {
- "PositionLat": {
- "format": "double",
- "description": "位置緯度(WGS84)",
- "type": "number"
- },
- "PositionLon": {
- "format": "double",
- "description": "位置經度(WGS84)",
- "type": "number"
- }
- }
- },
- "Service.DTO.Version2.Aviation.Airport_FIDS": {
- "title": "Airport_FIDS",
- "description": "航班顯示資料(以機場角度)",
- "required": [
- "AirportID",
- "UpdateTime"
- ],
- "type": "object",
- "properties": {
- "AirportID": {
- "description": "機場IATA國際代碼",
- "type": "string"
- },
- "FIDSDeparture": {
- "description": "出發航班顯示資料",
- "type": "array",
- "items": {
- "$ref": "#/definitions/Service.DTO.Version2.Aviation.FIDSDeparture"
- }
- },
- "FIDSArrival": {
- "description": "抵達航班顯示資料",
- "type": "array",
- "items": {
- "$ref": "#/definitions/Service.DTO.Version2.Aviation.FIDSArrival"
- }
- },
- "UpdateTime": {
- "title": "DateTime",
- "description": "資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)",
- "type": "string"
- }
- }
- },
- "Service.DTO.Version2.Aviation.FIDSDeparture": {
+ "PTX.Service.DTO.Air.Specification.V2.FIDSDeparture": {
"title": "FIDSDeparture",
"description": "出發航班顯示資料",
"required": [
- "FlightDate",
- "FlightNumber",
"AirlineID",
- "DepartureAirportID",
"ArrivalAirportID",
+ "DepartureAirportID",
+ "FlightDate",
+ "FlightNumber",
"UpdateTime"
],
"type": "object",
@@ -1387,6 +1386,7 @@
"type": "string"
},
"FlightNumber": {
+ "title": "String",
"description": "航機班號(不包含航空公司的AirlineID,僅有班號數字)",
"type": "string"
},
@@ -1397,14 +1397,17 @@
"type": "integer"
},
"AirlineID": {
+ "title": "String",
"description": "航空公司IATA國際代碼",
"type": "string"
},
"DepartureAirportID": {
+ "title": "String",
"description": "起點機場IATA國際代碼",
"type": "string"
},
"ArrivalAirportID": {
+ "title": "String",
"description": "目的地機場IATA國際代碼",
"type": "string"
},
@@ -1424,42 +1427,52 @@
"type": "string"
},
"DepartureRemark": {
+ "title": "String",
"description": "航班屬性狀態, ,為該機場觀點的狀態",
"type": "string"
},
"DepartureRemarkEn": {
+ "title": "String",
"description": "航班屬性狀態(英文)",
"type": "string"
},
"Terminal": {
+ "title": "String",
"description": "航廈",
"type": "string"
},
"Gate": {
+ "title": "String",
"description": "登機門(僅客機提供)",
"type": "string"
},
"Apron": {
+ "title": "String",
"description": "停機坪(僅貨機提供)",
"type": "string"
},
"CodeShare": {
+ "title": "String",
"description": "航班共用班號",
"type": "string"
},
"IsCargo": {
+ "title": "Boolean",
"description": "是否為貨機",
"type": "boolean"
},
"AcType": {
+ "title": "String",
"description": "航空器型號",
"type": "string"
},
"BaggageClaim": {
+ "title": "String",
"description": "行李轉盤(到站FIDS可能有「行李轉盤」資訊, 離站FIDS不會有, 貨機則無此資訊)",
"type": "string"
},
"CheckCounter": {
+ "title": "String",
"description": "報到櫃檯(離站FIDS可能有「報到櫃台」資訊, 到站FIDS不會有, 貨機則無此資訊)",
"type": "string"
},
@@ -1470,15 +1483,15 @@
}
}
},
- "Service.DTO.Version2.Aviation.FIDSArrival": {
+ "PTX.Service.DTO.Air.Specification.V2.FIDSArrival": {
"title": "FIDSArrival",
"description": "抵達航班顯示資料",
"required": [
- "FlightDate",
- "FlightNumber",
"AirlineID",
- "DepartureAirportID",
"ArrivalAirportID",
+ "DepartureAirportID",
+ "FlightDate",
+ "FlightNumber",
"UpdateTime"
],
"type": "object",
@@ -1489,6 +1502,7 @@
"type": "string"
},
"FlightNumber": {
+ "title": "String",
"description": "航機班號(不包含航空公司的AirlineID,僅有班號數字)",
"type": "string"
},
@@ -1499,14 +1513,17 @@
"type": "integer"
},
"AirlineID": {
+ "title": "String",
"description": "航空公司IATA國際代碼",
"type": "string"
},
"DepartureAirportID": {
+ "title": "String",
"description": "起點機場IATA國際代碼",
"type": "string"
},
"ArrivalAirportID": {
+ "title": "String",
"description": "目的地機場IATA國際代碼",
"type": "string"
},
@@ -1526,42 +1543,52 @@
"type": "string"
},
"ArrivalRemark": {
+ "title": "String",
"description": "航班屬性狀態,為該機場觀點的狀態",
"type": "string"
},
"ArrivalRemarkEn": {
+ "title": "String",
"description": "航班屬性狀態(英文)",
"type": "string"
},
"Terminal": {
+ "title": "String",
"description": "航廈",
"type": "string"
},
"Gate": {
+ "title": "String",
"description": "登機門(僅客機提供)",
"type": "string"
},
"Apron": {
+ "title": "String",
"description": "停機坪(僅貨機提供)",
"type": "string"
},
"CodeShare": {
+ "title": "String",
"description": "航班共用班號",
"type": "string"
},
"IsCargo": {
+ "title": "Boolean",
"description": "是否為貨機",
"type": "boolean"
},
"AcType": {
+ "title": "String",
"description": "航空器型號",
"type": "string"
},
"BaggageClaim": {
+ "title": "String",
"description": "行李轉盤(到站FIDS可能有「行李轉盤」資訊, 離站FIDS不會有, 貨機則無此資訊)",
"type": "string"
},
"CheckCounter": {
+ "title": "String",
"description": "報到櫃檯(離站FIDS可能有「報到櫃台」資訊, 到站FIDS不會有, 貨機則無此資訊)",
"type": "string"
},
@@ -1572,15 +1599,52 @@
}
}
},
- "Service.DTO.Version2.Aviation.FIDS": {
+ "PTX.Service.DTO.Air.Specification.V2.Airport_FIDS": {
+ "title": "Airport_FIDS",
+ "description": "航班顯示資料(以機場角度)",
+ "required": [
+ "AirportID",
+ "UpdateTime"
+ ],
+ "type": "object",
+ "properties": {
+ "AirportID": {
+ "title": "String",
+ "description": "機場IATA國際代碼",
+ "type": "string"
+ },
+ "FIDSDeparture": {
+ "title": "Array",
+ "description": "出發航班顯示資料",
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/PTX.Service.DTO.Air.Specification.V2.FIDSDeparture"
+ }
+ },
+ "FIDSArrival": {
+ "title": "Array",
+ "description": "抵達航班顯示資料",
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/PTX.Service.DTO.Air.Specification.V2.FIDSArrival"
+ }
+ },
+ "UpdateTime": {
+ "title": "DateTime",
+ "description": "資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)",
+ "type": "string"
+ }
+ }
+ },
+ "PTX.Service.DTO.Air.Specification.V2.FIDS": {
"title": "FIDS",
"description": "航班顯示資料",
"required": [
- "FlightDate",
- "FlightNumber",
"AirlineID",
- "DepartureAirportID",
"ArrivalAirportID",
+ "DepartureAirportID",
+ "FlightDate",
+ "FlightNumber",
"UpdateTime"
],
"type": "object",
@@ -1591,6 +1655,7 @@
"type": "string"
},
"FlightNumber": {
+ "title": "String",
"description": "航機班號(不包含航空公司的AirlineID,僅有班號數字)",
"type": "string"
},
@@ -1601,14 +1666,17 @@
"type": "integer"
},
"AirlineID": {
+ "title": "String",
"description": "航空公司IATA國際代碼",
"type": "string"
},
"DepartureAirportID": {
+ "title": "String",
"description": "起點機場IATA國際代碼",
"type": "string"
},
"ArrivalAirportID": {
+ "title": "String",
"description": "目的地機場IATA國際代碼",
"type": "string"
},
@@ -1643,78 +1711,97 @@
"type": "string"
},
"DepartureRemark": {
+ "title": "String",
"description": "航班屬性狀態,為第三方觀點的狀態(資料來源:民航局)",
"type": "string"
},
"DepartureRemarkEn": {
+ "title": "String",
"description": "航班屬性狀態(英文)",
"type": "string"
},
"ArrivalRemark": {
+ "title": "String",
"description": "航班屬性狀態,為該機場觀點的狀態",
"type": "string"
},
"ArrivalRemarkEn": {
+ "title": "String",
"description": "航班屬性狀態(英文)",
"type": "string"
},
"FlightStatus": {
+ "title": "String",
"description": "航班運行狀態,以航班的角度的狀態",
"type": "string"
},
"FlightStatusEn": {
+ "title": "String",
"description": "航班運行狀態(英文)",
"type": "string"
},
"FlightStatusPC": {
+ "title": "String",
"description": "航班運行狀態百分比(國內線)",
"type": "string"
},
"FlightRemark": {
+ "title": "String",
"description": "航班屬性",
"type": "string"
},
"ArrivalTerminal": {
+ "title": "String",
"description": "抵達航廈",
"type": "string"
},
"DepartureTerminal": {
+ "title": "String",
"description": "出發航廈",
"type": "string"
},
"ArrivalGate": {
+ "title": "String",
"description": "抵達登機門(僅客機提供)",
"type": "string"
},
"DepartureGate": {
+ "title": "String",
"description": "出發登機門(僅客機提供)",
"type": "string"
},
"ArrivalApron": {
+ "title": "String",
"description": "抵達停機坪(僅貨機提供)",
"type": "string"
},
"DepartureApron": {
+ "title": "String",
"description": "出發停機坪(僅貨機提供)",
"type": "string"
},
"CodeShare": {
+ "title": "String",
"description": "航班共用班號",
"type": "string"
},
"IsCargo": {
+ "title": "Boolean",
"description": "是否為貨機",
"type": "boolean"
},
"AcType": {
+ "title": "String",
"description": "航空器型號",
"type": "string"
},
"BaggageClaim": {
+ "title": "String",
"description": "行李轉盤",
"type": "string"
},
"CheckCounter": {
+ "title": "String",
"description": "報到櫃檯",
"type": "string"
},
@@ -1725,31 +1812,53 @@
}
}
},
- "Service.DTO.Version2.Aviation.GeneralFlightSchedule": {
+ "PTX.Service.DTO.Air.Specification.V2.CodeShare": {
+ "title": "CodeShare",
+ "description": "共用班號",
+ "required": [
+ "AirlineID",
+ "FlightNumber"
+ ],
+ "type": "object",
+ "properties": {
+ "AirlineID": {
+ "title": "String",
+ "description": "航空公司IATA國際代碼",
+ "type": "string"
+ },
+ "FlightNumber": {
+ "title": "String",
+ "description": "航機班號(不包含航空公司的AirlineID,僅有班號數字)",
+ "type": "string"
+ }
+ }
+ },
+ "PTX.Service.DTO.Air.Specification.V2.GeneralFlightSchedule": {
"title": "GeneralFlightSchedule",
"description": "航空定期時刻表資料",
"required": [
"AirlineID",
- "ScheduleStartDate",
- "ScheduleEndDate",
- "FlightNumber",
- "DepartureAirportID",
- "DepartureTime",
"ArrivalAirportID",
"ArrivalTime",
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
+ "DepartureAirportID",
+ "DepartureTime",
+ "FlightNumber",
"Friday",
+ "Monday",
"Saturday",
+ "ScheduleEndDate",
+ "ScheduleStartDate",
"Sunday",
+ "Thursday",
+ "Tuesday",
"UpdateTime",
- "VersionID"
+ "VersionID",
+ "Wednesday"
],
"type": "object",
"properties": {
"AirlineID": {
+ "title": "String",
"description": "航空公司IATA國際代碼",
"type": "string"
},
@@ -1764,61 +1873,75 @@
"type": "string"
},
"FlightNumber": {
+ "title": "String",
"description": "班機號碼(包含航空公司的AirlineID,結構為AirlineID加上3~4碼航機班號數字;若班號僅有兩碼,其結構會加上0補足三碼,\"AirlineID + 0 + 兩碼班號\")",
"type": "string"
},
"DepartureAirportID": {
+ "title": "String",
"description": "起點機場IATA國際代碼",
"type": "string"
},
"DepartureTime": {
+ "title": "String",
"description": "起點機場出發時間 (格式: HH:mm 當地時間,跨日以+1 表示)",
"type": "string"
},
"CodeShare": {
+ "title": "Array",
"description": "共用班號",
"type": "array",
"items": {
- "$ref": "#/definitions/Service.DTO.Version2.Aviation.CodeShare"
+ "$ref": "#/definitions/PTX.Service.DTO.Air.Specification.V2.CodeShare"
}
},
"ArrivalAirportID": {
+ "title": "String",
"description": "目的地機場IATA國際代碼",
"type": "string"
},
"ArrivalTime": {
+ "title": "String",
"description": "終點機場抵達時間 (格式: HH:mm 當地時間,跨日以+1 表示)",
"type": "string"
},
"Monday": {
+ "title": "Boolean",
"description": "週一飛行與否",
"type": "boolean"
},
"Tuesday": {
+ "title": "Boolean",
"description": "週二飛行與否",
"type": "boolean"
},
"Wednesday": {
+ "title": "Boolean",
"description": "週三飛行與否",
"type": "boolean"
},
"Thursday": {
+ "title": "Boolean",
"description": "週四飛行與否",
"type": "boolean"
},
"Friday": {
+ "title": "Boolean",
"description": "週五飛行與否",
"type": "boolean"
},
"Saturday": {
+ "title": "Boolean",
"description": "週六飛行與否",
"type": "boolean"
},
"Sunday": {
+ "title": "Boolean",
"description": "週日飛行與否",
"type": "boolean"
},
"Terminal": {
+ "title": "String",
"description": "航廈",
"type": "string"
},
@@ -1829,79 +1952,79 @@
},
"VersionID": {
"format": "int32",
+ "title": "Int32",
"description": "資料版本編號",
"type": "integer"
}
}
},
- "Service.DTO.Version2.Aviation.CodeShare": {
- "title": "CodeShare",
- "description": "共用班號",
- "required": [
- "AirlineID",
- "FlightNumber"
- ],
- "type": "object",
- "properties": {
- "AirlineID": {
- "description": "航空公司IATA國際代碼",
- "type": "string"
- },
- "FlightNumber": {
- "description": "航機班號(不包含航空公司的AirlineID,僅有班號數字)",
- "type": "string"
- }
- }
- },
- "Service.DTO.Version2.Application.METAR": {
+ "PTX.Service.DTO.Air.Specification.V2.METAR": {
"title": "METAR",
"required": [
"AirportID",
- "StationID",
- "CountryName",
- "CityName",
"AirportName",
- "StationPosition",
- "ObservationTime",
+ "Ceiling",
+ "CityName",
+ "CountryName",
"MetarText",
"MetarTime",
- "WindDirection",
- "WindSpeed",
- "Visibility",
- "Ceiling",
+ "ObservationTime",
+ "StationID",
+ "StationPosition",
"Temperature",
+ "UpdateTime",
+ "Visibility",
"WeatherDescription",
- "UpdateTime"
+ "WindDirection",
+ "WindSpeed"
],
"type": "object",
"properties": {
"AirportID": {
+ "title": "String",
"description": "機場代碼(IATA)",
"type": "string"
},
"StationID": {
+ "title": "String",
"description": "機場氣象觀測站代碼(ICAO)",
"type": "string"
},
"CountryName": {
- "$ref": "#/definitions/Service.DTO.Version2.Base.NameType",
"title": "NameType",
- "description": "國家名稱"
+ "description": "國家名稱",
+ "allOf": [
+ {
+ "$ref": "#/definitions/PTX.Service.DTO.Shared.Specification.V2.Base.NameType"
+ }
+ ]
},
"CityName": {
- "$ref": "#/definitions/Service.DTO.Version2.Base.NameType",
"title": "NameType",
- "description": "機場所屬城市"
+ "description": "機場所屬城市",
+ "allOf": [
+ {
+ "$ref": "#/definitions/PTX.Service.DTO.Shared.Specification.V2.Base.NameType"
+ }
+ ]
},
"AirportName": {
- "$ref": "#/definitions/Service.DTO.Version2.Base.NameType",
"title": "NameType",
- "description": "機場名稱"
+ "description": "機場名稱",
+ "allOf": [
+ {
+ "$ref": "#/definitions/PTX.Service.DTO.Shared.Specification.V2.Base.NameType"
+ }
+ ]
},
"StationPosition": {
- "$ref": "#/definitions/Service.DTO.Version2.Base.PointType",
"title": "PointType",
- "description": "機場氣象觀測站座標"
+ "description": "機場氣象觀測站座標",
+ "allOf": [
+ {
+ "$ref": "#/definitions/PTX.Service.DTO.Shared.Specification.V2.Base.PointType"
+ }
+ ]
},
"ObservationTime": {
"title": "DateTime",
@@ -1909,37 +2032,48 @@
"type": "string"
},
"MetarText": {
+ "title": "String",
"description": "機場天氣報告(METAR/SPECI)",
"type": "string"
},
"MetarTime": {
+ "title": "String",
"description": "機場天氣報告時間(地方時)",
"type": "string"
},
"WindDirection": {
+ "title": "String",
"description": "風向(含單位)",
"type": "string"
},
"WindSpeed": {
+ "title": "String",
"description": "風速(含單位)",
"type": "string"
},
"Visibility": {
+ "title": "String",
"description": "盛行能見度(含單位,9999以10公里以上表示)",
"type": "string"
},
"Ceiling": {
+ "title": "String",
"description": "雲冪(含單位)",
"type": "string"
},
"Temperature": {
+ "title": "String",
"description": "溫度(含單位)",
"type": "string"
},
"WeatherDescription": {
- "$ref": "#/definitions/Service.DTO.Version2.Base.NameType",
"title": "NameType",
- "description": "天氣描述"
+ "description": "天氣描述",
+ "allOf": [
+ {
+ "$ref": "#/definitions/PTX.Service.DTO.Shared.Specification.V2.Base.NameType"
+ }
+ ]
},
"UpdateTime": {
"title": "DateTime",
@@ -1951,7 +2085,8 @@
},
"tags": [
{
- "name": "Air"
+ "name": "Air",
+ "description": "航空"
}
]
}
diff --git a/oas.basic.v2.json b/oas.basic.v2.json
index a6ab5136..7e0dd358 100644
--- a/oas.basic.v2.json
+++ b/oas.basic.v2.json
@@ -3,7 +3,7 @@
"info": {
"version": "v2",
"title": "MOTC Transport API V2",
- "description": "本平臺提供涵蓋全國尺度之公車、臺鐵、高鐵、捷運、航空、自行車等公共運輸旅運資料服務API,歡迎各產政學單位介接使用。\r\n
利用本平臺開放資料進行各項應用服務開發時,請考量不同特性使用者(如:性別/身心障礙/老幼等)的需求,並歡迎回饋寶貴意見。\r\n
資料使用葵花寶典:[請點我](https://ptxmotc.gitbooks.io/ptx-api-documentation/content/)\r\n
資料服務開發實作參考手冊:[請點我](https://docs.google.com/viewer?url=https://github.com/ptxmotc/PTX_Web/blob/master/Swagger%E6%9C%8D%E5%8B%99%E8%AA%AA%E6%98%8E%E4%B8%8A%E5%82%B3%E5%8F%83%E8%80%83%E6%AA%94%E6%A1%88/%E5%85%AC%E5%85%B1%E9%81%8B%E8%BC%B8%E6%95%B4%E5%90%88%E8%B3%87%E8%A8%8A%E5%B9%B3%E5%8F%B0%E8%B3%87%E6%96%99%E6%9C%8D%E5%8B%99%E9%96%8B%E7%99%BC%E5%AF%A6%E4%BD%9C.pdf?raw=true)\r\n
API URI Convention文件說明:[請點我](https://docs.google.com/viewer?url=https://github.com/ptxmotc/PTX_Web/blob/master/Swagger%E6%9C%8D%E5%8B%99%E8%AA%AA%E6%98%8E%E4%B8%8A%E5%82%B3%E5%8F%83%E8%80%83%E6%AA%94%E6%A1%88/API_URI_Convention%E6%96%87%E4%BB%B6_v1.pdf?raw=true)
資料文本OAS描述:[請點我](https://ptx.transportdata.tw/MOTC/v2/Basic/api-docs/oas)"
+ "description": "本平臺提供涵蓋全國尺度之公車、臺鐵、高鐵、捷運、航空、自行車等公共運輸旅運資料服務API,歡迎各產政學單位介接使用。\r\n
利用本平臺開放資料進行各項應用服務開發時,請考量不同特性使用者(如:性別/身心障礙/老幼等)的需求,並歡迎回饋寶貴意見。\r\n
資料使用葵花寶典:[請點我](https://motc-ptx-api-documentation.gitbook.io/motc-ptx-api-documentation/)\r\n
資料服務開發實作參考手冊:[請點我](https://docs.google.com/viewer?url=https://github.com/ptxmotc/PTX_Web/blob/master/Swagger%E6%9C%8D%E5%8B%99%E8%AA%AA%E6%98%8E%E4%B8%8A%E5%82%B3%E5%8F%83%E8%80%83%E6%AA%94%E6%A1%88/%E5%85%AC%E5%85%B1%E9%81%8B%E8%BC%B8%E6%95%B4%E5%90%88%E8%B3%87%E8%A8%8A%E5%B9%B3%E5%8F%B0%E8%B3%87%E6%96%99%E6%9C%8D%E5%8B%99%E9%96%8B%E7%99%BC%E5%AF%A6%E4%BD%9C.pdf?raw=true)\r\n
API URI Convention文件說明:[請點我](https://docs.google.com/viewer?url=https://github.com/ptxmotc/PTX_Web/blob/master/Swagger%E6%9C%8D%E5%8B%99%E8%AA%AA%E6%98%8E%E4%B8%8A%E5%82%B3%E5%8F%83%E8%80%83%E6%AA%94%E6%A1%88/API_URI_Convention%E6%96%87%E4%BB%B6_v1.pdf?raw=true)
資料文本OAS描述:[請點我](https://ptx.transportdata.tw/MOTC/v2/Basic/api-docs/oas)"
},
"host": "ptx.transportdata.tw",
"basePath": "/MOTC/",
@@ -524,13 +524,18 @@
"title": "Provider",
"description": "資料提供平台資料型別",
"required": [
+ "UpdateTime",
"ProviderID",
"ProviderName",
- "UpdateTime",
"ProviderCode"
],
"type": "object",
"properties": {
+ "UpdateTime": {
+ "title": "DateTime",
+ "description": "資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)",
+ "type": "string"
+ },
"ProviderID": {
"description": "資料提供平台代碼",
"type": "string"
@@ -552,11 +557,6 @@
"description": "資料提供平台網址鏈結",
"type": "string"
},
- "UpdateTime": {
- "title": "DateTime",
- "description": "資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)",
- "type": "string"
- },
"ProviderCode": {
"description": "資料提供平台簡碼",
"type": "string"
diff --git a/oas.bike.v2.json b/oas.bike.v2.json
index e16375d8..a2b04b8e 100644
--- a/oas.bike.v2.json
+++ b/oas.bike.v2.json
@@ -1,12 +1,12 @@
{
"swagger": "2.0",
"info": {
- "version": "v2",
"title": "MOTC Transport API V2",
- "description": "本平臺提供涵蓋全國尺度之公車、臺鐵、高鐵、捷運、航空、自行車等公共運輸旅運資料服務API,歡迎各產政學單位介接使用。\r\n
利用本平臺開放資料進行各項應用服務開發時,請考量不同特性使用者(如:性別/身心障礙/老幼等)的需求,並歡迎回饋寶貴意見。\r\n
資料使用葵花寶典:[請點我](https://ptxmotc.gitbooks.io/ptx-api-documentation/content/)\r\n
資料服務開發實作參考手冊:[請點我](https://docs.google.com/viewer?url=https://github.com/ptxmotc/PTX_Web/blob/master/Swagger%E6%9C%8D%E5%8B%99%E8%AA%AA%E6%98%8E%E4%B8%8A%E5%82%B3%E5%8F%83%E8%80%83%E6%AA%94%E6%A1%88/%E5%85%AC%E5%85%B1%E9%81%8B%E8%BC%B8%E6%95%B4%E5%90%88%E8%B3%87%E8%A8%8A%E5%B9%B3%E5%8F%B0%E8%B3%87%E6%96%99%E6%9C%8D%E5%8B%99%E9%96%8B%E7%99%BC%E5%AF%A6%E4%BD%9C.pdf?raw=true)\r\n
API URI Convention文件說明:[請點我](https://docs.google.com/viewer?url=https://github.com/ptxmotc/PTX_Web/blob/master/Swagger%E6%9C%8D%E5%8B%99%E8%AA%AA%E6%98%8E%E4%B8%8A%E5%82%B3%E5%8F%83%E8%80%83%E6%AA%94%E6%A1%88/API_URI_Convention%E6%96%87%E4%BB%B6_v1.pdf?raw=true)
資料文本OAS描述:[請點我](https://ptx.transportdata.tw/MOTC/v2/Bike/api-docs/oas)"
+ "description": "本平臺提供涵蓋全國尺度之公車、臺鐵、高鐵、捷運、航空、自行車等公共運輸旅運資料服務API,歡迎各產政學單位介接使用。\n
利用本平臺開放資料進行各項應用服務開發時,請考量不同特性使用者(如:性別/身心障礙/老幼等)的需求,並歡迎回饋寶貴意見。\n
資料使用葵花寶典:[請點我](https://motc-ptx-api-documentation.gitbook.io/motc-ptx-api-documentation/)\n
資料服務開發實作參考手冊:[請點我](https://docs.google.com/viewer?url=https://github.com/ptxmotc/PTX_Web/blob/master/Swagger%E6%9C%8D%E5%8B%99%E8%AA%AA%E6%98%8E%E4%B8%8A%E5%82%B3%E5%8F%83%E8%80%83%E6%AA%94%E6%A1%88/%E5%85%AC%E5%85%B1%E9%81%8B%E8%BC%B8%E6%95%B4%E5%90%88%E8%B3%87%E8%A8%8A%E5%B9%B3%E5%8F%B0%E8%B3%87%E6%96%99%E6%9C%8D%E5%8B%99%E9%96%8B%E7%99%BC%E5%AF%A6%E4%BD%9C.pdf?raw=true)\n
API URI Convention文件說明:[請點我](https://docs.google.com/viewer?url=https://github.com/ptxmotc/PTX_Web/blob/master/Swagger%E6%9C%8D%E5%8B%99%E8%AA%AA%E6%98%8E%E4%B8%8A%E5%82%B3%E5%8F%83%E8%80%83%E6%AA%94%E6%A1%88/API_URI_Convention%E6%96%87%E4%BB%B6_v1.pdf?raw=true)
資料文本OAS描述:[請點我](https://ptx.transportdata.tw/MOTC/v2/Bike/api-docs/oas)",
+ "version": "v2"
},
"host": "ptx.transportdata.tw",
- "basePath": "/MOTC/",
+ "basePath": "/MOTC",
"schemes": [
"https"
],
@@ -19,15 +19,14 @@
"summary": "取得指定[縣市]的公共自行車租借站位資料",
"description": "取得指定[縣市]的公共自行車租借站位資料
[更新頻率]2分鐘更新一次",
"operationId": "BikeApi_Station",
- "consumes": [],
"produces": [
"application/json",
- "text/json"
+ "application/xml"
],
"parameters": [
{
- "name": "City",
"in": "path",
+ "name": "City",
"description": "欲查詢縣市",
"required": true,
"type": "string",
@@ -39,63 +38,65 @@
"NewTaipei",
"PingtungCounty",
"Taoyuan",
+ "KinmenCounty",
"Taipei",
"Kaohsiung",
"Tainan"
],
"x-enum": {
+ "NewTaipei": "新北市",
+ "Tainan": "臺南市",
+ "KinmenCounty": "金門縣",
+ "MiaoliCounty": "苗栗縣",
+ "Taipei": "臺北市",
+ "Hsinchu": "新竹市",
"PingtungCounty": "屏東縣",
"ChanghuaCounty": "彰化縣",
"Taoyuan": "桃園市",
- "NewTaipei": "新北市",
- "Taipei": "臺北市",
"Taichung": "臺中市",
- "Kaohsiung": "高雄市",
- "Tainan": "臺南市",
- "MiaoliCounty": "苗栗縣",
- "Hsinchu": "新竹市"
+ "Kaohsiung": "高雄市"
}
},
{
- "name": "$select",
"in": "query",
+ "name": "$select",
"description": "挑選",
"type": "string"
},
{
- "name": "$filter",
"in": "query",
+ "name": "$filter",
"description": "過濾",
"type": "string"
},
{
- "name": "$orderby",
"in": "query",
+ "name": "$orderby",
"description": "排序",
"type": "string"
},
{
- "name": "$top",
"in": "query",
+ "name": "$top",
"description": "取前幾筆",
"type": "integer",
"default": 30
},
{
- "name": "$skip",
"in": "query",
+ "name": "$skip",
"description": "跳過前幾筆",
"type": "string"
},
{
- "name": "$spatialFilter",
"in": "query",
+ "name": "$spatialFilter",
"description": "空間過濾",
"type": "string"
},
{
- "name": "$format",
"in": "query",
+ "name": "$format",
"description": "指定來源格式",
"required": true,
"type": "string",
@@ -107,11 +108,12 @@
],
"responses": {
"200": {
- "description": "OK",
+ "description": "Success",
"schema": {
+ "title": "Array",
"type": "array",
"items": {
- "$ref": "#/definitions/Service.DTO.Version2.Bike.BikeStation"
+ "$ref": "#/definitions/PTX.Service.DTO.Bike.Specification.V2.BikeStation"
}
}
}
@@ -126,15 +128,14 @@
"summary": "取得動態指定[縣市]的公共自行車即時車位資料",
"description": "取得動態指定[縣市]的公共自行車即時車位資料
[更新頻率]2分鐘更新一次",
"operationId": "BikeApi_Availability",
- "consumes": [],
"produces": [
"application/json",
- "text/json"
+ "application/xml"
],
"parameters": [
{
- "name": "City",
"in": "path",
+ "name": "City",
"description": "欲查詢縣市",
"required": true,
"type": "string",
@@ -146,57 +147,59 @@
"NewTaipei",
"PingtungCounty",
"Taoyuan",
+ "KinmenCounty",
"Taipei",
"Kaohsiung",
"Tainan"
],
"x-enum": {
- "NewTaipei": "新北市",
- "Taoyuan": "桃園市",
"Taichung": "臺中市",
+ "Hsinchu": "新竹市",
"ChanghuaCounty": "彰化縣",
+ "KinmenCounty": "金門縣",
+ "Taipei": "臺北市",
"Tainan": "臺南市",
+ "NewTaipei": "新北市",
+ "Taoyuan": "桃園市",
"PingtungCounty": "屏東縣",
"MiaoliCounty": "苗栗縣",
- "Kaohsiung": "高雄市",
- "Hsinchu": "新竹市",
- "Taipei": "臺北市"
+ "Kaohsiung": "高雄市"
}
},
{
- "name": "$select",
"in": "query",
+ "name": "$select",
"description": "挑選",
"type": "string"
},
{
- "name": "$filter",
"in": "query",
+ "name": "$filter",
"description": "過濾",
"type": "string"
},
{
- "name": "$orderby",
"in": "query",
+ "name": "$orderby",
"description": "排序",
"type": "string"
},
{
- "name": "$top",
"in": "query",
+ "name": "$top",
"description": "取前幾筆",
"type": "integer",
"default": 30
},
{
- "name": "$skip",
"in": "query",
+ "name": "$skip",
"description": "跳過前幾筆",
"type": "string"
},
{
- "name": "$format",
"in": "query",
+ "name": "$format",
"description": "指定來源格式",
"required": true,
"type": "string",
@@ -208,11 +211,12 @@
],
"responses": {
"200": {
- "description": "OK",
+ "description": "Success",
"schema": {
+ "title": "Array",
"type": "array",
"items": {
- "$ref": "#/definitions/Service.DTO.Version2.Bike.BikeAvailability"
+ "$ref": "#/definitions/PTX.Service.DTO.Bike.Specification.V2.BikeAvailability"
}
}
}
@@ -227,15 +231,14 @@
"summary": "取得指定縣市之自行車道路網圖資",
"description": "取得指定縣市之自行車道路網圖資",
"operationId": "CyclingApi_Shape",
- "consumes": [],
"produces": [
"application/json",
- "text/json"
+ "application/xml"
],
"parameters": [
{
- "name": "City",
"in": "path",
+ "name": "City",
"description": "欲查詢縣市",
"required": true,
"type": "string",
@@ -262,64 +265,64 @@
"Kaohsiung"
],
"x-enum": {
- "NewTaipei": "新北市",
- "Taoyuan": "桃園市",
- "MiaoliCounty": "苗栗縣",
- "YilanCounty": "宜蘭縣",
"NantouCounty": "南投縣",
"HsinchuCounty": "新竹縣",
"Chiayi": "嘉義市",
+ "ChanghuaCounty": "彰化縣",
+ "Kaohsiung": "高雄市",
"Taichung": "臺中市",
"PingtungCounty": "屏東縣",
"YunlinCounty": "雲林縣",
"Hsinchu": "新竹市",
+ "PenghuCounty": "澎湖縣",
"TaitungCounty": "臺東縣",
+ "Taipei": "臺北市",
+ "NewTaipei": "新北市",
+ "Taoyuan": "桃園市",
+ "MiaoliCounty": "苗栗縣",
+ "YilanCounty": "宜蘭縣",
"Tainan": "臺南市",
"ChiayiCounty": "嘉義縣",
"Keelung": "基隆市",
"HualienCounty": "花蓮縣",
"LienchiangCounty": "連江縣",
- "KinmenCounty": "金門縣",
- "ChanghuaCounty": "彰化縣",
- "Kaohsiung": "高雄市",
- "PenghuCounty": "澎湖縣",
- "Taipei": "臺北市"
+ "KinmenCounty": "金門縣"
}
},
{
- "name": "$select",
"in": "query",
+ "name": "$select",
"description": "挑選",
"type": "string"
},
{
- "name": "$filter",
"in": "query",
+ "name": "$filter",
"description": "過濾",
"type": "string"
},
{
- "name": "$orderby",
"in": "query",
+ "name": "$orderby",
"description": "排序",
"type": "string"
},
{
- "name": "$top",
"in": "query",
+ "name": "$top",
"description": "取前幾筆",
"type": "integer",
"default": 30
},
{
- "name": "$skip",
"in": "query",
+ "name": "$skip",
"description": "跳過前幾筆",
"type": "string"
},
{
- "name": "$format",
"in": "query",
+ "name": "$format",
"description": "指定來源格式",
"required": true,
"type": "string",
@@ -331,11 +334,12 @@
],
"responses": {
"200": {
- "description": "OK",
+ "description": "Success",
"schema": {
+ "title": "Array",
"type": "array",
"items": {
- "$ref": "#/definitions/Service.DTO.Version2.Bike.BikeShape"
+ "$ref": "#/definitions/PTX.Service.DTO.Bike.Specification.V2.BikeShape"
}
}
}
@@ -344,20 +348,21 @@
}
},
"definitions": {
- "Service.DTO.Version2.Bike.BikeAvailability": {
+ "PTX.Service.DTO.Bike.Specification.V2.BikeAvailability": {
"title": "BikeAvailability",
"description": "自行車站點剩餘數量資訊",
"required": [
- "SrcUpdateTime",
"UpdateTime"
],
"type": "object",
"properties": {
"StationUID": {
+ "title": "String",
"description": "站點唯一識別代碼,規則為 {業管機關代碼} + {StationID},其中 {業管機關代碼} 可於Authority API中的AuthorityCode欄位查詢",
"type": "string"
},
"StationID": {
+ "title": "String",
"description": "站點代碼",
"type": "string"
},
@@ -369,11 +374,13 @@
},
"AvailableRentBikes": {
"format": "int32",
+ "title": "Int32",
"description": "可租借車數",
"type": "integer"
},
"AvailableReturnBikes": {
"format": "int32",
+ "title": "Int32",
"description": "可歸還車數",
"type": "integer"
},
@@ -389,54 +396,64 @@
}
}
},
- "Service.DTO.Version2.Bike.BikeShape": {
+ "PTX.Service.DTO.Bike.Specification.V2.BikeShape": {
"title": "BikeShape",
"required": [
- "RouteName",
- "CityCode",
"City",
+ "CityCode",
"Geometry",
+ "RouteName",
"UpdateTime"
],
"type": "object",
"properties": {
"RouteName": {
+ "title": "String",
"description": "路線名稱",
"type": "string"
},
"AuthorityName": {
+ "title": "String",
"description": "業管機關名稱(可能包含多個業管機關)",
"type": "string"
},
"CityCode": {
+ "title": "String",
"description": "路線所在縣市代碼",
"type": "string"
},
"City": {
+ "title": "String",
"description": "路線所在縣市名稱",
"type": "string"
},
"Town": {
+ "title": "String",
"description": "路線所在鄉鎮名稱(可能包含多個鄉鎮)",
"type": "string"
},
"RoadSectionStart": {
+ "title": "String",
"description": "路線起點描述",
"type": "string"
},
"RoadSectionEnd": {
+ "title": "String",
"description": "路線迄點描述",
"type": "string"
},
"Geometry": {
+ "title": "String",
"description": "路線軌跡資料",
"type": "string"
},
"Direction": {
+ "title": "String",
"description": "自行車道車行方向",
"type": "string"
},
"CyclingType": {
+ "title": "String",
"description": "自行車道類型",
"type": "string"
},
@@ -446,6 +463,7 @@
"type": "number"
},
"FinishedTime": {
+ "title": "String",
"description": "自行車道完工日期時間",
"type": "string"
},
@@ -456,48 +474,103 @@
}
}
},
- "Service.DTO.Version2.Bike.BikeStation": {
+ "PTX.Service.DTO.Shared.Specification.V2.Base.NameType": {
+ "title": "NameType",
+ "description": "名稱資料型別",
+ "type": "object",
+ "properties": {
+ "Zh_tw": {
+ "title": "String",
+ "description": "中文繁體名稱",
+ "type": "string"
+ },
+ "En": {
+ "title": "String",
+ "description": "英文名稱",
+ "type": "string"
+ }
+ }
+ },
+ "PTX.Service.DTO.Shared.Specification.V2.Base.PointType": {
+ "title": "PointType",
+ "description": "座標資料型別",
+ "type": "object",
+ "properties": {
+ "PositionLat": {
+ "format": "double",
+ "description": "位置緯度(WGS84)",
+ "type": "number"
+ },
+ "PositionLon": {
+ "format": "double",
+ "description": "位置經度(WGS84)",
+ "type": "number"
+ },
+ "GeoHash": {
+ "title": "String",
+ "description": "位置雜湊",
+ "type": "string"
+ }
+ }
+ },
+ "PTX.Service.DTO.Bike.Specification.V2.BikeStation": {
"title": "BikeStation",
"description": "自行車站點資訊",
"required": [
- "SrcUpdateTime",
"UpdateTime"
],
"type": "object",
"properties": {
"StationUID": {
+ "title": "String",
"description": "站點唯一識別代碼,規則為 {業管機關代碼} + {StationID},其中 {業管機關代碼} 可於Authority API中的AuthorityCode欄位查詢",
"type": "string"
},
"StationID": {
+ "title": "String",
"description": "站點代碼",
"type": "string"
},
"AuthorityID": {
+ "title": "String",
"description": "業管單位代碼",
"type": "string"
},
"StationName": {
- "$ref": "#/definitions/Service.DTO.Version2.Base.NameType",
"title": "NameType",
- "description": "站點名稱"
+ "description": "站點名稱",
+ "allOf": [
+ {
+ "$ref": "#/definitions/PTX.Service.DTO.Shared.Specification.V2.Base.NameType"
+ }
+ ]
},
"StationPosition": {
- "$ref": "#/definitions/Service.DTO.Version2.Base.PointType",
"title": "PointType",
- "description": "站點位置"
+ "description": "站點位置",
+ "allOf": [
+ {
+ "$ref": "#/definitions/PTX.Service.DTO.Shared.Specification.V2.Base.PointType"
+ }
+ ]
},
"StationAddress": {
- "$ref": "#/definitions/Service.DTO.Version2.Base.NameType",
"title": "NameType",
- "description": "站點地址"
+ "description": "站點地址",
+ "allOf": [
+ {
+ "$ref": "#/definitions/PTX.Service.DTO.Shared.Specification.V2.Base.NameType"
+ }
+ ]
},
"StopDescription": {
+ "title": "String",
"description": "站點描述",
"type": "string"
},
"BikesCapacity": {
"format": "int32",
+ "title": "Int32",
"description": "可容納之自行車總數",
"type": "integer"
},
@@ -512,43 +585,12 @@
"type": "string"
}
}
- },
- "Service.DTO.Version2.Base.NameType": {
- "title": "NameType",
- "description": "名稱資料型別",
- "type": "object",
- "properties": {
- "Zh_tw": {
- "description": "中文繁體名稱",
- "type": "string"
- },
- "En": {
- "description": "英文名稱",
- "type": "string"
- }
- }
- },
- "Service.DTO.Version2.Base.PointType": {
- "title": "PointType",
- "description": "座標資料型別",
- "type": "object",
- "properties": {
- "PositionLat": {
- "format": "double",
- "description": "位置緯度(WGS84)",
- "type": "number"
- },
- "PositionLon": {
- "format": "double",
- "description": "位置經度(WGS84)",
- "type": "number"
- }
- }
}
},
"tags": [
{
- "name": "Bike"
+ "name": "Bike",
+ "description": "自行車"
}
]
}
diff --git a/oas.bus.v2.json b/oas.bus.v2.json
index 8a41641d..c3b79b89 100644
--- a/oas.bus.v2.json
+++ b/oas.bus.v2.json
@@ -3,7 +3,7 @@
"info": {
"version": "v2",
"title": "MOTC Transport API V2",
- "description": "本平臺提供涵蓋全國尺度之公車、臺鐵、高鐵、捷運、航空、自行車等公共運輸旅運資料服務API,歡迎各產政學單位介接使用。\r\n
利用本平臺開放資料進行各項應用服務開發時,請考量不同特性使用者(如:性別/身心障礙/老幼等)的需求,並歡迎回饋寶貴意見。\r\n
資料使用葵花寶典:[請點我](https://ptxmotc.gitbooks.io/ptx-api-documentation/content/)\r\n
資料服務開發實作參考手冊:[請點我](https://docs.google.com/viewer?url=https://github.com/ptxmotc/PTX_Web/blob/master/Swagger%E6%9C%8D%E5%8B%99%E8%AA%AA%E6%98%8E%E4%B8%8A%E5%82%B3%E5%8F%83%E8%80%83%E6%AA%94%E6%A1%88/%E5%85%AC%E5%85%B1%E9%81%8B%E8%BC%B8%E6%95%B4%E5%90%88%E8%B3%87%E8%A8%8A%E5%B9%B3%E5%8F%B0%E8%B3%87%E6%96%99%E6%9C%8D%E5%8B%99%E9%96%8B%E7%99%BC%E5%AF%A6%E4%BD%9C.pdf?raw=true)\r\n
API URI Convention文件說明:[請點我](https://docs.google.com/viewer?url=https://github.com/ptxmotc/PTX_Web/blob/master/Swagger%E6%9C%8D%E5%8B%99%E8%AA%AA%E6%98%8E%E4%B8%8A%E5%82%B3%E5%8F%83%E8%80%83%E6%AA%94%E6%A1%88/API_URI_Convention%E6%96%87%E4%BB%B6_v1.pdf?raw=true)
資料文本OAS描述:[請點我](https://ptx.transportdata.tw/MOTC/v2/Bus/api-docs/oas)"
+ "description": "本平臺提供涵蓋全國尺度之公車、臺鐵、高鐵、捷運、航空、自行車等公共運輸旅運資料服務API,歡迎各產政學單位介接使用。\r\n
利用本平臺開放資料進行各項應用服務開發時,請考量不同特性使用者(如:性別/身心障礙/老幼等)的需求,並歡迎回饋寶貴意見。\r\n
資料使用葵花寶典:[請點我](https://motc-ptx-api-documentation.gitbook.io/motc-ptx-api-documentation/)\r\n
資料服務開發實作參考手冊:[請點我](https://docs.google.com/viewer?url=https://github.com/ptxmotc/PTX_Web/blob/master/Swagger%E6%9C%8D%E5%8B%99%E8%AA%AA%E6%98%8E%E4%B8%8A%E5%82%B3%E5%8F%83%E8%80%83%E6%AA%94%E6%A1%88/%E5%85%AC%E5%85%B1%E9%81%8B%E8%BC%B8%E6%95%B4%E5%90%88%E8%B3%87%E8%A8%8A%E5%B9%B3%E5%8F%B0%E8%B3%87%E6%96%99%E6%9C%8D%E5%8B%99%E9%96%8B%E7%99%BC%E5%AF%A6%E4%BD%9C.pdf?raw=true)\r\n
API URI Convention文件說明:[請點我](https://docs.google.com/viewer?url=https://github.com/ptxmotc/PTX_Web/blob/master/Swagger%E6%9C%8D%E5%8B%99%E8%AA%AA%E6%98%8E%E4%B8%8A%E5%82%B3%E5%8F%83%E8%80%83%E6%AA%94%E6%A1%88/API_URI_Convention%E6%96%87%E4%BB%B6_v1.pdf?raw=true)
資料文本OAS描述:[請點我](https://ptx.transportdata.tw/MOTC/v2/Bus/api-docs/oas)"
},
"host": "ptx.transportdata.tw",
"basePath": "/MOTC/",
@@ -2504,136 +2504,6 @@
}
}
},
- "/v2/Bus/StationName/City/{City}": {
- "get": {
- "tags": [
- "CityBus"
- ],
- "summary": "取得指定[縣市]的市區公車站名碼資料",
- "description": "市區公車之各站牌所屬的站名碼資料",
- "operationId": "CityBusApi_StationName",
- "consumes": [],
- "produces": [
- "application/json",
- "text/json"
- ],
- "parameters": [
- {
- "name": "City",
- "in": "path",
- "description": "欲查詢縣市",
- "required": true,
- "type": "string",
- "enum": [
- "Hsinchu",
- "HsinchuCounty",
- "MiaoliCounty",
- "ChanghuaCounty",
- "NantouCounty",
- "YunlinCounty",
- "ChiayiCounty",
- "Chiayi",
- "PingtungCounty",
- "YilanCounty",
- "HualienCounty",
- "TaitungCounty",
- "PenghuCounty"
- ],
- "x-enum": {
- "YunlinCounty": "雲林縣",
- "HualienCounty": "花蓮縣",
- "MiaoliCounty": "苗栗縣",
- "Hsinchu": "新竹市",
- "ChiayiCounty": "嘉義縣",
- "PenghuCounty": "澎湖縣",
- "TaitungCounty": "臺東縣",
- "HsinchuCounty": "新竹縣",
- "Chiayi": "嘉義市",
- "YilanCounty": "宜蘭縣",
- "PingtungCounty": "屏東縣",
- "NantouCounty": "南投縣",
- "ChanghuaCounty": "彰化縣"
- }
- },
- {
- "name": "$select",
- "in": "query",
- "description": "挑選",
- "type": "string"
- },
- {
- "name": "$filter",
- "in": "query",
- "description": "過濾",
- "type": "string"
- },
- {
- "name": "$orderby",
- "in": "query",
- "description": "排序",
- "type": "string"
- },
- {
- "name": "$top",
- "in": "query",
- "description": "取前幾筆",
- "type": "integer",
- "default": 30
- },
- {
- "name": "$skip",
- "in": "query",
- "description": "跳過前幾筆",
- "type": "string"
- },
- {
- "name": "$spatialFilter",
- "in": "query",
- "description": "空間過濾",
- "type": "string"
- },
- {
- "name": "$format",
- "in": "query",
- "description": "指定來源格式",
- "required": true,
- "type": "string",
- "enum": [
- "JSON",
- "XML"
- ]
- },
- {
- "name": "health",
- "in": "query",
- "description": "加入參數'?health=true'即可查詢此API服務的健康狀態",
- "required": false,
- "type": "string",
- "enum": [
- "true",
- "false"
- ]
- }
- ],
- "responses": {
- "200": {
- "description": "OK",
- "schema": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/Service.DTO.Version2.Bus.BusStationName"
- }
- }
- },
- "299": {
- "description": "加入參數'?health=true'即可查詢此API服務的健康狀態",
- "schema": {
- "$ref": "#/definitions/Service.DTO.Version3.Base.DisplayHealth"
- }
- }
- }
- }
- },
"/v2/Bus/DisplayStopOfRoute/City/{City}": {
"get": {
"tags": [
@@ -4298,6 +4168,213 @@
}
}
},
+ "/v2/Bus/FirstLastTripInfo/City/{City}": {
+ "get": {
+ "tags": [
+ "CityBus"
+ ],
+ "summary": "取得指定[縣市]的市區公車路線首末班車資料",
+ "description": "市區公車之路線首末班車資料",
+ "operationId": "CityBusApi_FirstLastTripInfo",
+ "consumes": [],
+ "produces": [
+ "application/json",
+ "text/json"
+ ],
+ "parameters": [
+ {
+ "name": "City",
+ "in": "path",
+ "description": "欲查詢縣市",
+ "required": true,
+ "type": "string",
+ "enum": [
+ "KinmenCounty"
+ ],
+ "x-enum": {
+ "KinmenCounty": "金門縣"
+ }
+ },
+ {
+ "name": "$select",
+ "in": "query",
+ "description": "挑選",
+ "type": "string"
+ },
+ {
+ "name": "$filter",
+ "in": "query",
+ "description": "過濾",
+ "type": "string"
+ },
+ {
+ "name": "$orderby",
+ "in": "query",
+ "description": "排序",
+ "type": "string"
+ },
+ {
+ "name": "$top",
+ "in": "query",
+ "description": "取前幾筆",
+ "type": "integer",
+ "default": 30
+ },
+ {
+ "name": "$skip",
+ "in": "query",
+ "description": "跳過前幾筆",
+ "type": "string"
+ },
+ {
+ "name": "$format",
+ "in": "query",
+ "description": "指定來源格式",
+ "required": true,
+ "type": "string",
+ "enum": [
+ "JSON",
+ "XML"
+ ]
+ },
+ {
+ "name": "health",
+ "in": "query",
+ "description": "加入參數'?health=true'即可查詢此API服務的健康狀態",
+ "required": false,
+ "type": "string",
+ "enum": [
+ "true",
+ "false"
+ ]
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "schema": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/Service.DTO.Version2.Bus.BusFirstLastTripInfo"
+ }
+ }
+ },
+ "299": {
+ "description": "加入參數'?health=true'即可查詢此API服務的健康狀態",
+ "schema": {
+ "$ref": "#/definitions/Service.DTO.Version3.Base.DisplayHealth"
+ }
+ }
+ }
+ }
+ },
+ "/v2/Bus/FirstLastTripInfo/City/{City}/{RouteName}": {
+ "get": {
+ "tags": [
+ "CityBus"
+ ],
+ "summary": "取得指定[縣市],[路線名稱]的路線首末班車資料",
+ "description": "市區公車之路線首末班車資料",
+ "operationId": "CityBusApi_FirstLastTripInfo_1",
+ "consumes": [],
+ "produces": [
+ "application/json",
+ "text/json"
+ ],
+ "parameters": [
+ {
+ "name": "City",
+ "in": "path",
+ "description": "欲查詢縣市",
+ "required": true,
+ "type": "string",
+ "enum": [
+ "KinmenCounty"
+ ],
+ "x-enum": {
+ "KinmenCounty": "金門縣"
+ }
+ },
+ {
+ "name": "RouteName",
+ "in": "path",
+ "description": "繁體中文路線名稱,如'307'",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "name": "$select",
+ "in": "query",
+ "description": "挑選",
+ "type": "string"
+ },
+ {
+ "name": "$filter",
+ "in": "query",
+ "description": "過濾",
+ "type": "string"
+ },
+ {
+ "name": "$orderby",
+ "in": "query",
+ "description": "排序",
+ "type": "string"
+ },
+ {
+ "name": "$top",
+ "in": "query",
+ "description": "取前幾筆",
+ "type": "integer",
+ "default": 30
+ },
+ {
+ "name": "$skip",
+ "in": "query",
+ "description": "跳過前幾筆",
+ "type": "string"
+ },
+ {
+ "name": "$format",
+ "in": "query",
+ "description": "指定來源格式",
+ "required": true,
+ "type": "string",
+ "enum": [
+ "JSON",
+ "XML"
+ ]
+ },
+ {
+ "name": "health",
+ "in": "query",
+ "description": "加入參數'?health=true'即可查詢此API服務的健康狀態",
+ "required": false,
+ "type": "string",
+ "enum": [
+ "true",
+ "false"
+ ]
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "schema": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/Service.DTO.Version2.Bus.BusFirstLastTripInfo"
+ }
+ }
+ },
+ "299": {
+ "description": "加入參數'?health=true'即可查詢此API服務的健康狀態",
+ "schema": {
+ "$ref": "#/definitions/Service.DTO.Version3.Base.DisplayHealth"
+ }
+ }
+ }
+ }
+ },
"/v2/Bus/RealTimeByFrequency/Streaming/InterCity": {
"get": {
"tags": [
@@ -4953,7 +5030,7 @@
],
"summary": "取得指定[路線名稱]的公路客運動態定時資料(A1)[批次更新]",
"description": "### 公路客運之定時資料(A1) ###\r\n- [逐筆更新]與[批次更新]之差異請詳見資料使用葵花寶典([連結](https://ptxmotc.gitbooks.io/ptx-api-documentation/content/api-zi-liao-shi-yong-zhu-yi-shi-xiang/buslive.html))",
- "operationId": "InterCityBusApi_RealTimeByFrequency_2",
+ "operationId": "InterCityBusApi_RealTimeByFrequency_1",
"consumes": [],
"produces": [
"application/json",
@@ -5421,93 +5498,9 @@
"application/json",
"text/json",
"application/xml",
- "text/xml"
- ],
- "parameters": [
- {
- "name": "$format",
- "in": "query",
- "description": "指定來源格式",
- "required": true,
- "type": "string",
- "enum": [
- "JSON",
- "XML"
- ]
- },
- {
- "name": "health",
- "in": "query",
- "description": "加入參數'?health=true'即可查詢此API服務的健康狀態",
- "required": false,
- "type": "string",
- "enum": [
- "true",
- "false"
- ]
- }
- ],
- "responses": {
- "200": {
- "description": "OK",
- "schema": {
- "$ref": "#/definitions/Service.DTO.Version2.Bus.BusVersion"
- }
- },
- "299": {
- "description": "加入參數'?health=true'即可查詢此API服務的健康狀態",
- "schema": {
- "$ref": "#/definitions/Service.DTO.Version3.Base.DisplayHealth"
- }
- }
- }
- }
- },
- "/v2/Bus/Operator/InterCity": {
- "get": {
- "tags": [
- "InterCityBus"
- ],
- "summary": "取得公路客運的營運業者資料",
- "description": "公路客運之營運業者資料",
- "operationId": "InterCityBusApi_Operator",
- "consumes": [],
- "produces": [
- "application/json",
- "text/json"
- ],
- "parameters": [
- {
- "name": "$select",
- "in": "query",
- "description": "挑選",
- "type": "string"
- },
- {
- "name": "$filter",
- "in": "query",
- "description": "過濾",
- "type": "string"
- },
- {
- "name": "$orderby",
- "in": "query",
- "description": "排序",
- "type": "string"
- },
- {
- "name": "$top",
- "in": "query",
- "description": "取前幾筆",
- "type": "integer",
- "default": 30
- },
- {
- "name": "$skip",
- "in": "query",
- "description": "跳過前幾筆",
- "type": "string"
- },
+ "text/xml"
+ ],
+ "parameters": [
{
"name": "$format",
"in": "query",
@@ -5535,10 +5528,7 @@
"200": {
"description": "OK",
"schema": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/Service.DTO.Version2.Base.Operator"
- }
+ "$ref": "#/definitions/Service.DTO.Version2.Bus.BusVersion"
}
},
"299": {
@@ -5550,14 +5540,14 @@
}
}
},
- "/v2/Bus/Route/InterCity": {
+ "/v2/Bus/Operator/InterCity": {
"get": {
"tags": [
"InterCityBus"
],
- "summary": "取得公路客運路線資料",
- "description": "公路客運之路線資料",
- "operationId": "InterCityBusApi_Route",
+ "summary": "取得公路客運的營運業者資料",
+ "description": "公路客運之營運業者資料",
+ "operationId": "InterCityBusApi_Operator",
"consumes": [],
"produces": [
"application/json",
@@ -5624,7 +5614,7 @@
"schema": {
"type": "array",
"items": {
- "$ref": "#/definitions/Service.DTO.Version2.Bus.BusRoute"
+ "$ref": "#/definitions/Service.DTO.Version2.Base.Operator"
}
}
},
@@ -5637,27 +5627,20 @@
}
}
},
- "/v2/Bus/Route/InterCity/{RouteName}": {
+ "/v2/Bus/Route/InterCity": {
"get": {
"tags": [
"InterCityBus"
],
- "summary": "取得指定[路線名稱]的公路客運路線資料",
+ "summary": "取得公路客運路線資料",
"description": "公路客運之路線資料",
- "operationId": "InterCityBusApi_Route_1",
+ "operationId": "InterCityBusApi_Route",
"consumes": [],
"produces": [
"application/json",
"text/json"
],
"parameters": [
- {
- "name": "RouteName",
- "in": "path",
- "description": "繁體中文路線名稱,如'9102'",
- "required": true,
- "type": "string"
- },
{
"name": "$select",
"in": "query",
@@ -5731,20 +5714,27 @@
}
}
},
- "/v2/Bus/Stop/InterCity": {
+ "/v2/Bus/Route/InterCity/{RouteName}": {
"get": {
"tags": [
"InterCityBus"
],
- "summary": "取得公路客運站牌資料",
- "description": "公路客運之站牌資料",
- "operationId": "InterCityBusApi_Stop",
+ "summary": "取得指定[路線名稱]的公路客運路線資料",
+ "description": "公路客運之路線資料",
+ "operationId": "InterCityBusApi_Route_1",
"consumes": [],
"produces": [
"application/json",
"text/json"
],
"parameters": [
+ {
+ "name": "RouteName",
+ "in": "path",
+ "description": "繁體中文路線名稱,如'9102'",
+ "required": true,
+ "type": "string"
+ },
{
"name": "$select",
"in": "query",
@@ -5776,12 +5766,6 @@
"description": "跳過前幾筆",
"type": "string"
},
- {
- "name": "$spatialFilter",
- "in": "query",
- "description": "空間過濾",
- "type": "string"
- },
{
"name": "$format",
"in": "query",
@@ -5811,7 +5795,7 @@
"schema": {
"type": "array",
"items": {
- "$ref": "#/definitions/Service.DTO.Version2.Bus.BusStop"
+ "$ref": "#/definitions/Service.DTO.Version2.Bus.BusRoute"
}
}
},
@@ -5824,14 +5808,14 @@
}
}
},
- "/v2/Bus/Station/InterCity": {
+ "/v2/Bus/Stop/InterCity": {
"get": {
"tags": [
"InterCityBus"
],
- "summary": "取得公路客運站位資料",
- "description": "公路客運之各站牌所屬的站位資料",
- "operationId": "InterCityBusApi_Station",
+ "summary": "取得公路客運站牌資料",
+ "description": "公路客運之站牌資料",
+ "operationId": "InterCityBusApi_Stop",
"consumes": [],
"produces": [
"application/json",
@@ -5904,7 +5888,7 @@
"schema": {
"type": "array",
"items": {
- "$ref": "#/definitions/Service.DTO.Version2.Bus.BusStation"
+ "$ref": "#/definitions/Service.DTO.Version2.Bus.BusStop"
}
}
},
@@ -5917,14 +5901,14 @@
}
}
},
- "/v2/Bus/StationName/InterCity": {
+ "/v2/Bus/Station/InterCity": {
"get": {
"tags": [
"InterCityBus"
],
- "summary": "取得公路客運站名碼資料",
- "description": "公路客運之各站牌所屬的站名碼資料",
- "operationId": "InterCityBusApi_StationName",
+ "summary": "取得公路客運站位資料",
+ "description": "公路客運之各站牌所屬的站位資料",
+ "operationId": "InterCityBusApi_Station",
"consumes": [],
"produces": [
"application/json",
@@ -5997,7 +5981,7 @@
"schema": {
"type": "array",
"items": {
- "$ref": "#/definitions/Service.DTO.Version2.Bus.BusStationName"
+ "$ref": "#/definitions/Service.DTO.Version2.Bus.BusStation"
}
}
},
@@ -7235,7 +7219,6 @@
"StopName",
"StopSequence",
"StopPosition",
- "StationNameID",
"StationGroupID"
],
"type": "object",
@@ -7273,10 +7256,6 @@
"description": "站牌所屬的站位ID",
"type": "string"
},
- "StationNameID": {
- "description": "站牌所屬的站名碼ID",
- "type": "string"
- },
"StationGroupID": {
"description": "站牌所屬的組站位ID",
"type": "string"
@@ -7287,6 +7266,185 @@
}
}
},
+ "Service.DTO.Version2.Bus.BusFirstLastTripInfo": {
+ "title": "BusFirstLastTripInfo",
+ "description": "路線首末班車資料型別",
+ "required": [
+ "RouteUID",
+ "RouteID",
+ "RouteName",
+ "OperatorID",
+ "SubRouteUID",
+ "SubRouteID",
+ "SubRouteName",
+ "Direction",
+ "FirstLastTrips",
+ "UpdateTime",
+ "VersionID"
+ ],
+ "type": "object",
+ "properties": {
+ "RouteUID": {
+ "description": "路線唯一識別代碼,規則為 {業管機關簡碼} + {RouteID},其中 {業管機關簡碼} 可於Authority API中的AuthorityCode欄位查詢",
+ "type": "string"
+ },
+ "RouteID": {
+ "description": "地區既用中之路線代碼(為原資料內碼)",
+ "type": "string"
+ },
+ "RouteName": {
+ "$ref": "#/definitions/Service.DTO.Version2.Base.NameType",
+ "title": "NameType",
+ "description": "路線名稱"
+ },
+ "OperatorID": {
+ "description": "營運業者代碼",
+ "type": "string"
+ },
+ "SubRouteUID": {
+ "description": "附屬路線唯一識別代碼,規則為 {業管機關簡碼} + {SubRouteID},其中 {業管機關簡碼} 可於Authority API中的AuthorityCode欄位查詢",
+ "type": "string"
+ },
+ "SubRouteID": {
+ "description": "地區既用中之附屬路線代碼(為原資料內碼)",
+ "type": "string"
+ },
+ "SubRouteName": {
+ "$ref": "#/definitions/Service.DTO.Version2.Base.NameType",
+ "title": "NameType",
+ "description": "附屬路線名稱"
+ },
+ "Direction": {
+ "format": "int32",
+ "title": "integer",
+ "description": "去返程 : [0:'去程',1:'返程',2:'迴圈',255:'未知']",
+ "type": "integer"
+ },
+ "FirstLastTrips": {
+ "description": "首末班車",
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/Service.DTO.Version2.Bus.FirstLastTrip"
+ }
+ },
+ "UpdateTime": {
+ "title": "DateTime",
+ "description": "資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)",
+ "type": "string"
+ },
+ "VersionID": {
+ "format": "int32",
+ "description": "資料版本編號",
+ "type": "integer"
+ }
+ }
+ },
+ "Service.DTO.Version2.Bus.FirstLastTrip": {
+ "title": "FirstLastTrip",
+ "description": "首末班車資料型別",
+ "required": [
+ "ServiceDay",
+ "FirstTripDepTime",
+ "LastTripDepTime"
+ ],
+ "type": "object",
+ "properties": {
+ "ServiceDay": {
+ "$ref": "#/definitions/Service.DTO.Version2.Bus.BusFirstLastTripInfo.ServiceDay",
+ "title": "ServiceDay",
+ "description": "服務日型態"
+ },
+ "FirstTripDepTime": {
+ "description": "頭班車發車時間(HH:mm)",
+ "type": "string"
+ },
+ "LastTripDepTime": {
+ "description": "末班車發車時間(HH:mm)",
+ "type": "string"
+ }
+ }
+ },
+ "Service.DTO.Version2.Bus.BusFirstLastTripInfo.ServiceDay": {
+ "title": "ServiceDay",
+ "required": [
+ "Sunday",
+ "Monday",
+ "Tuesday",
+ "Wednesday",
+ "Thursday",
+ "Friday",
+ "Saturday"
+ ],
+ "type": "object",
+ "properties": {
+ "Sunday": {
+ "format": "int32",
+ "title": "integer",
+ "description": "星期日是否營運 : [0:'否',1:'是']",
+ "type": "integer"
+ },
+ "Monday": {
+ "format": "int32",
+ "title": "integer",
+ "description": "星期一是否營運 : [0:'否',1:'是']",
+ "type": "integer"
+ },
+ "Tuesday": {
+ "format": "int32",
+ "title": "integer",
+ "description": "星期二是否營運 : [0:'否',1:'是']",
+ "type": "integer"
+ },
+ "Wednesday": {
+ "format": "int32",
+ "title": "integer",
+ "description": "星期三是否營運 : [0:'否',1:'是']",
+ "type": "integer"
+ },
+ "Thursday": {
+ "format": "int32",
+ "title": "integer",
+ "description": "星期四是否營運 : [0:'否',1:'是']",
+ "type": "integer"
+ },
+ "Friday": {
+ "format": "int32",
+ "title": "integer",
+ "description": "星期五是否營運 : [0:'否',1:'是']",
+ "type": "integer"
+ },
+ "Saturday": {
+ "format": "int32",
+ "title": "integer",
+ "description": "星期六是否營運 : [0:'否',1:'是']",
+ "type": "integer"
+ },
+ "NationalHolidays": {
+ "format": "int32",
+ "title": "integer",
+ "description": "國定假日營運與否 : [0:'否',1:'是']",
+ "type": "integer"
+ },
+ "DayBeforeNationalHoliday": {
+ "format": "int32",
+ "title": "integer",
+ "description": "國定假日前一日營運與否 : [0:'否',1:'是']",
+ "type": "integer"
+ },
+ "DayAfterNationalHoliday": {
+ "format": "int32",
+ "title": "integer",
+ "description": "國定假日後一日營運與否 : [0:'否',1:'是']",
+ "type": "integer"
+ },
+ "TyphoonDay": {
+ "format": "int32",
+ "title": "integer",
+ "description": "颱風停止上班上課期間營運與否 : [0:'否',1:'是']",
+ "type": "integer"
+ }
+ }
+ },
"Service.DTO.Version2.Bus.BusN1EstimateTime": {
"title": "BusN1EstimateTime",
"required": [
@@ -8457,7 +8615,6 @@
"StationID",
"StationName",
"StationPosition",
- "StationNameID",
"StationGroupID",
"UpdateTime",
"VersionID"
@@ -8486,10 +8643,6 @@
"description": "站位地址",
"type": "string"
},
- "StationNameID": {
- "description": "站牌所屬的站名碼ID",
- "type": "string"
- },
"StationGroupID": {
"description": "站牌所屬的組站位ID",
"type": "string"
@@ -8593,49 +8746,6 @@
}
}
},
- "Service.DTO.Version2.Bus.BusStationName": {
- "title": "BusStationName",
- "description": "站名碼資料型別",
- "required": [
- "StationNameUID",
- "StationNameID",
- "StationNameName",
- "StationNamePosition",
- "UpdateTime",
- "VersionID"
- ],
- "type": "object",
- "properties": {
- "StationNameUID": {
- "description": "站名碼唯一識別代碼,規則為 {業管機關簡碼} + {StationID},其中 {業管機關簡碼} 可於Authority API中的AuthorityCode欄位查詢",
- "type": "string"
- },
- "StationNameID": {
- "description": "站名碼代碼",
- "type": "string"
- },
- "StationNameName": {
- "$ref": "#/definitions/Service.DTO.Version2.Base.NameType",
- "title": "NameType",
- "description": "站名碼名稱"
- },
- "StationNamePosition": {
- "$ref": "#/definitions/Service.DTO.Version2.Base.PointType",
- "title": "PointType",
- "description": "站名碼位置"
- },
- "UpdateTime": {
- "title": "DateTime",
- "description": "資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)",
- "type": "string"
- },
- "VersionID": {
- "format": "int32",
- "description": "資料版本編號",
- "type": "integer"
- }
- }
- },
"Service.DTO.Version2.Bus.BusStop": {
"title": "BusStop",
"description": "站牌/位資料型別",
@@ -8645,7 +8755,6 @@
"AuthorityID",
"StopName",
"StopPosition",
- "StationNameID",
"StationGroupID",
"UpdateTime",
"VersionID"
@@ -8686,10 +8795,6 @@
"description": "站牌所屬的站位ID",
"type": "string"
},
- "StationNameID": {
- "description": "站牌所屬的站名碼ID",
- "type": "string"
- },
"StationGroupID": {
"description": "站牌所屬的組站位ID",
"type": "string"
diff --git a/oas.bus.v3.json b/oas.bus.v3.json
index 6abe693c..1aa59bec 100644
--- a/oas.bus.v3.json
+++ b/oas.bus.v3.json
@@ -3,7 +3,7 @@
"info": {
"version": "v3",
"title": "MOTC Transport API V3",
- "description": "本平臺提供涵蓋全國尺度之公車、臺鐵、高鐵、捷運、航空、自行車等公共運輸旅運資料服務API,歡迎各產政學單位介接使用。\r\n
利用本平臺開放資料進行各項應用服務開發時,請考量不同特性使用者(如:性別/身心障礙/老幼等)的需求,並歡迎回饋寶貴意見。\r\n
資料使用葵花寶典:[請點我](https://ptxmotc.gitbooks.io/ptx-api-documentation/content/)\r\n
資料服務開發實作參考手冊:[請點我](https://docs.google.com/viewer?url=https://github.com/ptxmotc/PTX_Web/blob/master/Swagger%E6%9C%8D%E5%8B%99%E8%AA%AA%E6%98%8E%E4%B8%8A%E5%82%B3%E5%8F%83%E8%80%83%E6%AA%94%E6%A1%88/%E5%85%AC%E5%85%B1%E9%81%8B%E8%BC%B8%E6%95%B4%E5%90%88%E8%B3%87%E8%A8%8A%E5%B9%B3%E5%8F%B0%E8%B3%87%E6%96%99%E6%9C%8D%E5%8B%99%E9%96%8B%E7%99%BC%E5%AF%A6%E4%BD%9C.pdf?raw=true)\r\n
API URI Convention文件說明:[請點我](https://docs.google.com/viewer?url=https://github.com/ptxmotc/PTX_Web/blob/master/Swagger%E6%9C%8D%E5%8B%99%E8%AA%AA%E6%98%8E%E4%B8%8A%E5%82%B3%E5%8F%83%E8%80%83%E6%AA%94%E6%A1%88/API_URI_Convention%E6%96%87%E4%BB%B6_v1.pdf?raw=true)
資料文本OAS描述:[請點我](https://ptx.transportdata.tw/MOTC/v3/Bus/api-docs/oas)"
+ "description": "本平臺提供涵蓋全國尺度之公車、臺鐵、高鐵、捷運、航空、自行車等公共運輸旅運資料服務API,歡迎各產政學單位介接使用。\r\n
利用本平臺開放資料進行各項應用服務開發時,請考量不同特性使用者(如:性別/身心障礙/老幼等)的需求,並歡迎回饋寶貴意見。\r\n
資料使用葵花寶典:[請點我](https://motc-ptx-api-documentation.gitbook.io/motc-ptx-api-documentation/)\r\n
資料服務開發實作參考手冊:[請點我](https://docs.google.com/viewer?url=https://github.com/ptxmotc/PTX_Web/blob/master/Swagger%E6%9C%8D%E5%8B%99%E8%AA%AA%E6%98%8E%E4%B8%8A%E5%82%B3%E5%8F%83%E8%80%83%E6%AA%94%E6%A1%88/%E5%85%AC%E5%85%B1%E9%81%8B%E8%BC%B8%E6%95%B4%E5%90%88%E8%B3%87%E8%A8%8A%E5%B9%B3%E5%8F%B0%E8%B3%87%E6%96%99%E6%9C%8D%E5%8B%99%E9%96%8B%E7%99%BC%E5%AF%A6%E4%BD%9C.pdf?raw=true)\r\n
API URI Convention文件說明:[請點我](https://docs.google.com/viewer?url=https://github.com/ptxmotc/PTX_Web/blob/master/Swagger%E6%9C%8D%E5%8B%99%E8%AA%AA%E6%98%8E%E4%B8%8A%E5%82%B3%E5%8F%83%E8%80%83%E6%AA%94%E6%A1%88/API_URI_Convention%E6%96%87%E4%BB%B6_v1.pdf?raw=true)
資料文本OAS描述:[請點我](https://ptx.transportdata.tw/MOTC/v3/Bus/api-docs/oas)"
},
"host": "ptx.transportdata.tw",
"basePath": "/MOTC/",
diff --git a/oas.rail.v2.json b/oas.rail.v2.json
index 314aafc9..65856c72 100644
--- a/oas.rail.v2.json
+++ b/oas.rail.v2.json
@@ -3,7 +3,7 @@
"info": {
"version": "v2",
"title": "MOTC Transport API V2",
- "description": "本平臺提供涵蓋全國尺度之公車、臺鐵、高鐵、捷運、航空、自行車等公共運輸旅運資料服務API,歡迎各產政學單位介接使用。\r\n
利用本平臺開放資料進行各項應用服務開發時,請考量不同特性使用者(如:性別/身心障礙/老幼等)的需求,並歡迎回饋寶貴意見。\r\n
資料使用葵花寶典:[請點我](https://ptxmotc.gitbooks.io/ptx-api-documentation/content/)\r\n
資料服務開發實作參考手冊:[請點我](https://docs.google.com/viewer?url=https://github.com/ptxmotc/PTX_Web/blob/master/Swagger%E6%9C%8D%E5%8B%99%E8%AA%AA%E6%98%8E%E4%B8%8A%E5%82%B3%E5%8F%83%E8%80%83%E6%AA%94%E6%A1%88/%E5%85%AC%E5%85%B1%E9%81%8B%E8%BC%B8%E6%95%B4%E5%90%88%E8%B3%87%E8%A8%8A%E5%B9%B3%E5%8F%B0%E8%B3%87%E6%96%99%E6%9C%8D%E5%8B%99%E9%96%8B%E7%99%BC%E5%AF%A6%E4%BD%9C.pdf?raw=true)\r\n
API URI Convention文件說明:[請點我](https://docs.google.com/viewer?url=https://github.com/ptxmotc/PTX_Web/blob/master/Swagger%E6%9C%8D%E5%8B%99%E8%AA%AA%E6%98%8E%E4%B8%8A%E5%82%B3%E5%8F%83%E8%80%83%E6%AA%94%E6%A1%88/API_URI_Convention%E6%96%87%E4%BB%B6_v1.pdf?raw=true)
資料文本OAS描述:[請點我](https://ptx.transportdata.tw/MOTC/v2/Rail/api-docs/oas)"
+ "description": "本平臺提供涵蓋全國尺度之公車、臺鐵、高鐵、捷運、航空、自行車等公共運輸旅運資料服務API,歡迎各產政學單位介接使用。\r\n
利用本平臺開放資料進行各項應用服務開發時,請考量不同特性使用者(如:性別/身心障礙/老幼等)的需求,並歡迎回饋寶貴意見。\r\n
資料使用葵花寶典:[請點我](https://motc-ptx-api-documentation.gitbook.io/motc-ptx-api-documentation/)\r\n
資料服務開發實作參考手冊:[請點我](https://docs.google.com/viewer?url=https://github.com/ptxmotc/PTX_Web/blob/master/Swagger%E6%9C%8D%E5%8B%99%E8%AA%AA%E6%98%8E%E4%B8%8A%E5%82%B3%E5%8F%83%E8%80%83%E6%AA%94%E6%A1%88/%E5%85%AC%E5%85%B1%E9%81%8B%E8%BC%B8%E6%95%B4%E5%90%88%E8%B3%87%E8%A8%8A%E5%B9%B3%E5%8F%B0%E8%B3%87%E6%96%99%E6%9C%8D%E5%8B%99%E9%96%8B%E7%99%BC%E5%AF%A6%E4%BD%9C.pdf?raw=true)\r\n
API URI Convention文件說明:[請點我](https://docs.google.com/viewer?url=https://github.com/ptxmotc/PTX_Web/blob/master/Swagger%E6%9C%8D%E5%8B%99%E8%AA%AA%E6%98%8E%E4%B8%8A%E5%82%B3%E5%8F%83%E8%80%83%E6%AA%94%E6%A1%88/API_URI_Convention%E6%96%87%E4%BB%B6_v1.pdf?raw=true)
資料文本OAS描述:[請點我](https://ptx.transportdata.tw/MOTC/v2/Rail/api-docs/oas)"
},
"host": "ptx.transportdata.tw",
"basePath": "/MOTC/",
@@ -34,10 +34,12 @@
"enum": [
"TRTC",
"KRTC",
- "TYMC"
+ "TYMC",
+ "TRTCMG"
],
"x-enum": {
"TRTC": "臺北捷運",
+ "TRTCMG": "貓空纜車",
"KRTC": "高雄捷運",
"TYMC": "桃園捷運"
}
@@ -123,11 +125,13 @@
"KRTC",
"TYMC",
"KLRT",
- "NTDLRT"
+ "NTDLRT",
+ "TRTCMG"
],
"x-enum": {
"TYMC": "桃園捷運",
"KLRT": "高雄輕軌",
+ "TRTCMG": "貓空纜車",
"TRTC": "臺北捷運",
"NTDLRT": "淡海輕軌",
"KRTC": "高雄捷運"
@@ -214,14 +218,16 @@
"KRTC",
"TYMC",
"KLRT",
- "NTDLRT"
+ "NTDLRT",
+ "TRTCMG"
],
"x-enum": {
"KLRT": "高雄輕軌",
"KRTC": "高雄捷運",
"TRTC": "臺北捷運",
"NTDLRT": "淡海輕軌",
- "TYMC": "桃園捷運"
+ "TYMC": "桃園捷運",
+ "TRTCMG": "貓空纜車"
}
},
{
@@ -311,14 +317,16 @@
"KRTC",
"TYMC",
"KLRT",
- "NTDLRT"
+ "NTDLRT",
+ "TRTCMG"
],
"x-enum": {
"KLRT": "高雄輕軌",
"TRTC": "臺北捷運",
"KRTC": "高雄捷運",
"TYMC": "桃園捷運",
- "NTDLRT": "淡海輕軌"
+ "NTDLRT": "淡海輕軌",
+ "TRTCMG": "貓空纜車"
}
},
{
@@ -571,13 +579,15 @@
"enum": [
"TRTC",
"KRTC",
- "TYMC"
+ "TYMC",
+ "TRTCMG"
],
"x-enum": {
"TRTC": "臺北捷運",
"KLRT": "高雄輕軌",
"TYMC": "桃園捷運",
- "KRTC": "高雄捷運"
+ "KRTC": "高雄捷運",
+ "TRTCMG": "貓空纜車"
}
},
{
@@ -1018,12 +1028,14 @@
"enum": [
"TRTC",
"KRTC",
- "TYMC"
+ "TYMC",
+ "KLRT"
],
"x-enum": {
"KRTC": "高雄捷運",
"TYMC": "桃園捷運",
- "TRTC": "臺北捷運"
+ "TRTC": "臺北捷運",
+ "KLRT": "高雄輕軌"
}
},
{
@@ -1107,13 +1119,15 @@
"KRTC",
"TYMC",
"KLRT",
- "NTDLRT"
+ "NTDLRT",
+ "TRTCMG"
],
"x-enum": {
"TYMC": "桃園捷運",
"KLRT": "高雄輕軌",
"KRTC": "高雄捷運",
"TRTC": "臺北捷運",
+ "TRTCMG": "貓空纜車",
"NTDLRT": "淡海輕軌"
}
},
@@ -1281,10 +1295,12 @@
"enum": [
"TRTC",
"KRTC",
- "TYMC"
+ "TYMC",
+ "KLRT"
],
"x-enum": {
"TYMC": "桃園捷運",
+ "KLRT": "高雄輕軌",
"TRTC": "臺北捷運",
"KRTC": "高雄捷運"
}
@@ -1367,10 +1383,12 @@
"type": "string",
"enum": [
"TRTC",
+ "NTDLRT",
"KRTC",
"TYMC"
],
"x-enum": {
+ "NTDLRT": "淡海輕軌",
"KRTC": "高雄捷運",
"TRTC": "臺北捷運",
"TYMC": "桃園捷運"
@@ -1458,8 +1476,8 @@
],
"x-enum": {
"TYMC": "桃園捷運",
- "KLRT": "高雄輕軌",
- "KRTC": "高雄捷運"
+ "KRTC": "高雄捷運",
+ "KLRT": "高雄輕軌"
}
},
{
@@ -1550,9 +1568,9 @@
"KLRT"
],
"x-enum": {
+ "KRTC": "高雄捷運",
"TYMC": "桃園捷運",
- "KLRT": "高雄輕軌",
- "KRTC": "高雄捷運"
+ "KLRT": "高雄輕軌"
}
},
{
@@ -3001,7 +3019,7 @@
],
"summary": "取得動態對號座剩餘座位資訊看板資料",
"description": "取得動態對號座剩餘座位資訊看板資料",
- "operationId": "THSRApi_AvailableSeatStatusList",
+ "operationId": "THSRApi_AvailableSeatStatusList_Station",
"consumes": [],
"produces": [
"application/json",
@@ -3065,7 +3083,7 @@
"200": {
"description": "OK",
"schema": {
- "$ref": "#/definitions/MOTC.API.Rail.Models.V2THSRAvaliableSeatStatusWrapper[Service.DTO.Version2.Rail.THSR.AvailableSeat]"
+ "$ref": "#/definitions/MOTC.API.Rail.Models.V2THSRAvaliableSeatStatusOldWrapper[Service.DTO.Version2.Rail.THSR.Old.AvailableSeat]"
}
}
}
@@ -3078,7 +3096,7 @@
],
"summary": "取得動態指定[車站]的對號座剩餘座位資訊看板資料",
"description": "取得動態指定[車站]的對號座剩餘座位資訊看板資料",
- "operationId": "THSRApi_AvailableSeatStatusList_1",
+ "operationId": "THSRApi_AvailableSeatStatusList_Station_1",
"consumes": [],
"produces": [
"application/json",
@@ -3149,7 +3167,7 @@
"200": {
"description": "OK",
"schema": {
- "$ref": "#/definitions/MOTC.API.Rail.Models.V2THSRAvaliableSeatStatusWrapper[Service.DTO.Version2.Rail.THSR.AvailableSeat]"
+ "$ref": "#/definitions/MOTC.API.Rail.Models.V2THSRAvaliableSeatStatusOldWrapper[Service.DTO.Version2.Rail.THSR.Old.AvailableSeat]"
}
}
}
@@ -3231,6 +3249,167 @@
}
}
},
+ "/v2/Rail/THSR/AvailableSeatStatus/Train/Leg/Today": {
+ "get": {
+ "tags": [
+ "THSR"
+ ],
+ "summary": "**(開發用測試版)** 取得當天對號座即時剩餘位資料({原始}列車區段Leg角度)",
+ "description": "取得當天對號座即時剩餘位資料({原始}列車區段Leg角度)\r\n- 高鐵對號座即時剩餘位(列車區段Leg角度)之資料使用注意事項([連結](https://motc-ptx-api-documentation.gitbook.io/motc-ptx-api-documentation/api-zi-liao-shi-yong-zhu-yi-shi-xiang/rail))\r\n- 當日(D)之更新頻率為每10分鐘\r\n- **(本服務尚在測試中,穩定度及更新頻率將持續優化)**",
+ "operationId": "THSRApi_AvailableSeatStatus",
+ "consumes": [],
+ "produces": [
+ "application/json",
+ "text/json"
+ ],
+ "parameters": [
+ {
+ "name": "$select",
+ "in": "query",
+ "description": "挑選",
+ "type": "string"
+ },
+ {
+ "name": "$filter",
+ "in": "query",
+ "description": "過濾",
+ "type": "string"
+ },
+ {
+ "name": "$orderby",
+ "in": "query",
+ "description": "排序",
+ "type": "string"
+ },
+ {
+ "name": "$top",
+ "in": "query",
+ "description": "取前幾筆",
+ "type": "integer",
+ "default": 30
+ },
+ {
+ "name": "$skip",
+ "in": "query",
+ "description": "跳過前幾筆",
+ "type": "string"
+ },
+ {
+ "name": "$count",
+ "in": "query",
+ "description": "查詢數量",
+ "type": "string",
+ "enum": [
+ "true",
+ "false"
+ ]
+ },
+ {
+ "name": "$format",
+ "in": "query",
+ "description": "指定來源格式",
+ "required": true,
+ "type": "string",
+ "enum": [
+ "JSON",
+ "XML"
+ ]
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "schema": {
+ "$ref": "#/definitions/MOTC.API.Rail.Models.V2THSRAvaliableSeatStatusWrapper[Service.DTO.Version2.Rail.THSR.AvailableSeat]"
+ }
+ }
+ }
+ }
+ },
+ "/v2/Rail/THSR/AvailableSeatStatus/Train/Leg/TrainDate/{TrainDate}": {
+ "get": {
+ "tags": [
+ "THSR"
+ ],
+ "summary": "**(開發用測試版)** 取得指定[日期]對號座即時剩餘位資料({原始}列車區段Leg角度)",
+ "description": "取得指定[日期]對號座即時剩餘位資料({原始}列車區段Leg角度)\r\n- 高鐵對號座即時剩餘位(列車區段Leg角度)之資料使用注意事項([連結](https://motc-ptx-api-documentation.gitbook.io/motc-ptx-api-documentation/api-zi-liao-shi-yong-zhu-yi-shi-xiang/rail))\r\n- 當日後27日(D+1~D+27)之更新頻率為每日的10、16、22時\r\n- **(本服務尚在測試中,穩定度及更新頻率將持續優化)**",
+ "operationId": "THSRApi_AvailableSeatStatus_1",
+ "consumes": [],
+ "produces": [
+ "application/json",
+ "text/json"
+ ],
+ "parameters": [
+ {
+ "name": "TrainDate",
+ "in": "path",
+ "description": "欲查詢車次的日期(格式: yyyy-MM-dd)",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "name": "$select",
+ "in": "query",
+ "description": "挑選",
+ "type": "string"
+ },
+ {
+ "name": "$filter",
+ "in": "query",
+ "description": "過濾",
+ "type": "string"
+ },
+ {
+ "name": "$orderby",
+ "in": "query",
+ "description": "排序",
+ "type": "string"
+ },
+ {
+ "name": "$top",
+ "in": "query",
+ "description": "取前幾筆",
+ "type": "integer",
+ "default": 30
+ },
+ {
+ "name": "$skip",
+ "in": "query",
+ "description": "跳過前幾筆",
+ "type": "string"
+ },
+ {
+ "name": "$count",
+ "in": "query",
+ "description": "查詢數量",
+ "type": "string",
+ "enum": [
+ "true",
+ "false"
+ ]
+ },
+ {
+ "name": "$format",
+ "in": "query",
+ "description": "指定來源格式",
+ "required": true,
+ "type": "string",
+ "enum": [
+ "JSON",
+ "XML"
+ ]
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "schema": {
+ "$ref": "#/definitions/MOTC.API.Rail.Models.V2THSRAvaliableSeatStatusWrapper[Service.DTO.Version2.Rail.THSR.AvailableSeat]"
+ }
+ }
+ }
+ }
+ },
"/v2/Rail/TRA/Network": {
"get": {
"tags": [
@@ -5528,7 +5707,7 @@
}
},
"MOTC.API.Rail.Models.V2THSRAvaliableSeatStatusWrapper[Service.DTO.Version2.Rail.THSR.AvailableSeat]": {
- "title": "V2THSRAvaliableSeatStatusWrapper[AvailableSeat]",
+ "title": "AvaliableSeatStatus",
"required": [
"AvailableSeats"
],
@@ -5536,7 +5715,21 @@
"properties": {
"UpdateTime": {
"title": "DateTime",
- "description": "更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)",
+ "description": "PTX平台更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)",
+ "type": "string"
+ },
+ "SrcUpdateTime": {
+ "title": "DateTime",
+ "description": "來源平台更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)",
+ "type": "string"
+ },
+ "Count": {
+ "format": "int64",
+ "description": "資料總筆數",
+ "type": "integer"
+ },
+ "TrainDate": {
+ "description": "營運日說明(格式: yyyy-MM-dd)",
"type": "string"
},
"AvailableSeats": {
@@ -5545,11 +5738,6 @@
"items": {
"$ref": "#/definitions/Service.DTO.Version2.Rail.THSR.AvailableSeat"
}
- },
- "Count": {
- "format": "int64",
- "description": "資料總筆數",
- "type": "integer"
}
}
},
@@ -5559,14 +5747,13 @@
"required": [
"TrainNo",
"Direction",
- "StationID",
- "StationName",
- "DepartureTime",
+ "StartingStationID",
+ "StartingStationCode",
+ "StartingStationName",
"EndingStationID",
+ "EndingStationCode",
"EndingStationName",
- "StopStations",
- "SrcRecTime",
- "UpdateTime"
+ "StopStations"
],
"type": "object",
"properties": {
@@ -5580,23 +5767,27 @@
"description": "方向 : [0:'南下',1:'北上']",
"type": "integer"
},
- "StationID": {
- "description": "查詢車站代碼",
+ "StartingStationID": {
+ "description": "起點車站代碼",
"type": "string"
},
- "StationName": {
+ "StartingStationCode": {
+ "description": "起站車站簡碼(訂票系統用)",
+ "type": "string"
+ },
+ "StartingStationName": {
"$ref": "#/definitions/Service.DTO.Version2.Base.NameType",
"title": "NameType",
- "description": "查詢車站名稱"
- },
- "DepartureTime": {
- "description": "發車時間(格式: HH:mm)",
- "type": "string"
+ "description": "起點車站名稱"
},
"EndingStationID": {
"description": "終點車站代碼",
"type": "string"
},
+ "EndingStationCode": {
+ "description": "終點車站簡碼(訂票系統用)",
+ "type": "string"
+ },
"EndingStationName": {
"$ref": "#/definitions/Service.DTO.Version2.Base.NameType",
"title": "NameType",
@@ -5608,16 +5799,6 @@
"items": {
"$ref": "#/definitions/Service.DTO.Version2.Rail.THSR.StopStation"
}
- },
- "SrcRecTime": {
- "title": "DateTime",
- "description": "來源端平台接收時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)",
- "type": "string"
- },
- "UpdateTime": {
- "title": "DateTime",
- "description": "本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)",
- "type": "string"
}
}
},
@@ -5640,28 +5821,55 @@
"title": "StopStation",
"description": "車次停靠站點組合",
"required": [
+ "StopSequence",
"StationID",
+ "StationCode",
"StationName",
+ "NextStationID",
+ "NextStationCode",
+ "NextStationName",
"StandardSeatStatus",
"BusinessSeatStatus"
],
"type": "object",
"properties": {
+ "StopSequence": {
+ "format": "int32",
+ "description": "跑法站序",
+ "type": "integer"
+ },
"StationID": {
"description": "車站代碼",
"type": "string"
},
+ "StationCode": {
+ "description": "車站簡碼(訂票系統用)",
+ "type": "string"
+ },
"StationName": {
"$ref": "#/definitions/Service.DTO.Version2.Base.NameType",
"title": "NameType",
"description": "車站名稱"
},
+ "NextStationID": {
+ "description": "下一停靠站車站代碼",
+ "type": "string"
+ },
+ "NextStationCode": {
+ "description": "下一停靠站車站簡碼(訂票系統用)",
+ "type": "string"
+ },
+ "NextStationName": {
+ "$ref": "#/definitions/Service.DTO.Version2.Base.NameType",
+ "title": "NameType",
+ "description": "下一停靠站車站名稱"
+ },
"StandardSeatStatus": {
- "description": "標準席剩餘座位狀態 = ['Available: 尚有座位' or 'Limited: 座位有限' or 'Full: 已無座位']",
+ "description": "標準席剩餘座位狀態 = ['O: 尚有座位' or 'L: 座位有限' or 'X: 已無座位']",
"type": "string"
},
"BusinessSeatStatus": {
- "description": "商務席剩餘座位狀態 = ['Available: 尚有座位' or 'Limited: 座位有限' or 'Full: 已無座位']",
+ "description": "商務席剩餘座位狀態 = ['O: 尚有座位' or 'L: 座位有限' or 'X: 已無座位']",
"type": "string"
}
}
@@ -8041,6 +8249,130 @@
}
}
},
+ "MOTC.API.Rail.Models.V2THSRAvaliableSeatStatusOldWrapper[Service.DTO.Version2.Rail.THSR.Old.AvailableSeat]": {
+ "title": "V2THSRAvaliableSeatStatusWrapper",
+ "required": [
+ "AvailableSeats"
+ ],
+ "type": "object",
+ "properties": {
+ "UpdateTime": {
+ "title": "DateTime",
+ "description": "更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)",
+ "type": "string"
+ },
+ "AvailableSeats": {
+ "description": "對號座位狀態資訊(依高鐵規定若營運狀態有異常狀況時,剩餘座位資訊將停留在最後正常運行時間之狀態不做更新,實際資料請參考高鐵各車站現場對號座剩餘座位資訊看板)",
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/Service.DTO.Version2.Rail.THSR.Old.AvailableSeat"
+ }
+ },
+ "Count": {
+ "format": "int64",
+ "description": "資料總筆數",
+ "type": "integer"
+ }
+ }
+ },
+ "Service.DTO.Version2.Rail.THSR.Old.AvailableSeat": {
+ "title": "AvailableSeat",
+ "description": "高鐵對號座位狀態資訊",
+ "required": [
+ "TrainNo",
+ "Direction",
+ "StationID",
+ "StationName",
+ "DepartureTime",
+ "EndingStationID",
+ "EndingStationName",
+ "StopStations",
+ "SrcRecTime",
+ "UpdateTime"
+ ],
+ "type": "object",
+ "properties": {
+ "TrainNo": {
+ "description": "車次號碼",
+ "type": "string"
+ },
+ "Direction": {
+ "format": "int32",
+ "title": "integer",
+ "description": "方向 : [0:'南下',1:'北上']",
+ "type": "integer"
+ },
+ "StationID": {
+ "description": "查詢車站代碼",
+ "type": "string"
+ },
+ "StationName": {
+ "$ref": "#/definitions/Service.DTO.Version2.Base.NameType",
+ "title": "NameType",
+ "description": "查詢車站名稱"
+ },
+ "DepartureTime": {
+ "description": "發車時間(格式: HH:mm)",
+ "type": "string"
+ },
+ "EndingStationID": {
+ "description": "終點車站代碼",
+ "type": "string"
+ },
+ "EndingStationName": {
+ "$ref": "#/definitions/Service.DTO.Version2.Base.NameType",
+ "title": "NameType",
+ "description": "終點車站名稱"
+ },
+ "StopStations": {
+ "description": "車次停靠站點組合",
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/Service.DTO.Version2.Rail.THSR.Old.StopStation"
+ }
+ },
+ "SrcRecTime": {
+ "title": "DateTime",
+ "description": "來源端平台接收時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)",
+ "type": "string"
+ },
+ "UpdateTime": {
+ "title": "DateTime",
+ "description": "本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)",
+ "type": "string"
+ }
+ }
+ },
+ "Service.DTO.Version2.Rail.THSR.Old.StopStation": {
+ "title": "StopStation",
+ "description": "車次停靠站點組合",
+ "required": [
+ "StationID",
+ "StationName",
+ "StandardSeatStatus",
+ "BusinessSeatStatus"
+ ],
+ "type": "object",
+ "properties": {
+ "StationID": {
+ "description": "車站代碼",
+ "type": "string"
+ },
+ "StationName": {
+ "$ref": "#/definitions/Service.DTO.Version2.Base.NameType",
+ "title": "NameType",
+ "description": "車站名稱"
+ },
+ "StandardSeatStatus": {
+ "description": "標準席剩餘座位狀態 = ['Available: 尚有座位' or 'Limited: 座位有限' or 'Full: 已無座位']",
+ "type": "string"
+ },
+ "BusinessSeatStatus": {
+ "description": "商務席剩餘座位狀態 = ['Available: 尚有座位' or 'Limited: 座位有限' or 'Full: 已無座位']",
+ "type": "string"
+ }
+ }
+ },
"Service.DTO.Version2.Base.Operator": {
"title": "Operator",
"description": "營運業者資料型別",
diff --git a/oas.rail.v3.json b/oas.rail.v3.json
index 4c012b91..a6f4b2b6 100644
--- a/oas.rail.v3.json
+++ b/oas.rail.v3.json
@@ -3,7 +3,7 @@
"info": {
"version": "v3",
"title": "MOTC Transport API V3",
- "description": "本平臺提供涵蓋全國尺度之公車、臺鐵、高鐵、捷運、航空、自行車等公共運輸旅運資料服務API,歡迎各產政學單位介接使用。\r\n
利用本平臺開放資料進行各項應用服務開發時,請考量不同特性使用者(如:性別/身心障礙/老幼等)的需求,並歡迎回饋寶貴意見。\r\n
資料使用葵花寶典:[請點我](https://ptxmotc.gitbooks.io/ptx-api-documentation/content/)\r\n
資料服務開發實作參考手冊:[請點我](https://docs.google.com/viewer?url=https://github.com/ptxmotc/PTX_Web/blob/master/Swagger%E6%9C%8D%E5%8B%99%E8%AA%AA%E6%98%8E%E4%B8%8A%E5%82%B3%E5%8F%83%E8%80%83%E6%AA%94%E6%A1%88/%E5%85%AC%E5%85%B1%E9%81%8B%E8%BC%B8%E6%95%B4%E5%90%88%E8%B3%87%E8%A8%8A%E5%B9%B3%E5%8F%B0%E8%B3%87%E6%96%99%E6%9C%8D%E5%8B%99%E9%96%8B%E7%99%BC%E5%AF%A6%E4%BD%9C.pdf?raw=true)\r\n
API URI Convention文件說明:[請點我](https://docs.google.com/viewer?url=https://github.com/ptxmotc/PTX_Web/blob/master/Swagger%E6%9C%8D%E5%8B%99%E8%AA%AA%E6%98%8E%E4%B8%8A%E5%82%B3%E5%8F%83%E8%80%83%E6%AA%94%E6%A1%88/API_URI_Convention%E6%96%87%E4%BB%B6_v1.pdf?raw=true)
資料文本OAS描述:[請點我](https://ptx.transportdata.tw/MOTC/v3/Rail/api-docs/oas)"
+ "description": "本平臺提供涵蓋全國尺度之公車、臺鐵、高鐵、捷運、航空、自行車等公共運輸旅運資料服務API,歡迎各產政學單位介接使用。\r\n
利用本平臺開放資料進行各項應用服務開發時,請考量不同特性使用者(如:性別/身心障礙/老幼等)的需求,並歡迎回饋寶貴意見。\r\n
資料使用葵花寶典:[請點我](https://motc-ptx-api-documentation.gitbook.io/motc-ptx-api-documentation/)\r\n
資料服務開發實作參考手冊:[請點我](https://docs.google.com/viewer?url=https://github.com/ptxmotc/PTX_Web/blob/master/Swagger%E6%9C%8D%E5%8B%99%E8%AA%AA%E6%98%8E%E4%B8%8A%E5%82%B3%E5%8F%83%E8%80%83%E6%AA%94%E6%A1%88/%E5%85%AC%E5%85%B1%E9%81%8B%E8%BC%B8%E6%95%B4%E5%90%88%E8%B3%87%E8%A8%8A%E5%B9%B3%E5%8F%B0%E8%B3%87%E6%96%99%E6%9C%8D%E5%8B%99%E9%96%8B%E7%99%BC%E5%AF%A6%E4%BD%9C.pdf?raw=true)\r\n
API URI Convention文件說明:[請點我](https://docs.google.com/viewer?url=https://github.com/ptxmotc/PTX_Web/blob/master/Swagger%E6%9C%8D%E5%8B%99%E8%AA%AA%E6%98%8E%E4%B8%8A%E5%82%B3%E5%8F%83%E8%80%83%E6%AA%94%E6%A1%88/API_URI_Convention%E6%96%87%E4%BB%B6_v1.pdf?raw=true)
資料文本OAS描述:[請點我](https://ptx.transportdata.tw/MOTC/v3/Rail/api-docs/oas)"
},
"host": "ptx.transportdata.tw",
"basePath": "/MOTC/",
@@ -4322,9 +4322,9 @@
"description": "路線間轉乘(迄)之車站名稱"
},
"MinTransferTime": {
- "format": "int32",
+ "format": "double",
"description": "轉乘耗時參考時間(分)",
- "type": "integer"
+ "type": "number"
},
"TransferDescription": {
"description": "轉乘方式文字描述",
@@ -5959,9 +5959,9 @@
"description": "軌道場站名稱"
},
"MinTransferTime": {
- "format": "int32",
+ "format": "double",
"description": "最短轉乘時間",
- "type": "integer"
+ "type": "number"
},
"FloorLevel": {
"description": "轉乘樓層",
@@ -6028,9 +6028,9 @@
"type": "string"
},
"MinTransferTime": {
- "format": "int32",
+ "format": "double",
"description": "最短轉乘時間",
- "type": "integer"
+ "type": "number"
},
"FloorLevel": {
"description": "轉乘樓層",
@@ -6085,9 +6085,9 @@
"description": "機場名稱"
},
"MinTransferTime": {
- "format": "int32",
+ "format": "double",
"description": "最短轉乘時間",
- "type": "integer"
+ "type": "number"
},
"FloorLevel": {
"description": "轉乘樓層",
@@ -6138,9 +6138,9 @@
"description": "公共自行車租借站位名稱"
},
"MinTransferTime": {
- "format": "int32",
+ "format": "double",
"description": "最短轉乘時間",
- "type": "integer"
+ "type": "number"
},
"FloorLevel": {
"description": "轉乘樓層",
@@ -6180,9 +6180,9 @@
"description": "停車場名稱"
},
"MinTransferTime": {
- "format": "int32",
+ "format": "double",
"description": "最短轉乘時間",
- "type": "integer"
+ "type": "number"
},
"FloorLevel": {
"description": "轉乘樓層",
@@ -6221,9 +6221,9 @@
"description": "計程車招呼站名稱"
},
"MinTransferTime": {
- "format": "int32",
+ "format": "double",
"description": "最短轉乘時間",
- "type": "integer"
+ "type": "number"
},
"FloorLevel": {
"description": "轉乘樓層",
@@ -6273,9 +6273,9 @@
"description": "計程車招呼站名稱"
},
"MinTransferTime": {
- "format": "int32",
+ "format": "double",
"description": "最短轉乘時間",
- "type": "integer"
+ "type": "number"
},
"FloorLevel": {
"description": "轉乘樓層",
diff --git a/oas.ship.v3.json b/oas.ship.v3.json
index d11f8879..95623762 100644
--- a/oas.ship.v3.json
+++ b/oas.ship.v3.json
@@ -2,7 +2,7 @@
"swagger": "2.0",
"info": {
"title": "MOTC Transport API V3",
- "description": "本平臺提供涵蓋全國尺度之公車、臺鐵、高鐵、捷運、航空、自行車等公共運輸旅運資料服務API,歡迎各產政學單位介接使用。\n
利用本平臺開放資料進行各項應用服務開發時,請考量不同特性使用者(如:性別/身心障礙/老幼等)的需求,並歡迎回饋寶貴意見。\n
資料使用葵花寶典:[請點我](https://ptxmotc.gitbooks.io/ptx-api-documentation/content/)\n
資料服務開發實作參考手冊:[請點我](https://docs.google.com/viewer?url=https://github.com/ptxmotc/PTX_Web/blob/master/Swagger%E6%9C%8D%E5%8B%99%E8%AA%AA%E6%98%8E%E4%B8%8A%E5%82%B3%E5%8F%83%E8%80%83%E6%AA%94%E6%A1%88/%E5%85%AC%E5%85%B1%E9%81%8B%E8%BC%B8%E6%95%B4%E5%90%88%E8%B3%87%E8%A8%8A%E5%B9%B3%E5%8F%B0%E8%B3%87%E6%96%99%E6%9C%8D%E5%8B%99%E9%96%8B%E7%99%BC%E5%AF%A6%E4%BD%9C.pdf?raw=true)\n
API URI Convention文件說明:[請點我](https://docs.google.com/viewer?url=https://github.com/ptxmotc/PTX_Web/blob/master/Swagger%E6%9C%8D%E5%8B%99%E8%AA%AA%E6%98%8E%E4%B8%8A%E5%82%B3%E5%8F%83%E8%80%83%E6%AA%94%E6%A1%88/API_URI_Convention%E6%96%87%E4%BB%B6_v1.pdf?raw=true)
資料文本OAS描述:[請點我](https://ptx.transportdata.tw/MOTC/v3/Ship/api-docs/oas)",
+ "description": "本平臺提供涵蓋全國尺度之公車、臺鐵、高鐵、捷運、航空、自行車等公共運輸旅運資料服務API,歡迎各產政學單位介接使用。\n
利用本平臺開放資料進行各項應用服務開發時,請考量不同特性使用者(如:性別/身心障礙/老幼等)的需求,並歡迎回饋寶貴意見。\n
資料使用葵花寶典:[請點我](https://motc-ptx-api-documentation.gitbook.io/motc-ptx-api-documentation/)\n
資料服務開發實作參考手冊:[請點我](https://docs.google.com/viewer?url=https://github.com/ptxmotc/PTX_Web/blob/master/Swagger%E6%9C%8D%E5%8B%99%E8%AA%AA%E6%98%8E%E4%B8%8A%E5%82%B3%E5%8F%83%E8%80%83%E6%AA%94%E6%A1%88/%E5%85%AC%E5%85%B1%E9%81%8B%E8%BC%B8%E6%95%B4%E5%90%88%E8%B3%87%E8%A8%8A%E5%B9%B3%E5%8F%B0%E8%B3%87%E6%96%99%E6%9C%8D%E5%8B%99%E9%96%8B%E7%99%BC%E5%AF%A6%E4%BD%9C.pdf?raw=true)\n
API URI Convention文件說明:[請點我](https://docs.google.com/viewer?url=https://github.com/ptxmotc/PTX_Web/blob/master/Swagger%E6%9C%8D%E5%8B%99%E8%AA%AA%E6%98%8E%E4%B8%8A%E5%82%B3%E5%8F%83%E8%80%83%E6%AA%94%E6%A1%88/API_URI_Convention%E6%96%87%E4%BB%B6_v1.pdf?raw=true)
資料文本OAS描述:[請點我](https://ptx.transportdata.tw/MOTC/v3/Ship/api-docs/oas)",
"version": "v3"
},
"host": "ptx.transportdata.tw",
@@ -787,53 +787,6 @@
"title": "DateTime",
"description": "資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)",
"type": "string"
- },
- "PK_BaseAuthority": {
- "format": "uuid",
- "title": "Guid",
- "description": "資料唯一碼",
- "type": "string"
- },
- "AuthorityID": {
- "title": "String",
- "description": "業管機關代號",
- "type": "string"
- },
- "EnumID": {
- "format": "int32",
- "title": "Int32",
- "description": "對應至程式所定義之Enum",
- "type": "integer"
- },
- "IsAirDataAuth": {
- "title": "Boolean",
- "description": "是否為航空資料之權責單位",
- "type": "boolean"
- },
- "IsBusDataAuth": {
- "title": "Boolean",
- "description": "是否為公車資料之權責單位",
- "type": "boolean"
- },
- "IsRailDataAuth": {
- "title": "Boolean",
- "description": "是否為軌道資料之權責單位",
- "type": "boolean"
- },
- "IsBikeDataAuth": {
- "title": "Boolean",
- "description": "是否為自行車資料之權責單位",
- "type": "boolean"
- },
- "IsTourismDataAuth": {
- "title": "Boolean",
- "description": "是否為觀光資料之權責單位",
- "type": "boolean"
- },
- "IsShipDataAuth": {
- "title": "Boolean",
- "description": "是否為航運資料之權責單位",
- "type": "boolean"
}
}
},
@@ -867,7 +820,7 @@
"description": "資料版本編號",
"type": "integer"
},
- "Ports": {
+ "Authorities": {
"title": "Array",
"description": "資料(陣列)",
"type": "array",
@@ -977,7 +930,7 @@
"description": "資料版本編號",
"type": "integer"
},
- "Ports": {
+ "Operators": {
"title": "Array",
"description": "資料(陣列)",
"type": "array",
@@ -1249,7 +1202,7 @@
"description": "資料版本編號",
"type": "integer"
},
- "Ports": {
+ "Routes": {
"title": "Array",
"description": "資料(陣列)",
"type": "array",
@@ -1394,7 +1347,7 @@
"description": "資料版本編號",
"type": "integer"
},
- "Ports": {
+ "RouteFares": {
"title": "Array",
"description": "資料(陣列)",
"type": "array",
@@ -1639,7 +1592,7 @@
"description": "資料版本編號",
"type": "integer"
},
- "Ports": {
+ "GeneralSchedules": {
"title": "Array",
"description": "資料(陣列)",
"type": "array",
@@ -1657,7 +1610,8 @@
},
"tags": [
{
- "name": "Ship"
+ "name": "Ship",
+ "description": "航運"
}
]
}
diff --git a/oas.tourism.v2.json b/oas.tourism.v2.json
index de6e1420..5ed1b53c 100644
--- a/oas.tourism.v2.json
+++ b/oas.tourism.v2.json
@@ -132,13 +132,6 @@
"LienchiangCounty"
],
"x-enum": {
- "YilanCounty": "宜蘭縣",
- "Taoyuan": "桃園市",
- "Keelung": "基隆市",
- "ChiayiCounty": "嘉義縣",
- "TaitungCounty": "臺東縣",
- "Taipei": "臺北市",
- "Chiayi": "嘉義市",
"LienchiangCounty": "連江縣",
"HsinchuCounty": "新竹縣",
"KinmenCounty": "金門縣",
@@ -146,14 +139,21 @@
"MiaoliCounty": "苗栗縣",
"NantouCounty": "南投縣",
"Taichung": "臺中市",
+ "YilanCounty": "宜蘭縣",
+ "Taoyuan": "桃園市",
"NewTaipei": "新北市",
+ "Keelung": "基隆市",
+ "Chiayi": "嘉義市",
"Kaohsiung": "高雄市",
"HualienCounty": "花蓮縣",
"PingtungCounty": "屏東縣",
"ChanghuaCounty": "彰化縣",
"YunlinCounty": "雲林縣",
"Hsinchu": "新竹市",
- "PenghuCounty": "澎湖縣"
+ "PenghuCounty": "澎湖縣",
+ "ChiayiCounty": "嘉義縣",
+ "TaitungCounty": "臺東縣",
+ "Taipei": "臺北市"
}
},
{
@@ -339,9 +339,6 @@
"LienchiangCounty"
],
"x-enum": {
- "Taoyuan": "桃園市",
- "ChanghuaCounty": "彰化縣",
- "HualienCounty": "花蓮縣",
"TaitungCounty": "臺東縣",
"NewTaipei": "新北市",
"Taipei": "臺北市",
@@ -349,6 +346,8 @@
"PenghuCounty": "澎湖縣",
"PingtungCounty": "屏東縣",
"Taichung": "臺中市",
+ "Taoyuan": "桃園市",
+ "HualienCounty": "花蓮縣",
"YilanCounty": "宜蘭縣",
"Chiayi": "嘉義市",
"Tainan": "臺南市",
@@ -360,6 +359,7 @@
"NantouCounty": "南投縣",
"ChiayiCounty": "嘉義縣",
"KinmenCounty": "金門縣",
+ "ChanghuaCounty": "彰化縣",
"YunlinCounty": "雲林縣"
}
},
@@ -546,10 +546,6 @@
"LienchiangCounty"
],
"x-enum": {
- "YunlinCounty": "雲林縣",
- "Taipei": "臺北市",
- "Keelung": "基隆市",
- "Kaohsiung": "高雄市",
"Taoyuan": "桃園市",
"Taichung": "臺中市",
"YilanCounty": "宜蘭縣",
@@ -567,7 +563,11 @@
"PenghuCounty": "澎湖縣",
"ChiayiCounty": "嘉義縣",
"NewTaipei": "新北市",
- "KinmenCounty": "金門縣"
+ "YunlinCounty": "雲林縣",
+ "Taipei": "臺北市",
+ "KinmenCounty": "金門縣",
+ "Keelung": "基隆市",
+ "Kaohsiung": "高雄市"
}
},
{
@@ -753,9 +753,6 @@
"LienchiangCounty"
],
"x-enum": {
- "ChanghuaCounty": "彰化縣",
- "NantouCounty": "南投縣",
- "Taoyuan": "桃園市",
"KinmenCounty": "金門縣",
"Hsinchu": "新竹市",
"PingtungCounty": "屏東縣",
@@ -764,6 +761,7 @@
"Tainan": "臺南市",
"YilanCounty": "宜蘭縣",
"HualienCounty": "花蓮縣",
+ "NantouCounty": "南投縣",
"Chiayi": "嘉義市",
"Keelung": "基隆市",
"Taipei": "臺北市",
@@ -774,7 +772,9 @@
"ChiayiCounty": "嘉義縣",
"Taichung": "臺中市",
"YunlinCounty": "雲林縣",
- "TaitungCounty": "臺東縣"
+ "ChanghuaCounty": "彰化縣",
+ "TaitungCounty": "臺東縣",
+ "Taoyuan": "桃園市"
}
},
{
@@ -3608,7 +3608,6 @@
"StopName",
"StopSequence",
"StopPosition",
- "StationNameID",
"StationGroupID"
],
"type": "object",
@@ -3646,10 +3645,6 @@
"description": "站牌所屬的站位ID",
"type": "string"
},
- "StationNameID": {
- "description": "站牌所屬的站名碼ID",
- "type": "string"
- },
"StationGroupID": {
"description": "站牌所屬的組站位ID",
"type": "string"
diff --git a/rail/v2/client/metro/metro_api_alert_responses.go b/rail/v2/client/metro/metro_api_alert_responses.go
index 4df2fac0..a0964cbf 100644
--- a/rail/v2/client/metro/metro_api_alert_responses.go
+++ b/rail/v2/client/metro/metro_api_alert_responses.go
@@ -31,7 +31,7 @@ func (o *MetroAPIAlertReader) ReadResponse(response runtime.ClientResponse, cons
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/rail/v2/client/metro/metro_api_first_last_timetable_responses.go b/rail/v2/client/metro/metro_api_first_last_timetable_responses.go
index 1075a7f9..f8f2c21d 100644
--- a/rail/v2/client/metro/metro_api_first_last_timetable_responses.go
+++ b/rail/v2/client/metro/metro_api_first_last_timetable_responses.go
@@ -31,7 +31,7 @@ func (o *MetroAPIFirstLastTimetableReader) ReadResponse(response runtime.ClientR
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/rail/v2/client/metro/metro_api_frequency_responses.go b/rail/v2/client/metro/metro_api_frequency_responses.go
index 17f4599b..65f1b94c 100644
--- a/rail/v2/client/metro/metro_api_frequency_responses.go
+++ b/rail/v2/client/metro/metro_api_frequency_responses.go
@@ -31,7 +31,7 @@ func (o *MetroAPIFrequencyReader) ReadResponse(response runtime.ClientResponse,
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/rail/v2/client/metro/metro_api_line_responses.go b/rail/v2/client/metro/metro_api_line_responses.go
index d7224775..e19731ff 100644
--- a/rail/v2/client/metro/metro_api_line_responses.go
+++ b/rail/v2/client/metro/metro_api_line_responses.go
@@ -31,7 +31,7 @@ func (o *MetroAPILineReader) ReadResponse(response runtime.ClientResponse, consu
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/rail/v2/client/metro/metro_api_line_transfer_responses.go b/rail/v2/client/metro/metro_api_line_transfer_responses.go
index 68829146..b69218ce 100644
--- a/rail/v2/client/metro/metro_api_line_transfer_responses.go
+++ b/rail/v2/client/metro/metro_api_line_transfer_responses.go
@@ -31,7 +31,7 @@ func (o *MetroAPILineTransferReader) ReadResponse(response runtime.ClientRespons
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/rail/v2/client/metro/metro_api_live_board_responses.go b/rail/v2/client/metro/metro_api_live_board_responses.go
index bb62b45b..7c6da329 100644
--- a/rail/v2/client/metro/metro_api_live_board_responses.go
+++ b/rail/v2/client/metro/metro_api_live_board_responses.go
@@ -31,7 +31,7 @@ func (o *MetroAPILiveBoardReader) ReadResponse(response runtime.ClientResponse,
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/rail/v2/client/metro/metro_api_network_responses.go b/rail/v2/client/metro/metro_api_network_responses.go
index 41c21e42..069ac8a5 100644
--- a/rail/v2/client/metro/metro_api_network_responses.go
+++ b/rail/v2/client/metro/metro_api_network_responses.go
@@ -31,7 +31,7 @@ func (o *MetroAPINetworkReader) ReadResponse(response runtime.ClientResponse, co
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/rail/v2/client/metro/metro_api_news_responses.go b/rail/v2/client/metro/metro_api_news_responses.go
index a9d5ad0c..977673b3 100644
--- a/rail/v2/client/metro/metro_api_news_responses.go
+++ b/rail/v2/client/metro/metro_api_news_responses.go
@@ -31,7 +31,7 @@ func (o *MetroAPINewsReader) ReadResponse(response runtime.ClientResponse, consu
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/rail/v2/client/metro/metro_api_o_d_fare_responses.go b/rail/v2/client/metro/metro_api_o_d_fare_responses.go
index e08846bf..c4edfe1d 100644
--- a/rail/v2/client/metro/metro_api_o_d_fare_responses.go
+++ b/rail/v2/client/metro/metro_api_o_d_fare_responses.go
@@ -31,7 +31,7 @@ func (o *MetroAPIODFareReader) ReadResponse(response runtime.ClientResponse, con
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/rail/v2/client/metro/metro_api_route_responses.go b/rail/v2/client/metro/metro_api_route_responses.go
index a6c94e25..3611fb1b 100644
--- a/rail/v2/client/metro/metro_api_route_responses.go
+++ b/rail/v2/client/metro/metro_api_route_responses.go
@@ -31,7 +31,7 @@ func (o *MetroAPIRouteReader) ReadResponse(response runtime.ClientResponse, cons
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/rail/v2/client/metro/metro_api_s2_s_travel_time_responses.go b/rail/v2/client/metro/metro_api_s2_s_travel_time_responses.go
index d42b1900..c0129cc8 100644
--- a/rail/v2/client/metro/metro_api_s2_s_travel_time_responses.go
+++ b/rail/v2/client/metro/metro_api_s2_s_travel_time_responses.go
@@ -31,7 +31,7 @@ func (o *MetroAPIS2STravelTimeReader) ReadResponse(response runtime.ClientRespon
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/rail/v2/client/metro/metro_api_shape_responses.go b/rail/v2/client/metro/metro_api_shape_responses.go
index d3f37392..8f3f2441 100644
--- a/rail/v2/client/metro/metro_api_shape_responses.go
+++ b/rail/v2/client/metro/metro_api_shape_responses.go
@@ -31,7 +31,7 @@ func (o *MetroAPIShapeReader) ReadResponse(response runtime.ClientResponse, cons
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/rail/v2/client/metro/metro_api_station_exit_responses.go b/rail/v2/client/metro/metro_api_station_exit_responses.go
index 3d0e3916..589f2c98 100644
--- a/rail/v2/client/metro/metro_api_station_exit_responses.go
+++ b/rail/v2/client/metro/metro_api_station_exit_responses.go
@@ -31,7 +31,7 @@ func (o *MetroAPIStationExitReader) ReadResponse(response runtime.ClientResponse
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/rail/v2/client/metro/metro_api_station_facility_responses.go b/rail/v2/client/metro/metro_api_station_facility_responses.go
index 6ce16c69..0c7d2871 100644
--- a/rail/v2/client/metro/metro_api_station_facility_responses.go
+++ b/rail/v2/client/metro/metro_api_station_facility_responses.go
@@ -31,7 +31,7 @@ func (o *MetroAPIStationFacilityReader) ReadResponse(response runtime.ClientResp
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/rail/v2/client/metro/metro_api_station_of_line_responses.go b/rail/v2/client/metro/metro_api_station_of_line_responses.go
index fbc9314d..117843de 100644
--- a/rail/v2/client/metro/metro_api_station_of_line_responses.go
+++ b/rail/v2/client/metro/metro_api_station_of_line_responses.go
@@ -31,7 +31,7 @@ func (o *MetroAPIStationOfLineReader) ReadResponse(response runtime.ClientRespon
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/rail/v2/client/metro/metro_api_station_of_route_responses.go b/rail/v2/client/metro/metro_api_station_of_route_responses.go
index 3884dc3e..d1439868 100644
--- a/rail/v2/client/metro/metro_api_station_of_route_responses.go
+++ b/rail/v2/client/metro/metro_api_station_of_route_responses.go
@@ -31,7 +31,7 @@ func (o *MetroAPIStationOfRouteReader) ReadResponse(response runtime.ClientRespo
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/rail/v2/client/metro/metro_api_station_responses.go b/rail/v2/client/metro/metro_api_station_responses.go
index 5ea52778..fc9f52fa 100644
--- a/rail/v2/client/metro/metro_api_station_responses.go
+++ b/rail/v2/client/metro/metro_api_station_responses.go
@@ -31,7 +31,7 @@ func (o *MetroAPIStationReader) ReadResponse(response runtime.ClientResponse, co
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/rail/v2/client/metro/metro_api_station_time_table_responses.go b/rail/v2/client/metro/metro_api_station_time_table_responses.go
index 5061fbc3..4f34ba3c 100644
--- a/rail/v2/client/metro/metro_api_station_time_table_responses.go
+++ b/rail/v2/client/metro/metro_api_station_time_table_responses.go
@@ -31,7 +31,7 @@ func (o *MetroAPIStationTimeTableReader) ReadResponse(response runtime.ClientRes
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/rail/v2/client/rail_basic/rail_api_operator_responses.go b/rail/v2/client/rail_basic/rail_api_operator_responses.go
index bf433861..16c6de0b 100644
--- a/rail/v2/client/rail_basic/rail_api_operator_responses.go
+++ b/rail/v2/client/rail_basic/rail_api_operator_responses.go
@@ -31,7 +31,7 @@ func (o *RailAPIOperatorReader) ReadResponse(response runtime.ClientResponse, co
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/rail/v2/client/t_h_s_r/t_h_s_r_api_alert_info_responses.go b/rail/v2/client/t_h_s_r/t_h_s_r_api_alert_info_responses.go
index d9c1a66d..9700e534 100644
--- a/rail/v2/client/t_h_s_r/t_h_s_r_api_alert_info_responses.go
+++ b/rail/v2/client/t_h_s_r/t_h_s_r_api_alert_info_responses.go
@@ -31,7 +31,7 @@ func (o *THSRAPIAlertInfoReader) ReadResponse(response runtime.ClientResponse, c
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/rail/v2/client/t_h_s_r/t_h_s_r_api_available_seat_status1_parameters.go b/rail/v2/client/t_h_s_r/t_h_s_r_api_available_seat_status1_parameters.go
new file mode 100644
index 00000000..dbfa0945
--- /dev/null
+++ b/rail/v2/client/t_h_s_r/t_h_s_r_api_available_seat_status1_parameters.go
@@ -0,0 +1,365 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+package t_h_s_r
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "context"
+ "net/http"
+ "time"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/strfmt"
+ "github.com/go-openapi/swag"
+)
+
+// NewTHSRAPIAvailableSeatStatus1Params creates a new THSRAPIAvailableSeatStatus1Params object
+// with the default values initialized.
+func NewTHSRAPIAvailableSeatStatus1Params() *THSRAPIAvailableSeatStatus1Params {
+ var (
+ dollarTopDefault = int64(30)
+ )
+ return &THSRAPIAvailableSeatStatus1Params{
+ DollarTop: &dollarTopDefault,
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewTHSRAPIAvailableSeatStatus1ParamsWithTimeout creates a new THSRAPIAvailableSeatStatus1Params object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewTHSRAPIAvailableSeatStatus1ParamsWithTimeout(timeout time.Duration) *THSRAPIAvailableSeatStatus1Params {
+ var (
+ dollarTopDefault = int64(30)
+ )
+ return &THSRAPIAvailableSeatStatus1Params{
+ DollarTop: &dollarTopDefault,
+
+ timeout: timeout,
+ }
+}
+
+// NewTHSRAPIAvailableSeatStatus1ParamsWithContext creates a new THSRAPIAvailableSeatStatus1Params object
+// with the default values initialized, and the ability to set a context for a request
+func NewTHSRAPIAvailableSeatStatus1ParamsWithContext(ctx context.Context) *THSRAPIAvailableSeatStatus1Params {
+ var (
+ dollarTopDefault = int64(30)
+ )
+ return &THSRAPIAvailableSeatStatus1Params{
+ DollarTop: &dollarTopDefault,
+
+ Context: ctx,
+ }
+}
+
+// NewTHSRAPIAvailableSeatStatus1ParamsWithHTTPClient creates a new THSRAPIAvailableSeatStatus1Params object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewTHSRAPIAvailableSeatStatus1ParamsWithHTTPClient(client *http.Client) *THSRAPIAvailableSeatStatus1Params {
+ var (
+ dollarTopDefault = int64(30)
+ )
+ return &THSRAPIAvailableSeatStatus1Params{
+ DollarTop: &dollarTopDefault,
+ HTTPClient: client,
+ }
+}
+
+/*THSRAPIAvailableSeatStatus1Params contains all the parameters to send to the API endpoint
+for the t h s r Api available seat status 1 operation typically these are written to a http.Request
+*/
+type THSRAPIAvailableSeatStatus1Params struct {
+
+ /*DollarCount
+ 查詢數量
+
+ */
+ DollarCount *string
+ /*DollarFilter
+ 過濾
+
+ */
+ DollarFilter *string
+ /*DollarFormat
+ 指定來源格式
+
+ */
+ DollarFormat string
+ /*DollarOrderby
+ 排序
+
+ */
+ DollarOrderby *string
+ /*DollarSelect
+ 挑選
+
+ */
+ DollarSelect *string
+ /*DollarSkip
+ 跳過前幾筆
+
+ */
+ DollarSkip *string
+ /*DollarTop
+ 取前幾筆
+
+ */
+ DollarTop *int64
+ /*TrainDate
+ 欲查詢車次的日期(格式: yyyy-MM-dd)
+
+ */
+ TrainDate string
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the t h s r Api available seat status 1 params
+func (o *THSRAPIAvailableSeatStatus1Params) WithTimeout(timeout time.Duration) *THSRAPIAvailableSeatStatus1Params {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the t h s r Api available seat status 1 params
+func (o *THSRAPIAvailableSeatStatus1Params) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the t h s r Api available seat status 1 params
+func (o *THSRAPIAvailableSeatStatus1Params) WithContext(ctx context.Context) *THSRAPIAvailableSeatStatus1Params {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the t h s r Api available seat status 1 params
+func (o *THSRAPIAvailableSeatStatus1Params) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the t h s r Api available seat status 1 params
+func (o *THSRAPIAvailableSeatStatus1Params) WithHTTPClient(client *http.Client) *THSRAPIAvailableSeatStatus1Params {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the t h s r Api available seat status 1 params
+func (o *THSRAPIAvailableSeatStatus1Params) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithDollarCount adds the dollarCount to the t h s r Api available seat status 1 params
+func (o *THSRAPIAvailableSeatStatus1Params) WithDollarCount(dollarCount *string) *THSRAPIAvailableSeatStatus1Params {
+ o.SetDollarCount(dollarCount)
+ return o
+}
+
+// SetDollarCount adds the dollarCount to the t h s r Api available seat status 1 params
+func (o *THSRAPIAvailableSeatStatus1Params) SetDollarCount(dollarCount *string) {
+ o.DollarCount = dollarCount
+}
+
+// WithDollarFilter adds the dollarFilter to the t h s r Api available seat status 1 params
+func (o *THSRAPIAvailableSeatStatus1Params) WithDollarFilter(dollarFilter *string) *THSRAPIAvailableSeatStatus1Params {
+ o.SetDollarFilter(dollarFilter)
+ return o
+}
+
+// SetDollarFilter adds the dollarFilter to the t h s r Api available seat status 1 params
+func (o *THSRAPIAvailableSeatStatus1Params) SetDollarFilter(dollarFilter *string) {
+ o.DollarFilter = dollarFilter
+}
+
+// WithDollarFormat adds the dollarFormat to the t h s r Api available seat status 1 params
+func (o *THSRAPIAvailableSeatStatus1Params) WithDollarFormat(dollarFormat string) *THSRAPIAvailableSeatStatus1Params {
+ o.SetDollarFormat(dollarFormat)
+ return o
+}
+
+// SetDollarFormat adds the dollarFormat to the t h s r Api available seat status 1 params
+func (o *THSRAPIAvailableSeatStatus1Params) SetDollarFormat(dollarFormat string) {
+ o.DollarFormat = dollarFormat
+}
+
+// WithDollarOrderby adds the dollarOrderby to the t h s r Api available seat status 1 params
+func (o *THSRAPIAvailableSeatStatus1Params) WithDollarOrderby(dollarOrderby *string) *THSRAPIAvailableSeatStatus1Params {
+ o.SetDollarOrderby(dollarOrderby)
+ return o
+}
+
+// SetDollarOrderby adds the dollarOrderby to the t h s r Api available seat status 1 params
+func (o *THSRAPIAvailableSeatStatus1Params) SetDollarOrderby(dollarOrderby *string) {
+ o.DollarOrderby = dollarOrderby
+}
+
+// WithDollarSelect adds the dollarSelect to the t h s r Api available seat status 1 params
+func (o *THSRAPIAvailableSeatStatus1Params) WithDollarSelect(dollarSelect *string) *THSRAPIAvailableSeatStatus1Params {
+ o.SetDollarSelect(dollarSelect)
+ return o
+}
+
+// SetDollarSelect adds the dollarSelect to the t h s r Api available seat status 1 params
+func (o *THSRAPIAvailableSeatStatus1Params) SetDollarSelect(dollarSelect *string) {
+ o.DollarSelect = dollarSelect
+}
+
+// WithDollarSkip adds the dollarSkip to the t h s r Api available seat status 1 params
+func (o *THSRAPIAvailableSeatStatus1Params) WithDollarSkip(dollarSkip *string) *THSRAPIAvailableSeatStatus1Params {
+ o.SetDollarSkip(dollarSkip)
+ return o
+}
+
+// SetDollarSkip adds the dollarSkip to the t h s r Api available seat status 1 params
+func (o *THSRAPIAvailableSeatStatus1Params) SetDollarSkip(dollarSkip *string) {
+ o.DollarSkip = dollarSkip
+}
+
+// WithDollarTop adds the dollarTop to the t h s r Api available seat status 1 params
+func (o *THSRAPIAvailableSeatStatus1Params) WithDollarTop(dollarTop *int64) *THSRAPIAvailableSeatStatus1Params {
+ o.SetDollarTop(dollarTop)
+ return o
+}
+
+// SetDollarTop adds the dollarTop to the t h s r Api available seat status 1 params
+func (o *THSRAPIAvailableSeatStatus1Params) SetDollarTop(dollarTop *int64) {
+ o.DollarTop = dollarTop
+}
+
+// WithTrainDate adds the trainDate to the t h s r Api available seat status 1 params
+func (o *THSRAPIAvailableSeatStatus1Params) WithTrainDate(trainDate string) *THSRAPIAvailableSeatStatus1Params {
+ o.SetTrainDate(trainDate)
+ return o
+}
+
+// SetTrainDate adds the trainDate to the t h s r Api available seat status 1 params
+func (o *THSRAPIAvailableSeatStatus1Params) SetTrainDate(trainDate string) {
+ o.TrainDate = trainDate
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *THSRAPIAvailableSeatStatus1Params) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.DollarCount != nil {
+
+ // query param $count
+ var qrDollarCount string
+ if o.DollarCount != nil {
+ qrDollarCount = *o.DollarCount
+ }
+ qDollarCount := qrDollarCount
+ if qDollarCount != "" {
+ if err := r.SetQueryParam("$count", qDollarCount); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.DollarFilter != nil {
+
+ // query param $filter
+ var qrDollarFilter string
+ if o.DollarFilter != nil {
+ qrDollarFilter = *o.DollarFilter
+ }
+ qDollarFilter := qrDollarFilter
+ if qDollarFilter != "" {
+ if err := r.SetQueryParam("$filter", qDollarFilter); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ // query param $format
+ qrDollarFormat := o.DollarFormat
+ qDollarFormat := qrDollarFormat
+ if qDollarFormat != "" {
+ if err := r.SetQueryParam("$format", qDollarFormat); err != nil {
+ return err
+ }
+ }
+
+ if o.DollarOrderby != nil {
+
+ // query param $orderby
+ var qrDollarOrderby string
+ if o.DollarOrderby != nil {
+ qrDollarOrderby = *o.DollarOrderby
+ }
+ qDollarOrderby := qrDollarOrderby
+ if qDollarOrderby != "" {
+ if err := r.SetQueryParam("$orderby", qDollarOrderby); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.DollarSelect != nil {
+
+ // query param $select
+ var qrDollarSelect string
+ if o.DollarSelect != nil {
+ qrDollarSelect = *o.DollarSelect
+ }
+ qDollarSelect := qrDollarSelect
+ if qDollarSelect != "" {
+ if err := r.SetQueryParam("$select", qDollarSelect); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.DollarSkip != nil {
+
+ // query param $skip
+ var qrDollarSkip string
+ if o.DollarSkip != nil {
+ qrDollarSkip = *o.DollarSkip
+ }
+ qDollarSkip := qrDollarSkip
+ if qDollarSkip != "" {
+ if err := r.SetQueryParam("$skip", qDollarSkip); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.DollarTop != nil {
+
+ // query param $top
+ var qrDollarTop int64
+ if o.DollarTop != nil {
+ qrDollarTop = *o.DollarTop
+ }
+ qDollarTop := swag.FormatInt64(qrDollarTop)
+ if qDollarTop != "" {
+ if err := r.SetQueryParam("$top", qDollarTop); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ // path param TrainDate
+ if err := r.SetPathParam("TrainDate", o.TrainDate); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/rail/v2/client/t_h_s_r/t_h_s_r_api_available_seat_status1_responses.go b/rail/v2/client/t_h_s_r/t_h_s_r_api_available_seat_status1_responses.go
new file mode 100644
index 00000000..78f38873
--- /dev/null
+++ b/rail/v2/client/t_h_s_r/t_h_s_r_api_available_seat_status1_responses.go
@@ -0,0 +1,69 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+package t_h_s_r
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+ "github.com/go-openapi/strfmt"
+
+ "github.com/minchao/go-ptx/rail/v2/models"
+)
+
+// THSRAPIAvailableSeatStatus1Reader is a Reader for the THSRAPIAvailableSeatStatus1 structure.
+type THSRAPIAvailableSeatStatus1Reader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *THSRAPIAvailableSeatStatus1Reader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+ case 200:
+ result := NewTHSRAPIAvailableSeatStatus1OK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
+ }
+}
+
+// NewTHSRAPIAvailableSeatStatus1OK creates a THSRAPIAvailableSeatStatus1OK with default headers values
+func NewTHSRAPIAvailableSeatStatus1OK() *THSRAPIAvailableSeatStatus1OK {
+ return &THSRAPIAvailableSeatStatus1OK{}
+}
+
+/*THSRAPIAvailableSeatStatus1OK handles this case with default header values.
+
+OK
+*/
+type THSRAPIAvailableSeatStatus1OK struct {
+ Payload *models.MOTCAPIRailModelsV2THSRAvaliableSeatStatusWrapperServiceDTOVersion2RailTHSRAvailableSeat
+}
+
+func (o *THSRAPIAvailableSeatStatus1OK) Error() string {
+ return fmt.Sprintf("[GET /v2/Rail/THSR/AvailableSeatStatus/Train/Leg/TrainDate/{TrainDate}][%d] tHSRApiAvailableSeatStatus1OK %+v", 200, o.Payload)
+}
+
+func (o *THSRAPIAvailableSeatStatus1OK) GetPayload() *models.MOTCAPIRailModelsV2THSRAvaliableSeatStatusWrapperServiceDTOVersion2RailTHSRAvailableSeat {
+ return o.Payload
+}
+
+func (o *THSRAPIAvailableSeatStatus1OK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.MOTCAPIRailModelsV2THSRAvaliableSeatStatusWrapperServiceDTOVersion2RailTHSRAvailableSeat)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/rail/v2/client/t_h_s_r/t_h_s_r_api_available_seat_status_list1_responses.go b/rail/v2/client/t_h_s_r/t_h_s_r_api_available_seat_status_list1_responses.go
deleted file mode 100644
index 6af96bef..00000000
--- a/rail/v2/client/t_h_s_r/t_h_s_r_api_available_seat_status_list1_responses.go
+++ /dev/null
@@ -1,69 +0,0 @@
-// Code generated by go-swagger; DO NOT EDIT.
-
-package t_h_s_r
-
-// This file was generated by the swagger tool.
-// Editing this file might prove futile when you re-run the swagger generate command
-
-import (
- "fmt"
- "io"
-
- "github.com/go-openapi/runtime"
- "github.com/go-openapi/strfmt"
-
- "github.com/minchao/go-ptx/rail/v2/models"
-)
-
-// THSRAPIAvailableSeatStatusList1Reader is a Reader for the THSRAPIAvailableSeatStatusList1 structure.
-type THSRAPIAvailableSeatStatusList1Reader struct {
- formats strfmt.Registry
-}
-
-// ReadResponse reads a server response into the received o.
-func (o *THSRAPIAvailableSeatStatusList1Reader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
- switch response.Code() {
- case 200:
- result := NewTHSRAPIAvailableSeatStatusList1OK()
- if err := result.readResponse(response, consumer, o.formats); err != nil {
- return nil, err
- }
- return result, nil
-
- default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
- }
-}
-
-// NewTHSRAPIAvailableSeatStatusList1OK creates a THSRAPIAvailableSeatStatusList1OK with default headers values
-func NewTHSRAPIAvailableSeatStatusList1OK() *THSRAPIAvailableSeatStatusList1OK {
- return &THSRAPIAvailableSeatStatusList1OK{}
-}
-
-/*THSRAPIAvailableSeatStatusList1OK handles this case with default header values.
-
-OK
-*/
-type THSRAPIAvailableSeatStatusList1OK struct {
- Payload *models.MOTCAPIRailModelsV2THSRAvaliableSeatStatusWrapperServiceDTOVersion2RailTHSRAvailableSeat
-}
-
-func (o *THSRAPIAvailableSeatStatusList1OK) Error() string {
- return fmt.Sprintf("[GET /v2/Rail/THSR/AvailableSeatStatusList/{StationID}][%d] tHSRApiAvailableSeatStatusList1OK %+v", 200, o.Payload)
-}
-
-func (o *THSRAPIAvailableSeatStatusList1OK) GetPayload() *models.MOTCAPIRailModelsV2THSRAvaliableSeatStatusWrapperServiceDTOVersion2RailTHSRAvailableSeat {
- return o.Payload
-}
-
-func (o *THSRAPIAvailableSeatStatusList1OK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
-
- o.Payload = new(models.MOTCAPIRailModelsV2THSRAvaliableSeatStatusWrapperServiceDTOVersion2RailTHSRAvailableSeat)
-
- // response payload
- if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
- return err
- }
-
- return nil
-}
diff --git a/rail/v2/client/t_h_s_r/t_h_s_r_api_available_seat_status_list_responses.go b/rail/v2/client/t_h_s_r/t_h_s_r_api_available_seat_status_list_responses.go
deleted file mode 100644
index e6eb19a5..00000000
--- a/rail/v2/client/t_h_s_r/t_h_s_r_api_available_seat_status_list_responses.go
+++ /dev/null
@@ -1,69 +0,0 @@
-// Code generated by go-swagger; DO NOT EDIT.
-
-package t_h_s_r
-
-// This file was generated by the swagger tool.
-// Editing this file might prove futile when you re-run the swagger generate command
-
-import (
- "fmt"
- "io"
-
- "github.com/go-openapi/runtime"
- "github.com/go-openapi/strfmt"
-
- "github.com/minchao/go-ptx/rail/v2/models"
-)
-
-// THSRAPIAvailableSeatStatusListReader is a Reader for the THSRAPIAvailableSeatStatusList structure.
-type THSRAPIAvailableSeatStatusListReader struct {
- formats strfmt.Registry
-}
-
-// ReadResponse reads a server response into the received o.
-func (o *THSRAPIAvailableSeatStatusListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
- switch response.Code() {
- case 200:
- result := NewTHSRAPIAvailableSeatStatusListOK()
- if err := result.readResponse(response, consumer, o.formats); err != nil {
- return nil, err
- }
- return result, nil
-
- default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
- }
-}
-
-// NewTHSRAPIAvailableSeatStatusListOK creates a THSRAPIAvailableSeatStatusListOK with default headers values
-func NewTHSRAPIAvailableSeatStatusListOK() *THSRAPIAvailableSeatStatusListOK {
- return &THSRAPIAvailableSeatStatusListOK{}
-}
-
-/*THSRAPIAvailableSeatStatusListOK handles this case with default header values.
-
-OK
-*/
-type THSRAPIAvailableSeatStatusListOK struct {
- Payload *models.MOTCAPIRailModelsV2THSRAvaliableSeatStatusWrapperServiceDTOVersion2RailTHSRAvailableSeat
-}
-
-func (o *THSRAPIAvailableSeatStatusListOK) Error() string {
- return fmt.Sprintf("[GET /v2/Rail/THSR/AvailableSeatStatusList][%d] tHSRApiAvailableSeatStatusListOK %+v", 200, o.Payload)
-}
-
-func (o *THSRAPIAvailableSeatStatusListOK) GetPayload() *models.MOTCAPIRailModelsV2THSRAvaliableSeatStatusWrapperServiceDTOVersion2RailTHSRAvailableSeat {
- return o.Payload
-}
-
-func (o *THSRAPIAvailableSeatStatusListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
-
- o.Payload = new(models.MOTCAPIRailModelsV2THSRAvaliableSeatStatusWrapperServiceDTOVersion2RailTHSRAvailableSeat)
-
- // response payload
- if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
- return err
- }
-
- return nil
-}
diff --git a/rail/v2/client/t_h_s_r/t_h_s_r_api_available_seat_status_list1_parameters.go b/rail/v2/client/t_h_s_r/t_h_s_r_api_available_seat_status_list_station1_parameters.go
similarity index 55%
rename from rail/v2/client/t_h_s_r/t_h_s_r_api_available_seat_status_list1_parameters.go
rename to rail/v2/client/t_h_s_r/t_h_s_r_api_available_seat_status_list_station1_parameters.go
index 421fb897..69c2da7d 100644
--- a/rail/v2/client/t_h_s_r/t_h_s_r_api_available_seat_status_list1_parameters.go
+++ b/rail/v2/client/t_h_s_r/t_h_s_r_api_available_seat_status_list_station1_parameters.go
@@ -17,61 +17,61 @@ import (
"github.com/go-openapi/swag"
)
-// NewTHSRAPIAvailableSeatStatusList1Params creates a new THSRAPIAvailableSeatStatusList1Params object
+// NewTHSRAPIAvailableSeatStatusListStation1Params creates a new THSRAPIAvailableSeatStatusListStation1Params object
// with the default values initialized.
-func NewTHSRAPIAvailableSeatStatusList1Params() *THSRAPIAvailableSeatStatusList1Params {
+func NewTHSRAPIAvailableSeatStatusListStation1Params() *THSRAPIAvailableSeatStatusListStation1Params {
var (
dollarTopDefault = int64(30)
)
- return &THSRAPIAvailableSeatStatusList1Params{
+ return &THSRAPIAvailableSeatStatusListStation1Params{
DollarTop: &dollarTopDefault,
timeout: cr.DefaultTimeout,
}
}
-// NewTHSRAPIAvailableSeatStatusList1ParamsWithTimeout creates a new THSRAPIAvailableSeatStatusList1Params object
+// NewTHSRAPIAvailableSeatStatusListStation1ParamsWithTimeout creates a new THSRAPIAvailableSeatStatusListStation1Params object
// with the default values initialized, and the ability to set a timeout on a request
-func NewTHSRAPIAvailableSeatStatusList1ParamsWithTimeout(timeout time.Duration) *THSRAPIAvailableSeatStatusList1Params {
+func NewTHSRAPIAvailableSeatStatusListStation1ParamsWithTimeout(timeout time.Duration) *THSRAPIAvailableSeatStatusListStation1Params {
var (
dollarTopDefault = int64(30)
)
- return &THSRAPIAvailableSeatStatusList1Params{
+ return &THSRAPIAvailableSeatStatusListStation1Params{
DollarTop: &dollarTopDefault,
timeout: timeout,
}
}
-// NewTHSRAPIAvailableSeatStatusList1ParamsWithContext creates a new THSRAPIAvailableSeatStatusList1Params object
+// NewTHSRAPIAvailableSeatStatusListStation1ParamsWithContext creates a new THSRAPIAvailableSeatStatusListStation1Params object
// with the default values initialized, and the ability to set a context for a request
-func NewTHSRAPIAvailableSeatStatusList1ParamsWithContext(ctx context.Context) *THSRAPIAvailableSeatStatusList1Params {
+func NewTHSRAPIAvailableSeatStatusListStation1ParamsWithContext(ctx context.Context) *THSRAPIAvailableSeatStatusListStation1Params {
var (
dollarTopDefault = int64(30)
)
- return &THSRAPIAvailableSeatStatusList1Params{
+ return &THSRAPIAvailableSeatStatusListStation1Params{
DollarTop: &dollarTopDefault,
Context: ctx,
}
}
-// NewTHSRAPIAvailableSeatStatusList1ParamsWithHTTPClient creates a new THSRAPIAvailableSeatStatusList1Params object
+// NewTHSRAPIAvailableSeatStatusListStation1ParamsWithHTTPClient creates a new THSRAPIAvailableSeatStatusListStation1Params object
// with the default values initialized, and the ability to set a custom HTTPClient for a request
-func NewTHSRAPIAvailableSeatStatusList1ParamsWithHTTPClient(client *http.Client) *THSRAPIAvailableSeatStatusList1Params {
+func NewTHSRAPIAvailableSeatStatusListStation1ParamsWithHTTPClient(client *http.Client) *THSRAPIAvailableSeatStatusListStation1Params {
var (
dollarTopDefault = int64(30)
)
- return &THSRAPIAvailableSeatStatusList1Params{
+ return &THSRAPIAvailableSeatStatusListStation1Params{
DollarTop: &dollarTopDefault,
HTTPClient: client,
}
}
-/*THSRAPIAvailableSeatStatusList1Params contains all the parameters to send to the API endpoint
-for the t h s r Api available seat status list 1 operation typically these are written to a http.Request
+/*THSRAPIAvailableSeatStatusListStation1Params contains all the parameters to send to the API endpoint
+for the t h s r Api available seat status list station 1 operation typically these are written to a http.Request
*/
-type THSRAPIAvailableSeatStatusList1Params struct {
+type THSRAPIAvailableSeatStatusListStation1Params struct {
/*DollarCount
查詢數量
@@ -119,129 +119,129 @@ type THSRAPIAvailableSeatStatusList1Params struct {
HTTPClient *http.Client
}
-// WithTimeout adds the timeout to the t h s r Api available seat status list 1 params
-func (o *THSRAPIAvailableSeatStatusList1Params) WithTimeout(timeout time.Duration) *THSRAPIAvailableSeatStatusList1Params {
+// WithTimeout adds the timeout to the t h s r Api available seat status list station 1 params
+func (o *THSRAPIAvailableSeatStatusListStation1Params) WithTimeout(timeout time.Duration) *THSRAPIAvailableSeatStatusListStation1Params {
o.SetTimeout(timeout)
return o
}
-// SetTimeout adds the timeout to the t h s r Api available seat status list 1 params
-func (o *THSRAPIAvailableSeatStatusList1Params) SetTimeout(timeout time.Duration) {
+// SetTimeout adds the timeout to the t h s r Api available seat status list station 1 params
+func (o *THSRAPIAvailableSeatStatusListStation1Params) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
-// WithContext adds the context to the t h s r Api available seat status list 1 params
-func (o *THSRAPIAvailableSeatStatusList1Params) WithContext(ctx context.Context) *THSRAPIAvailableSeatStatusList1Params {
+// WithContext adds the context to the t h s r Api available seat status list station 1 params
+func (o *THSRAPIAvailableSeatStatusListStation1Params) WithContext(ctx context.Context) *THSRAPIAvailableSeatStatusListStation1Params {
o.SetContext(ctx)
return o
}
-// SetContext adds the context to the t h s r Api available seat status list 1 params
-func (o *THSRAPIAvailableSeatStatusList1Params) SetContext(ctx context.Context) {
+// SetContext adds the context to the t h s r Api available seat status list station 1 params
+func (o *THSRAPIAvailableSeatStatusListStation1Params) SetContext(ctx context.Context) {
o.Context = ctx
}
-// WithHTTPClient adds the HTTPClient to the t h s r Api available seat status list 1 params
-func (o *THSRAPIAvailableSeatStatusList1Params) WithHTTPClient(client *http.Client) *THSRAPIAvailableSeatStatusList1Params {
+// WithHTTPClient adds the HTTPClient to the t h s r Api available seat status list station 1 params
+func (o *THSRAPIAvailableSeatStatusListStation1Params) WithHTTPClient(client *http.Client) *THSRAPIAvailableSeatStatusListStation1Params {
o.SetHTTPClient(client)
return o
}
-// SetHTTPClient adds the HTTPClient to the t h s r Api available seat status list 1 params
-func (o *THSRAPIAvailableSeatStatusList1Params) SetHTTPClient(client *http.Client) {
+// SetHTTPClient adds the HTTPClient to the t h s r Api available seat status list station 1 params
+func (o *THSRAPIAvailableSeatStatusListStation1Params) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
-// WithDollarCount adds the dollarCount to the t h s r Api available seat status list 1 params
-func (o *THSRAPIAvailableSeatStatusList1Params) WithDollarCount(dollarCount *string) *THSRAPIAvailableSeatStatusList1Params {
+// WithDollarCount adds the dollarCount to the t h s r Api available seat status list station 1 params
+func (o *THSRAPIAvailableSeatStatusListStation1Params) WithDollarCount(dollarCount *string) *THSRAPIAvailableSeatStatusListStation1Params {
o.SetDollarCount(dollarCount)
return o
}
-// SetDollarCount adds the dollarCount to the t h s r Api available seat status list 1 params
-func (o *THSRAPIAvailableSeatStatusList1Params) SetDollarCount(dollarCount *string) {
+// SetDollarCount adds the dollarCount to the t h s r Api available seat status list station 1 params
+func (o *THSRAPIAvailableSeatStatusListStation1Params) SetDollarCount(dollarCount *string) {
o.DollarCount = dollarCount
}
-// WithDollarFilter adds the dollarFilter to the t h s r Api available seat status list 1 params
-func (o *THSRAPIAvailableSeatStatusList1Params) WithDollarFilter(dollarFilter *string) *THSRAPIAvailableSeatStatusList1Params {
+// WithDollarFilter adds the dollarFilter to the t h s r Api available seat status list station 1 params
+func (o *THSRAPIAvailableSeatStatusListStation1Params) WithDollarFilter(dollarFilter *string) *THSRAPIAvailableSeatStatusListStation1Params {
o.SetDollarFilter(dollarFilter)
return o
}
-// SetDollarFilter adds the dollarFilter to the t h s r Api available seat status list 1 params
-func (o *THSRAPIAvailableSeatStatusList1Params) SetDollarFilter(dollarFilter *string) {
+// SetDollarFilter adds the dollarFilter to the t h s r Api available seat status list station 1 params
+func (o *THSRAPIAvailableSeatStatusListStation1Params) SetDollarFilter(dollarFilter *string) {
o.DollarFilter = dollarFilter
}
-// WithDollarFormat adds the dollarFormat to the t h s r Api available seat status list 1 params
-func (o *THSRAPIAvailableSeatStatusList1Params) WithDollarFormat(dollarFormat string) *THSRAPIAvailableSeatStatusList1Params {
+// WithDollarFormat adds the dollarFormat to the t h s r Api available seat status list station 1 params
+func (o *THSRAPIAvailableSeatStatusListStation1Params) WithDollarFormat(dollarFormat string) *THSRAPIAvailableSeatStatusListStation1Params {
o.SetDollarFormat(dollarFormat)
return o
}
-// SetDollarFormat adds the dollarFormat to the t h s r Api available seat status list 1 params
-func (o *THSRAPIAvailableSeatStatusList1Params) SetDollarFormat(dollarFormat string) {
+// SetDollarFormat adds the dollarFormat to the t h s r Api available seat status list station 1 params
+func (o *THSRAPIAvailableSeatStatusListStation1Params) SetDollarFormat(dollarFormat string) {
o.DollarFormat = dollarFormat
}
-// WithDollarOrderby adds the dollarOrderby to the t h s r Api available seat status list 1 params
-func (o *THSRAPIAvailableSeatStatusList1Params) WithDollarOrderby(dollarOrderby *string) *THSRAPIAvailableSeatStatusList1Params {
+// WithDollarOrderby adds the dollarOrderby to the t h s r Api available seat status list station 1 params
+func (o *THSRAPIAvailableSeatStatusListStation1Params) WithDollarOrderby(dollarOrderby *string) *THSRAPIAvailableSeatStatusListStation1Params {
o.SetDollarOrderby(dollarOrderby)
return o
}
-// SetDollarOrderby adds the dollarOrderby to the t h s r Api available seat status list 1 params
-func (o *THSRAPIAvailableSeatStatusList1Params) SetDollarOrderby(dollarOrderby *string) {
+// SetDollarOrderby adds the dollarOrderby to the t h s r Api available seat status list station 1 params
+func (o *THSRAPIAvailableSeatStatusListStation1Params) SetDollarOrderby(dollarOrderby *string) {
o.DollarOrderby = dollarOrderby
}
-// WithDollarSelect adds the dollarSelect to the t h s r Api available seat status list 1 params
-func (o *THSRAPIAvailableSeatStatusList1Params) WithDollarSelect(dollarSelect *string) *THSRAPIAvailableSeatStatusList1Params {
+// WithDollarSelect adds the dollarSelect to the t h s r Api available seat status list station 1 params
+func (o *THSRAPIAvailableSeatStatusListStation1Params) WithDollarSelect(dollarSelect *string) *THSRAPIAvailableSeatStatusListStation1Params {
o.SetDollarSelect(dollarSelect)
return o
}
-// SetDollarSelect adds the dollarSelect to the t h s r Api available seat status list 1 params
-func (o *THSRAPIAvailableSeatStatusList1Params) SetDollarSelect(dollarSelect *string) {
+// SetDollarSelect adds the dollarSelect to the t h s r Api available seat status list station 1 params
+func (o *THSRAPIAvailableSeatStatusListStation1Params) SetDollarSelect(dollarSelect *string) {
o.DollarSelect = dollarSelect
}
-// WithDollarSkip adds the dollarSkip to the t h s r Api available seat status list 1 params
-func (o *THSRAPIAvailableSeatStatusList1Params) WithDollarSkip(dollarSkip *string) *THSRAPIAvailableSeatStatusList1Params {
+// WithDollarSkip adds the dollarSkip to the t h s r Api available seat status list station 1 params
+func (o *THSRAPIAvailableSeatStatusListStation1Params) WithDollarSkip(dollarSkip *string) *THSRAPIAvailableSeatStatusListStation1Params {
o.SetDollarSkip(dollarSkip)
return o
}
-// SetDollarSkip adds the dollarSkip to the t h s r Api available seat status list 1 params
-func (o *THSRAPIAvailableSeatStatusList1Params) SetDollarSkip(dollarSkip *string) {
+// SetDollarSkip adds the dollarSkip to the t h s r Api available seat status list station 1 params
+func (o *THSRAPIAvailableSeatStatusListStation1Params) SetDollarSkip(dollarSkip *string) {
o.DollarSkip = dollarSkip
}
-// WithDollarTop adds the dollarTop to the t h s r Api available seat status list 1 params
-func (o *THSRAPIAvailableSeatStatusList1Params) WithDollarTop(dollarTop *int64) *THSRAPIAvailableSeatStatusList1Params {
+// WithDollarTop adds the dollarTop to the t h s r Api available seat status list station 1 params
+func (o *THSRAPIAvailableSeatStatusListStation1Params) WithDollarTop(dollarTop *int64) *THSRAPIAvailableSeatStatusListStation1Params {
o.SetDollarTop(dollarTop)
return o
}
-// SetDollarTop adds the dollarTop to the t h s r Api available seat status list 1 params
-func (o *THSRAPIAvailableSeatStatusList1Params) SetDollarTop(dollarTop *int64) {
+// SetDollarTop adds the dollarTop to the t h s r Api available seat status list station 1 params
+func (o *THSRAPIAvailableSeatStatusListStation1Params) SetDollarTop(dollarTop *int64) {
o.DollarTop = dollarTop
}
-// WithStationID adds the stationID to the t h s r Api available seat status list 1 params
-func (o *THSRAPIAvailableSeatStatusList1Params) WithStationID(stationID string) *THSRAPIAvailableSeatStatusList1Params {
+// WithStationID adds the stationID to the t h s r Api available seat status list station 1 params
+func (o *THSRAPIAvailableSeatStatusListStation1Params) WithStationID(stationID string) *THSRAPIAvailableSeatStatusListStation1Params {
o.SetStationID(stationID)
return o
}
-// SetStationID adds the stationId to the t h s r Api available seat status list 1 params
-func (o *THSRAPIAvailableSeatStatusList1Params) SetStationID(stationID string) {
+// SetStationID adds the stationId to the t h s r Api available seat status list station 1 params
+func (o *THSRAPIAvailableSeatStatusListStation1Params) SetStationID(stationID string) {
o.StationID = stationID
}
// WriteToRequest writes these params to a swagger request
-func (o *THSRAPIAvailableSeatStatusList1Params) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+func (o *THSRAPIAvailableSeatStatusListStation1Params) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
diff --git a/rail/v2/client/t_h_s_r/t_h_s_r_api_available_seat_status_list_station1_responses.go b/rail/v2/client/t_h_s_r/t_h_s_r_api_available_seat_status_list_station1_responses.go
new file mode 100644
index 00000000..3f1d0fd1
--- /dev/null
+++ b/rail/v2/client/t_h_s_r/t_h_s_r_api_available_seat_status_list_station1_responses.go
@@ -0,0 +1,69 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+package t_h_s_r
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+ "github.com/go-openapi/strfmt"
+
+ "github.com/minchao/go-ptx/rail/v2/models"
+)
+
+// THSRAPIAvailableSeatStatusListStation1Reader is a Reader for the THSRAPIAvailableSeatStatusListStation1 structure.
+type THSRAPIAvailableSeatStatusListStation1Reader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *THSRAPIAvailableSeatStatusListStation1Reader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+ case 200:
+ result := NewTHSRAPIAvailableSeatStatusListStation1OK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
+ }
+}
+
+// NewTHSRAPIAvailableSeatStatusListStation1OK creates a THSRAPIAvailableSeatStatusListStation1OK with default headers values
+func NewTHSRAPIAvailableSeatStatusListStation1OK() *THSRAPIAvailableSeatStatusListStation1OK {
+ return &THSRAPIAvailableSeatStatusListStation1OK{}
+}
+
+/*THSRAPIAvailableSeatStatusListStation1OK handles this case with default header values.
+
+OK
+*/
+type THSRAPIAvailableSeatStatusListStation1OK struct {
+ Payload *models.MOTCAPIRailModelsV2THSRAvaliableSeatStatusOldWrapperServiceDTOVersion2RailTHSROldAvailableSeat
+}
+
+func (o *THSRAPIAvailableSeatStatusListStation1OK) Error() string {
+ return fmt.Sprintf("[GET /v2/Rail/THSR/AvailableSeatStatusList/{StationID}][%d] tHSRApiAvailableSeatStatusListStation1OK %+v", 200, o.Payload)
+}
+
+func (o *THSRAPIAvailableSeatStatusListStation1OK) GetPayload() *models.MOTCAPIRailModelsV2THSRAvaliableSeatStatusOldWrapperServiceDTOVersion2RailTHSROldAvailableSeat {
+ return o.Payload
+}
+
+func (o *THSRAPIAvailableSeatStatusListStation1OK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.MOTCAPIRailModelsV2THSRAvaliableSeatStatusOldWrapperServiceDTOVersion2RailTHSROldAvailableSeat)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/rail/v2/client/t_h_s_r/t_h_s_r_api_available_seat_status_list_station_parameters.go b/rail/v2/client/t_h_s_r/t_h_s_r_api_available_seat_status_list_station_parameters.go
new file mode 100644
index 00000000..904f9371
--- /dev/null
+++ b/rail/v2/client/t_h_s_r/t_h_s_r_api_available_seat_status_list_station_parameters.go
@@ -0,0 +1,344 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+package t_h_s_r
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "context"
+ "net/http"
+ "time"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/strfmt"
+ "github.com/go-openapi/swag"
+)
+
+// NewTHSRAPIAvailableSeatStatusListStationParams creates a new THSRAPIAvailableSeatStatusListStationParams object
+// with the default values initialized.
+func NewTHSRAPIAvailableSeatStatusListStationParams() *THSRAPIAvailableSeatStatusListStationParams {
+ var (
+ dollarTopDefault = int64(30)
+ )
+ return &THSRAPIAvailableSeatStatusListStationParams{
+ DollarTop: &dollarTopDefault,
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewTHSRAPIAvailableSeatStatusListStationParamsWithTimeout creates a new THSRAPIAvailableSeatStatusListStationParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewTHSRAPIAvailableSeatStatusListStationParamsWithTimeout(timeout time.Duration) *THSRAPIAvailableSeatStatusListStationParams {
+ var (
+ dollarTopDefault = int64(30)
+ )
+ return &THSRAPIAvailableSeatStatusListStationParams{
+ DollarTop: &dollarTopDefault,
+
+ timeout: timeout,
+ }
+}
+
+// NewTHSRAPIAvailableSeatStatusListStationParamsWithContext creates a new THSRAPIAvailableSeatStatusListStationParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewTHSRAPIAvailableSeatStatusListStationParamsWithContext(ctx context.Context) *THSRAPIAvailableSeatStatusListStationParams {
+ var (
+ dollarTopDefault = int64(30)
+ )
+ return &THSRAPIAvailableSeatStatusListStationParams{
+ DollarTop: &dollarTopDefault,
+
+ Context: ctx,
+ }
+}
+
+// NewTHSRAPIAvailableSeatStatusListStationParamsWithHTTPClient creates a new THSRAPIAvailableSeatStatusListStationParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewTHSRAPIAvailableSeatStatusListStationParamsWithHTTPClient(client *http.Client) *THSRAPIAvailableSeatStatusListStationParams {
+ var (
+ dollarTopDefault = int64(30)
+ )
+ return &THSRAPIAvailableSeatStatusListStationParams{
+ DollarTop: &dollarTopDefault,
+ HTTPClient: client,
+ }
+}
+
+/*THSRAPIAvailableSeatStatusListStationParams contains all the parameters to send to the API endpoint
+for the t h s r Api available seat status list station operation typically these are written to a http.Request
+*/
+type THSRAPIAvailableSeatStatusListStationParams struct {
+
+ /*DollarCount
+ 查詢數量
+
+ */
+ DollarCount *string
+ /*DollarFilter
+ 過濾
+
+ */
+ DollarFilter *string
+ /*DollarFormat
+ 指定來源格式
+
+ */
+ DollarFormat string
+ /*DollarOrderby
+ 排序
+
+ */
+ DollarOrderby *string
+ /*DollarSelect
+ 挑選
+
+ */
+ DollarSelect *string
+ /*DollarSkip
+ 跳過前幾筆
+
+ */
+ DollarSkip *string
+ /*DollarTop
+ 取前幾筆
+
+ */
+ DollarTop *int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the t h s r Api available seat status list station params
+func (o *THSRAPIAvailableSeatStatusListStationParams) WithTimeout(timeout time.Duration) *THSRAPIAvailableSeatStatusListStationParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the t h s r Api available seat status list station params
+func (o *THSRAPIAvailableSeatStatusListStationParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the t h s r Api available seat status list station params
+func (o *THSRAPIAvailableSeatStatusListStationParams) WithContext(ctx context.Context) *THSRAPIAvailableSeatStatusListStationParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the t h s r Api available seat status list station params
+func (o *THSRAPIAvailableSeatStatusListStationParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the t h s r Api available seat status list station params
+func (o *THSRAPIAvailableSeatStatusListStationParams) WithHTTPClient(client *http.Client) *THSRAPIAvailableSeatStatusListStationParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the t h s r Api available seat status list station params
+func (o *THSRAPIAvailableSeatStatusListStationParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithDollarCount adds the dollarCount to the t h s r Api available seat status list station params
+func (o *THSRAPIAvailableSeatStatusListStationParams) WithDollarCount(dollarCount *string) *THSRAPIAvailableSeatStatusListStationParams {
+ o.SetDollarCount(dollarCount)
+ return o
+}
+
+// SetDollarCount adds the dollarCount to the t h s r Api available seat status list station params
+func (o *THSRAPIAvailableSeatStatusListStationParams) SetDollarCount(dollarCount *string) {
+ o.DollarCount = dollarCount
+}
+
+// WithDollarFilter adds the dollarFilter to the t h s r Api available seat status list station params
+func (o *THSRAPIAvailableSeatStatusListStationParams) WithDollarFilter(dollarFilter *string) *THSRAPIAvailableSeatStatusListStationParams {
+ o.SetDollarFilter(dollarFilter)
+ return o
+}
+
+// SetDollarFilter adds the dollarFilter to the t h s r Api available seat status list station params
+func (o *THSRAPIAvailableSeatStatusListStationParams) SetDollarFilter(dollarFilter *string) {
+ o.DollarFilter = dollarFilter
+}
+
+// WithDollarFormat adds the dollarFormat to the t h s r Api available seat status list station params
+func (o *THSRAPIAvailableSeatStatusListStationParams) WithDollarFormat(dollarFormat string) *THSRAPIAvailableSeatStatusListStationParams {
+ o.SetDollarFormat(dollarFormat)
+ return o
+}
+
+// SetDollarFormat adds the dollarFormat to the t h s r Api available seat status list station params
+func (o *THSRAPIAvailableSeatStatusListStationParams) SetDollarFormat(dollarFormat string) {
+ o.DollarFormat = dollarFormat
+}
+
+// WithDollarOrderby adds the dollarOrderby to the t h s r Api available seat status list station params
+func (o *THSRAPIAvailableSeatStatusListStationParams) WithDollarOrderby(dollarOrderby *string) *THSRAPIAvailableSeatStatusListStationParams {
+ o.SetDollarOrderby(dollarOrderby)
+ return o
+}
+
+// SetDollarOrderby adds the dollarOrderby to the t h s r Api available seat status list station params
+func (o *THSRAPIAvailableSeatStatusListStationParams) SetDollarOrderby(dollarOrderby *string) {
+ o.DollarOrderby = dollarOrderby
+}
+
+// WithDollarSelect adds the dollarSelect to the t h s r Api available seat status list station params
+func (o *THSRAPIAvailableSeatStatusListStationParams) WithDollarSelect(dollarSelect *string) *THSRAPIAvailableSeatStatusListStationParams {
+ o.SetDollarSelect(dollarSelect)
+ return o
+}
+
+// SetDollarSelect adds the dollarSelect to the t h s r Api available seat status list station params
+func (o *THSRAPIAvailableSeatStatusListStationParams) SetDollarSelect(dollarSelect *string) {
+ o.DollarSelect = dollarSelect
+}
+
+// WithDollarSkip adds the dollarSkip to the t h s r Api available seat status list station params
+func (o *THSRAPIAvailableSeatStatusListStationParams) WithDollarSkip(dollarSkip *string) *THSRAPIAvailableSeatStatusListStationParams {
+ o.SetDollarSkip(dollarSkip)
+ return o
+}
+
+// SetDollarSkip adds the dollarSkip to the t h s r Api available seat status list station params
+func (o *THSRAPIAvailableSeatStatusListStationParams) SetDollarSkip(dollarSkip *string) {
+ o.DollarSkip = dollarSkip
+}
+
+// WithDollarTop adds the dollarTop to the t h s r Api available seat status list station params
+func (o *THSRAPIAvailableSeatStatusListStationParams) WithDollarTop(dollarTop *int64) *THSRAPIAvailableSeatStatusListStationParams {
+ o.SetDollarTop(dollarTop)
+ return o
+}
+
+// SetDollarTop adds the dollarTop to the t h s r Api available seat status list station params
+func (o *THSRAPIAvailableSeatStatusListStationParams) SetDollarTop(dollarTop *int64) {
+ o.DollarTop = dollarTop
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *THSRAPIAvailableSeatStatusListStationParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.DollarCount != nil {
+
+ // query param $count
+ var qrDollarCount string
+ if o.DollarCount != nil {
+ qrDollarCount = *o.DollarCount
+ }
+ qDollarCount := qrDollarCount
+ if qDollarCount != "" {
+ if err := r.SetQueryParam("$count", qDollarCount); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.DollarFilter != nil {
+
+ // query param $filter
+ var qrDollarFilter string
+ if o.DollarFilter != nil {
+ qrDollarFilter = *o.DollarFilter
+ }
+ qDollarFilter := qrDollarFilter
+ if qDollarFilter != "" {
+ if err := r.SetQueryParam("$filter", qDollarFilter); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ // query param $format
+ qrDollarFormat := o.DollarFormat
+ qDollarFormat := qrDollarFormat
+ if qDollarFormat != "" {
+ if err := r.SetQueryParam("$format", qDollarFormat); err != nil {
+ return err
+ }
+ }
+
+ if o.DollarOrderby != nil {
+
+ // query param $orderby
+ var qrDollarOrderby string
+ if o.DollarOrderby != nil {
+ qrDollarOrderby = *o.DollarOrderby
+ }
+ qDollarOrderby := qrDollarOrderby
+ if qDollarOrderby != "" {
+ if err := r.SetQueryParam("$orderby", qDollarOrderby); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.DollarSelect != nil {
+
+ // query param $select
+ var qrDollarSelect string
+ if o.DollarSelect != nil {
+ qrDollarSelect = *o.DollarSelect
+ }
+ qDollarSelect := qrDollarSelect
+ if qDollarSelect != "" {
+ if err := r.SetQueryParam("$select", qDollarSelect); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.DollarSkip != nil {
+
+ // query param $skip
+ var qrDollarSkip string
+ if o.DollarSkip != nil {
+ qrDollarSkip = *o.DollarSkip
+ }
+ qDollarSkip := qrDollarSkip
+ if qDollarSkip != "" {
+ if err := r.SetQueryParam("$skip", qDollarSkip); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.DollarTop != nil {
+
+ // query param $top
+ var qrDollarTop int64
+ if o.DollarTop != nil {
+ qrDollarTop = *o.DollarTop
+ }
+ qDollarTop := swag.FormatInt64(qrDollarTop)
+ if qDollarTop != "" {
+ if err := r.SetQueryParam("$top", qDollarTop); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/rail/v2/client/t_h_s_r/t_h_s_r_api_available_seat_status_list_station_responses.go b/rail/v2/client/t_h_s_r/t_h_s_r_api_available_seat_status_list_station_responses.go
new file mode 100644
index 00000000..6e67bfe4
--- /dev/null
+++ b/rail/v2/client/t_h_s_r/t_h_s_r_api_available_seat_status_list_station_responses.go
@@ -0,0 +1,69 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+package t_h_s_r
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+ "github.com/go-openapi/strfmt"
+
+ "github.com/minchao/go-ptx/rail/v2/models"
+)
+
+// THSRAPIAvailableSeatStatusListStationReader is a Reader for the THSRAPIAvailableSeatStatusListStation structure.
+type THSRAPIAvailableSeatStatusListStationReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *THSRAPIAvailableSeatStatusListStationReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+ case 200:
+ result := NewTHSRAPIAvailableSeatStatusListStationOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
+ }
+}
+
+// NewTHSRAPIAvailableSeatStatusListStationOK creates a THSRAPIAvailableSeatStatusListStationOK with default headers values
+func NewTHSRAPIAvailableSeatStatusListStationOK() *THSRAPIAvailableSeatStatusListStationOK {
+ return &THSRAPIAvailableSeatStatusListStationOK{}
+}
+
+/*THSRAPIAvailableSeatStatusListStationOK handles this case with default header values.
+
+OK
+*/
+type THSRAPIAvailableSeatStatusListStationOK struct {
+ Payload *models.MOTCAPIRailModelsV2THSRAvaliableSeatStatusOldWrapperServiceDTOVersion2RailTHSROldAvailableSeat
+}
+
+func (o *THSRAPIAvailableSeatStatusListStationOK) Error() string {
+ return fmt.Sprintf("[GET /v2/Rail/THSR/AvailableSeatStatusList][%d] tHSRApiAvailableSeatStatusListStationOK %+v", 200, o.Payload)
+}
+
+func (o *THSRAPIAvailableSeatStatusListStationOK) GetPayload() *models.MOTCAPIRailModelsV2THSRAvaliableSeatStatusOldWrapperServiceDTOVersion2RailTHSROldAvailableSeat {
+ return o.Payload
+}
+
+func (o *THSRAPIAvailableSeatStatusListStationOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.MOTCAPIRailModelsV2THSRAvaliableSeatStatusOldWrapperServiceDTOVersion2RailTHSROldAvailableSeat)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/rail/v2/client/t_h_s_r/t_h_s_r_api_available_seat_status_list_parameters.go b/rail/v2/client/t_h_s_r/t_h_s_r_api_available_seat_status_parameters.go
similarity index 59%
rename from rail/v2/client/t_h_s_r/t_h_s_r_api_available_seat_status_list_parameters.go
rename to rail/v2/client/t_h_s_r/t_h_s_r_api_available_seat_status_parameters.go
index 34e1cc58..52a3cf81 100644
--- a/rail/v2/client/t_h_s_r/t_h_s_r_api_available_seat_status_list_parameters.go
+++ b/rail/v2/client/t_h_s_r/t_h_s_r_api_available_seat_status_parameters.go
@@ -17,61 +17,61 @@ import (
"github.com/go-openapi/swag"
)
-// NewTHSRAPIAvailableSeatStatusListParams creates a new THSRAPIAvailableSeatStatusListParams object
+// NewTHSRAPIAvailableSeatStatusParams creates a new THSRAPIAvailableSeatStatusParams object
// with the default values initialized.
-func NewTHSRAPIAvailableSeatStatusListParams() *THSRAPIAvailableSeatStatusListParams {
+func NewTHSRAPIAvailableSeatStatusParams() *THSRAPIAvailableSeatStatusParams {
var (
dollarTopDefault = int64(30)
)
- return &THSRAPIAvailableSeatStatusListParams{
+ return &THSRAPIAvailableSeatStatusParams{
DollarTop: &dollarTopDefault,
timeout: cr.DefaultTimeout,
}
}
-// NewTHSRAPIAvailableSeatStatusListParamsWithTimeout creates a new THSRAPIAvailableSeatStatusListParams object
+// NewTHSRAPIAvailableSeatStatusParamsWithTimeout creates a new THSRAPIAvailableSeatStatusParams object
// with the default values initialized, and the ability to set a timeout on a request
-func NewTHSRAPIAvailableSeatStatusListParamsWithTimeout(timeout time.Duration) *THSRAPIAvailableSeatStatusListParams {
+func NewTHSRAPIAvailableSeatStatusParamsWithTimeout(timeout time.Duration) *THSRAPIAvailableSeatStatusParams {
var (
dollarTopDefault = int64(30)
)
- return &THSRAPIAvailableSeatStatusListParams{
+ return &THSRAPIAvailableSeatStatusParams{
DollarTop: &dollarTopDefault,
timeout: timeout,
}
}
-// NewTHSRAPIAvailableSeatStatusListParamsWithContext creates a new THSRAPIAvailableSeatStatusListParams object
+// NewTHSRAPIAvailableSeatStatusParamsWithContext creates a new THSRAPIAvailableSeatStatusParams object
// with the default values initialized, and the ability to set a context for a request
-func NewTHSRAPIAvailableSeatStatusListParamsWithContext(ctx context.Context) *THSRAPIAvailableSeatStatusListParams {
+func NewTHSRAPIAvailableSeatStatusParamsWithContext(ctx context.Context) *THSRAPIAvailableSeatStatusParams {
var (
dollarTopDefault = int64(30)
)
- return &THSRAPIAvailableSeatStatusListParams{
+ return &THSRAPIAvailableSeatStatusParams{
DollarTop: &dollarTopDefault,
Context: ctx,
}
}
-// NewTHSRAPIAvailableSeatStatusListParamsWithHTTPClient creates a new THSRAPIAvailableSeatStatusListParams object
+// NewTHSRAPIAvailableSeatStatusParamsWithHTTPClient creates a new THSRAPIAvailableSeatStatusParams object
// with the default values initialized, and the ability to set a custom HTTPClient for a request
-func NewTHSRAPIAvailableSeatStatusListParamsWithHTTPClient(client *http.Client) *THSRAPIAvailableSeatStatusListParams {
+func NewTHSRAPIAvailableSeatStatusParamsWithHTTPClient(client *http.Client) *THSRAPIAvailableSeatStatusParams {
var (
dollarTopDefault = int64(30)
)
- return &THSRAPIAvailableSeatStatusListParams{
+ return &THSRAPIAvailableSeatStatusParams{
DollarTop: &dollarTopDefault,
HTTPClient: client,
}
}
-/*THSRAPIAvailableSeatStatusListParams contains all the parameters to send to the API endpoint
-for the t h s r Api available seat status list operation typically these are written to a http.Request
+/*THSRAPIAvailableSeatStatusParams contains all the parameters to send to the API endpoint
+for the t h s r Api available seat status operation typically these are written to a http.Request
*/
-type THSRAPIAvailableSeatStatusListParams struct {
+type THSRAPIAvailableSeatStatusParams struct {
/*DollarCount
查詢數量
@@ -114,118 +114,118 @@ type THSRAPIAvailableSeatStatusListParams struct {
HTTPClient *http.Client
}
-// WithTimeout adds the timeout to the t h s r Api available seat status list params
-func (o *THSRAPIAvailableSeatStatusListParams) WithTimeout(timeout time.Duration) *THSRAPIAvailableSeatStatusListParams {
+// WithTimeout adds the timeout to the t h s r Api available seat status params
+func (o *THSRAPIAvailableSeatStatusParams) WithTimeout(timeout time.Duration) *THSRAPIAvailableSeatStatusParams {
o.SetTimeout(timeout)
return o
}
-// SetTimeout adds the timeout to the t h s r Api available seat status list params
-func (o *THSRAPIAvailableSeatStatusListParams) SetTimeout(timeout time.Duration) {
+// SetTimeout adds the timeout to the t h s r Api available seat status params
+func (o *THSRAPIAvailableSeatStatusParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
-// WithContext adds the context to the t h s r Api available seat status list params
-func (o *THSRAPIAvailableSeatStatusListParams) WithContext(ctx context.Context) *THSRAPIAvailableSeatStatusListParams {
+// WithContext adds the context to the t h s r Api available seat status params
+func (o *THSRAPIAvailableSeatStatusParams) WithContext(ctx context.Context) *THSRAPIAvailableSeatStatusParams {
o.SetContext(ctx)
return o
}
-// SetContext adds the context to the t h s r Api available seat status list params
-func (o *THSRAPIAvailableSeatStatusListParams) SetContext(ctx context.Context) {
+// SetContext adds the context to the t h s r Api available seat status params
+func (o *THSRAPIAvailableSeatStatusParams) SetContext(ctx context.Context) {
o.Context = ctx
}
-// WithHTTPClient adds the HTTPClient to the t h s r Api available seat status list params
-func (o *THSRAPIAvailableSeatStatusListParams) WithHTTPClient(client *http.Client) *THSRAPIAvailableSeatStatusListParams {
+// WithHTTPClient adds the HTTPClient to the t h s r Api available seat status params
+func (o *THSRAPIAvailableSeatStatusParams) WithHTTPClient(client *http.Client) *THSRAPIAvailableSeatStatusParams {
o.SetHTTPClient(client)
return o
}
-// SetHTTPClient adds the HTTPClient to the t h s r Api available seat status list params
-func (o *THSRAPIAvailableSeatStatusListParams) SetHTTPClient(client *http.Client) {
+// SetHTTPClient adds the HTTPClient to the t h s r Api available seat status params
+func (o *THSRAPIAvailableSeatStatusParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
-// WithDollarCount adds the dollarCount to the t h s r Api available seat status list params
-func (o *THSRAPIAvailableSeatStatusListParams) WithDollarCount(dollarCount *string) *THSRAPIAvailableSeatStatusListParams {
+// WithDollarCount adds the dollarCount to the t h s r Api available seat status params
+func (o *THSRAPIAvailableSeatStatusParams) WithDollarCount(dollarCount *string) *THSRAPIAvailableSeatStatusParams {
o.SetDollarCount(dollarCount)
return o
}
-// SetDollarCount adds the dollarCount to the t h s r Api available seat status list params
-func (o *THSRAPIAvailableSeatStatusListParams) SetDollarCount(dollarCount *string) {
+// SetDollarCount adds the dollarCount to the t h s r Api available seat status params
+func (o *THSRAPIAvailableSeatStatusParams) SetDollarCount(dollarCount *string) {
o.DollarCount = dollarCount
}
-// WithDollarFilter adds the dollarFilter to the t h s r Api available seat status list params
-func (o *THSRAPIAvailableSeatStatusListParams) WithDollarFilter(dollarFilter *string) *THSRAPIAvailableSeatStatusListParams {
+// WithDollarFilter adds the dollarFilter to the t h s r Api available seat status params
+func (o *THSRAPIAvailableSeatStatusParams) WithDollarFilter(dollarFilter *string) *THSRAPIAvailableSeatStatusParams {
o.SetDollarFilter(dollarFilter)
return o
}
-// SetDollarFilter adds the dollarFilter to the t h s r Api available seat status list params
-func (o *THSRAPIAvailableSeatStatusListParams) SetDollarFilter(dollarFilter *string) {
+// SetDollarFilter adds the dollarFilter to the t h s r Api available seat status params
+func (o *THSRAPIAvailableSeatStatusParams) SetDollarFilter(dollarFilter *string) {
o.DollarFilter = dollarFilter
}
-// WithDollarFormat adds the dollarFormat to the t h s r Api available seat status list params
-func (o *THSRAPIAvailableSeatStatusListParams) WithDollarFormat(dollarFormat string) *THSRAPIAvailableSeatStatusListParams {
+// WithDollarFormat adds the dollarFormat to the t h s r Api available seat status params
+func (o *THSRAPIAvailableSeatStatusParams) WithDollarFormat(dollarFormat string) *THSRAPIAvailableSeatStatusParams {
o.SetDollarFormat(dollarFormat)
return o
}
-// SetDollarFormat adds the dollarFormat to the t h s r Api available seat status list params
-func (o *THSRAPIAvailableSeatStatusListParams) SetDollarFormat(dollarFormat string) {
+// SetDollarFormat adds the dollarFormat to the t h s r Api available seat status params
+func (o *THSRAPIAvailableSeatStatusParams) SetDollarFormat(dollarFormat string) {
o.DollarFormat = dollarFormat
}
-// WithDollarOrderby adds the dollarOrderby to the t h s r Api available seat status list params
-func (o *THSRAPIAvailableSeatStatusListParams) WithDollarOrderby(dollarOrderby *string) *THSRAPIAvailableSeatStatusListParams {
+// WithDollarOrderby adds the dollarOrderby to the t h s r Api available seat status params
+func (o *THSRAPIAvailableSeatStatusParams) WithDollarOrderby(dollarOrderby *string) *THSRAPIAvailableSeatStatusParams {
o.SetDollarOrderby(dollarOrderby)
return o
}
-// SetDollarOrderby adds the dollarOrderby to the t h s r Api available seat status list params
-func (o *THSRAPIAvailableSeatStatusListParams) SetDollarOrderby(dollarOrderby *string) {
+// SetDollarOrderby adds the dollarOrderby to the t h s r Api available seat status params
+func (o *THSRAPIAvailableSeatStatusParams) SetDollarOrderby(dollarOrderby *string) {
o.DollarOrderby = dollarOrderby
}
-// WithDollarSelect adds the dollarSelect to the t h s r Api available seat status list params
-func (o *THSRAPIAvailableSeatStatusListParams) WithDollarSelect(dollarSelect *string) *THSRAPIAvailableSeatStatusListParams {
+// WithDollarSelect adds the dollarSelect to the t h s r Api available seat status params
+func (o *THSRAPIAvailableSeatStatusParams) WithDollarSelect(dollarSelect *string) *THSRAPIAvailableSeatStatusParams {
o.SetDollarSelect(dollarSelect)
return o
}
-// SetDollarSelect adds the dollarSelect to the t h s r Api available seat status list params
-func (o *THSRAPIAvailableSeatStatusListParams) SetDollarSelect(dollarSelect *string) {
+// SetDollarSelect adds the dollarSelect to the t h s r Api available seat status params
+func (o *THSRAPIAvailableSeatStatusParams) SetDollarSelect(dollarSelect *string) {
o.DollarSelect = dollarSelect
}
-// WithDollarSkip adds the dollarSkip to the t h s r Api available seat status list params
-func (o *THSRAPIAvailableSeatStatusListParams) WithDollarSkip(dollarSkip *string) *THSRAPIAvailableSeatStatusListParams {
+// WithDollarSkip adds the dollarSkip to the t h s r Api available seat status params
+func (o *THSRAPIAvailableSeatStatusParams) WithDollarSkip(dollarSkip *string) *THSRAPIAvailableSeatStatusParams {
o.SetDollarSkip(dollarSkip)
return o
}
-// SetDollarSkip adds the dollarSkip to the t h s r Api available seat status list params
-func (o *THSRAPIAvailableSeatStatusListParams) SetDollarSkip(dollarSkip *string) {
+// SetDollarSkip adds the dollarSkip to the t h s r Api available seat status params
+func (o *THSRAPIAvailableSeatStatusParams) SetDollarSkip(dollarSkip *string) {
o.DollarSkip = dollarSkip
}
-// WithDollarTop adds the dollarTop to the t h s r Api available seat status list params
-func (o *THSRAPIAvailableSeatStatusListParams) WithDollarTop(dollarTop *int64) *THSRAPIAvailableSeatStatusListParams {
+// WithDollarTop adds the dollarTop to the t h s r Api available seat status params
+func (o *THSRAPIAvailableSeatStatusParams) WithDollarTop(dollarTop *int64) *THSRAPIAvailableSeatStatusParams {
o.SetDollarTop(dollarTop)
return o
}
-// SetDollarTop adds the dollarTop to the t h s r Api available seat status list params
-func (o *THSRAPIAvailableSeatStatusListParams) SetDollarTop(dollarTop *int64) {
+// SetDollarTop adds the dollarTop to the t h s r Api available seat status params
+func (o *THSRAPIAvailableSeatStatusParams) SetDollarTop(dollarTop *int64) {
o.DollarTop = dollarTop
}
// WriteToRequest writes these params to a swagger request
-func (o *THSRAPIAvailableSeatStatusListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+func (o *THSRAPIAvailableSeatStatusParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
diff --git a/rail/v2/client/t_h_s_r/t_h_s_r_api_available_seat_status_responses.go b/rail/v2/client/t_h_s_r/t_h_s_r_api_available_seat_status_responses.go
new file mode 100644
index 00000000..9eb3ac56
--- /dev/null
+++ b/rail/v2/client/t_h_s_r/t_h_s_r_api_available_seat_status_responses.go
@@ -0,0 +1,69 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+package t_h_s_r
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+ "github.com/go-openapi/strfmt"
+
+ "github.com/minchao/go-ptx/rail/v2/models"
+)
+
+// THSRAPIAvailableSeatStatusReader is a Reader for the THSRAPIAvailableSeatStatus structure.
+type THSRAPIAvailableSeatStatusReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *THSRAPIAvailableSeatStatusReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+ case 200:
+ result := NewTHSRAPIAvailableSeatStatusOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
+ }
+}
+
+// NewTHSRAPIAvailableSeatStatusOK creates a THSRAPIAvailableSeatStatusOK with default headers values
+func NewTHSRAPIAvailableSeatStatusOK() *THSRAPIAvailableSeatStatusOK {
+ return &THSRAPIAvailableSeatStatusOK{}
+}
+
+/*THSRAPIAvailableSeatStatusOK handles this case with default header values.
+
+OK
+*/
+type THSRAPIAvailableSeatStatusOK struct {
+ Payload *models.MOTCAPIRailModelsV2THSRAvaliableSeatStatusWrapperServiceDTOVersion2RailTHSRAvailableSeat
+}
+
+func (o *THSRAPIAvailableSeatStatusOK) Error() string {
+ return fmt.Sprintf("[GET /v2/Rail/THSR/AvailableSeatStatus/Train/Leg/Today][%d] tHSRApiAvailableSeatStatusOK %+v", 200, o.Payload)
+}
+
+func (o *THSRAPIAvailableSeatStatusOK) GetPayload() *models.MOTCAPIRailModelsV2THSRAvaliableSeatStatusWrapperServiceDTOVersion2RailTHSRAvailableSeat {
+ return o.Payload
+}
+
+func (o *THSRAPIAvailableSeatStatusOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.MOTCAPIRailModelsV2THSRAvaliableSeatStatusWrapperServiceDTOVersion2RailTHSRAvailableSeat)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/rail/v2/client/t_h_s_r/t_h_s_r_api_daily_timetable1_responses.go b/rail/v2/client/t_h_s_r/t_h_s_r_api_daily_timetable1_responses.go
index 9cf0968b..ff10f666 100644
--- a/rail/v2/client/t_h_s_r/t_h_s_r_api_daily_timetable1_responses.go
+++ b/rail/v2/client/t_h_s_r/t_h_s_r_api_daily_timetable1_responses.go
@@ -31,7 +31,7 @@ func (o *THSRAPIDailyTimetable1Reader) ReadResponse(response runtime.ClientRespo
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/rail/v2/client/t_h_s_r/t_h_s_r_api_daily_timetable2_responses.go b/rail/v2/client/t_h_s_r/t_h_s_r_api_daily_timetable2_responses.go
index 2b820b84..40fc41ed 100644
--- a/rail/v2/client/t_h_s_r/t_h_s_r_api_daily_timetable2_responses.go
+++ b/rail/v2/client/t_h_s_r/t_h_s_r_api_daily_timetable2_responses.go
@@ -31,7 +31,7 @@ func (o *THSRAPIDailyTimetable2Reader) ReadResponse(response runtime.ClientRespo
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/rail/v2/client/t_h_s_r/t_h_s_r_api_daily_timetable3_responses.go b/rail/v2/client/t_h_s_r/t_h_s_r_api_daily_timetable3_responses.go
index 16ddc359..648426f9 100644
--- a/rail/v2/client/t_h_s_r/t_h_s_r_api_daily_timetable3_responses.go
+++ b/rail/v2/client/t_h_s_r/t_h_s_r_api_daily_timetable3_responses.go
@@ -31,7 +31,7 @@ func (o *THSRAPIDailyTimetable3Reader) ReadResponse(response runtime.ClientRespo
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/rail/v2/client/t_h_s_r/t_h_s_r_api_daily_timetable_responses.go b/rail/v2/client/t_h_s_r/t_h_s_r_api_daily_timetable_responses.go
index 67ee229d..cc32313d 100644
--- a/rail/v2/client/t_h_s_r/t_h_s_r_api_daily_timetable_responses.go
+++ b/rail/v2/client/t_h_s_r/t_h_s_r_api_daily_timetable_responses.go
@@ -31,7 +31,7 @@ func (o *THSRAPIDailyTimetableReader) ReadResponse(response runtime.ClientRespon
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/rail/v2/client/t_h_s_r/t_h_s_r_api_daily_train_info1_responses.go b/rail/v2/client/t_h_s_r/t_h_s_r_api_daily_train_info1_responses.go
index 0d202b3e..1852b83e 100644
--- a/rail/v2/client/t_h_s_r/t_h_s_r_api_daily_train_info1_responses.go
+++ b/rail/v2/client/t_h_s_r/t_h_s_r_api_daily_train_info1_responses.go
@@ -31,7 +31,7 @@ func (o *THSRAPIDailyTrainInfo1Reader) ReadResponse(response runtime.ClientRespo
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/rail/v2/client/t_h_s_r/t_h_s_r_api_daily_train_info2_responses.go b/rail/v2/client/t_h_s_r/t_h_s_r_api_daily_train_info2_responses.go
index 13b89aba..68b43345 100644
--- a/rail/v2/client/t_h_s_r/t_h_s_r_api_daily_train_info2_responses.go
+++ b/rail/v2/client/t_h_s_r/t_h_s_r_api_daily_train_info2_responses.go
@@ -31,7 +31,7 @@ func (o *THSRAPIDailyTrainInfo2Reader) ReadResponse(response runtime.ClientRespo
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/rail/v2/client/t_h_s_r/t_h_s_r_api_daily_train_info3_responses.go b/rail/v2/client/t_h_s_r/t_h_s_r_api_daily_train_info3_responses.go
index 57bf811e..bd9c2d7d 100644
--- a/rail/v2/client/t_h_s_r/t_h_s_r_api_daily_train_info3_responses.go
+++ b/rail/v2/client/t_h_s_r/t_h_s_r_api_daily_train_info3_responses.go
@@ -31,7 +31,7 @@ func (o *THSRAPIDailyTrainInfo3Reader) ReadResponse(response runtime.ClientRespo
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/rail/v2/client/t_h_s_r/t_h_s_r_api_daily_train_info_responses.go b/rail/v2/client/t_h_s_r/t_h_s_r_api_daily_train_info_responses.go
index 5ea86009..e85e2d65 100644
--- a/rail/v2/client/t_h_s_r/t_h_s_r_api_daily_train_info_responses.go
+++ b/rail/v2/client/t_h_s_r/t_h_s_r_api_daily_train_info_responses.go
@@ -31,7 +31,7 @@ func (o *THSRAPIDailyTrainInfoReader) ReadResponse(response runtime.ClientRespon
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/rail/v2/client/t_h_s_r/t_h_s_r_api_general_timetable1_responses.go b/rail/v2/client/t_h_s_r/t_h_s_r_api_general_timetable1_responses.go
index 97c919ba..14708244 100644
--- a/rail/v2/client/t_h_s_r/t_h_s_r_api_general_timetable1_responses.go
+++ b/rail/v2/client/t_h_s_r/t_h_s_r_api_general_timetable1_responses.go
@@ -31,7 +31,7 @@ func (o *THSRAPIGeneralTimetable1Reader) ReadResponse(response runtime.ClientRes
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/rail/v2/client/t_h_s_r/t_h_s_r_api_general_timetable_responses.go b/rail/v2/client/t_h_s_r/t_h_s_r_api_general_timetable_responses.go
index b52ca5fc..2e263997 100644
--- a/rail/v2/client/t_h_s_r/t_h_s_r_api_general_timetable_responses.go
+++ b/rail/v2/client/t_h_s_r/t_h_s_r_api_general_timetable_responses.go
@@ -31,7 +31,7 @@ func (o *THSRAPIGeneralTimetableReader) ReadResponse(response runtime.ClientResp
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/rail/v2/client/t_h_s_r/t_h_s_r_api_news_responses.go b/rail/v2/client/t_h_s_r/t_h_s_r_api_news_responses.go
index 9df74654..22b12c6a 100644
--- a/rail/v2/client/t_h_s_r/t_h_s_r_api_news_responses.go
+++ b/rail/v2/client/t_h_s_r/t_h_s_r_api_news_responses.go
@@ -31,7 +31,7 @@ func (o *THSRAPINewsReader) ReadResponse(response runtime.ClientResponse, consum
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/rail/v2/client/t_h_s_r/t_h_s_r_api_o_d_daily_timetable_responses.go b/rail/v2/client/t_h_s_r/t_h_s_r_api_o_d_daily_timetable_responses.go
index ca4f129b..e060cca2 100644
--- a/rail/v2/client/t_h_s_r/t_h_s_r_api_o_d_daily_timetable_responses.go
+++ b/rail/v2/client/t_h_s_r/t_h_s_r_api_o_d_daily_timetable_responses.go
@@ -31,7 +31,7 @@ func (o *THSRAPIODDailyTimetableReader) ReadResponse(response runtime.ClientResp
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/rail/v2/client/t_h_s_r/t_h_s_r_api_o_d_fare1_responses.go b/rail/v2/client/t_h_s_r/t_h_s_r_api_o_d_fare1_responses.go
index 09757524..46fb84fc 100644
--- a/rail/v2/client/t_h_s_r/t_h_s_r_api_o_d_fare1_responses.go
+++ b/rail/v2/client/t_h_s_r/t_h_s_r_api_o_d_fare1_responses.go
@@ -31,7 +31,7 @@ func (o *THSRAPIODFare1Reader) ReadResponse(response runtime.ClientResponse, con
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/rail/v2/client/t_h_s_r/t_h_s_r_api_o_d_fare_responses.go b/rail/v2/client/t_h_s_r/t_h_s_r_api_o_d_fare_responses.go
index ec00fa43..24a23b3a 100644
--- a/rail/v2/client/t_h_s_r/t_h_s_r_api_o_d_fare_responses.go
+++ b/rail/v2/client/t_h_s_r/t_h_s_r_api_o_d_fare_responses.go
@@ -31,7 +31,7 @@ func (o *THSRAPIODFareReader) ReadResponse(response runtime.ClientResponse, cons
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/rail/v2/client/t_h_s_r/t_h_s_r_api_shape_responses.go b/rail/v2/client/t_h_s_r/t_h_s_r_api_shape_responses.go
index eba5209f..048e4362 100644
--- a/rail/v2/client/t_h_s_r/t_h_s_r_api_shape_responses.go
+++ b/rail/v2/client/t_h_s_r/t_h_s_r_api_shape_responses.go
@@ -31,7 +31,7 @@ func (o *THSRAPIShapeReader) ReadResponse(response runtime.ClientResponse, consu
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/rail/v2/client/t_h_s_r/t_h_s_r_api_station_exit_responses.go b/rail/v2/client/t_h_s_r/t_h_s_r_api_station_exit_responses.go
index a13e47cc..07428c2a 100644
--- a/rail/v2/client/t_h_s_r/t_h_s_r_api_station_exit_responses.go
+++ b/rail/v2/client/t_h_s_r/t_h_s_r_api_station_exit_responses.go
@@ -31,7 +31,7 @@ func (o *THSRAPIStationExitReader) ReadResponse(response runtime.ClientResponse,
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/rail/v2/client/t_h_s_r/t_h_s_r_api_station_responses.go b/rail/v2/client/t_h_s_r/t_h_s_r_api_station_responses.go
index 21132236..0499a235 100644
--- a/rail/v2/client/t_h_s_r/t_h_s_r_api_station_responses.go
+++ b/rail/v2/client/t_h_s_r/t_h_s_r_api_station_responses.go
@@ -31,7 +31,7 @@ func (o *THSRAPIStationReader) ReadResponse(response runtime.ClientResponse, con
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/rail/v2/client/t_h_s_r/t_h_s_r_api_station_timetable_responses.go b/rail/v2/client/t_h_s_r/t_h_s_r_api_station_timetable_responses.go
index 9e412424..5f999192 100644
--- a/rail/v2/client/t_h_s_r/t_h_s_r_api_station_timetable_responses.go
+++ b/rail/v2/client/t_h_s_r/t_h_s_r_api_station_timetable_responses.go
@@ -31,7 +31,7 @@ func (o *THSRAPIStationTimetableReader) ReadResponse(response runtime.ClientResp
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/rail/v2/client/t_h_s_r/thsr_client.go b/rail/v2/client/t_h_s_r/thsr_client.go
index b5e2433e..c5285780 100644
--- a/rail/v2/client/t_h_s_r/thsr_client.go
+++ b/rail/v2/client/t_h_s_r/thsr_client.go
@@ -29,9 +29,13 @@ type Client struct {
type ClientService interface {
THSRAPIAlertInfo(params *THSRAPIAlertInfoParams) (*THSRAPIAlertInfoOK, error)
- THSRAPIAvailableSeatStatusList(params *THSRAPIAvailableSeatStatusListParams) (*THSRAPIAvailableSeatStatusListOK, error)
+ THSRAPIAvailableSeatStatus(params *THSRAPIAvailableSeatStatusParams) (*THSRAPIAvailableSeatStatusOK, error)
- THSRAPIAvailableSeatStatusList1(params *THSRAPIAvailableSeatStatusList1Params) (*THSRAPIAvailableSeatStatusList1OK, error)
+ THSRAPIAvailableSeatStatusListStation(params *THSRAPIAvailableSeatStatusListStationParams) (*THSRAPIAvailableSeatStatusListStationOK, error)
+
+ THSRAPIAvailableSeatStatusListStation1(params *THSRAPIAvailableSeatStatusListStation1Params) (*THSRAPIAvailableSeatStatusListStation1OK, error)
+
+ THSRAPIAvailableSeatStatus1(params *THSRAPIAvailableSeatStatus1Params) (*THSRAPIAvailableSeatStatus1OK, error)
THSRAPIDailyTimetable(params *THSRAPIDailyTimetableParams) (*THSRAPIDailyTimetableOK, error)
@@ -109,74 +113,152 @@ func (a *Client) THSRAPIAlertInfo(params *THSRAPIAlertInfoParams) (*THSRAPIAlert
}
/*
- THSRAPIAvailableSeatStatusList 取得動態對號座剩餘座位資訊看板資料s
+ THSRAPIAvailableSeatStatus 開發用測試版s 取得當天對號座即時剩餘位資料 原始 列車區段 leg角度
+
+ 取得當天對號座即時剩餘位資料({原始}列車區段Leg角度)
+- 高鐵對號座即時剩餘位(列車區段Leg角度)之資料使用注意事項([連結](https://motc-ptx-api-documentation.gitbook.io/motc-ptx-api-documentation/api-zi-liao-shi-yong-zhu-yi-shi-xiang/rail))
+- 當日(D)之更新頻率為每10分鐘
+- **(本服務尚在測試中,穩定度及更新頻率將持續優化)**
+*/
+func (a *Client) THSRAPIAvailableSeatStatus(params *THSRAPIAvailableSeatStatusParams) (*THSRAPIAvailableSeatStatusOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewTHSRAPIAvailableSeatStatusParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "THSRApi_AvailableSeatStatus",
+ Method: "GET",
+ PathPattern: "/v2/Rail/THSR/AvailableSeatStatus/Train/Leg/Today",
+ ProducesMediaTypes: []string{"application/json", "text/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"https"},
+ Params: params,
+ Reader: &THSRAPIAvailableSeatStatusReader{formats: a.formats},
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ success, ok := result.(*THSRAPIAvailableSeatStatusOK)
+ if ok {
+ return success, nil
+ }
+ // unexpected success response
+ // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
+ msg := fmt.Sprintf("unexpected success response for THSRApi_AvailableSeatStatus: API contract not enforced by server. Client expected to get an error, but got: %T", result)
+ panic(msg)
+}
+
+/*
+ THSRAPIAvailableSeatStatusListStation 取得動態對號座剩餘座位資訊看板資料s
取得動態對號座剩餘座位資訊看板資料
*/
-func (a *Client) THSRAPIAvailableSeatStatusList(params *THSRAPIAvailableSeatStatusListParams) (*THSRAPIAvailableSeatStatusListOK, error) {
+func (a *Client) THSRAPIAvailableSeatStatusListStation(params *THSRAPIAvailableSeatStatusListStationParams) (*THSRAPIAvailableSeatStatusListStationOK, error) {
// TODO: Validate the params before sending
if params == nil {
- params = NewTHSRAPIAvailableSeatStatusListParams()
+ params = NewTHSRAPIAvailableSeatStatusListStationParams()
}
result, err := a.transport.Submit(&runtime.ClientOperation{
- ID: "THSRApi_AvailableSeatStatusList",
+ ID: "THSRApi_AvailableSeatStatusList_Station",
Method: "GET",
PathPattern: "/v2/Rail/THSR/AvailableSeatStatusList",
ProducesMediaTypes: []string{"application/json", "text/json"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"https"},
Params: params,
- Reader: &THSRAPIAvailableSeatStatusListReader{formats: a.formats},
+ Reader: &THSRAPIAvailableSeatStatusListStationReader{formats: a.formats},
Context: params.Context,
Client: params.HTTPClient,
})
if err != nil {
return nil, err
}
- success, ok := result.(*THSRAPIAvailableSeatStatusListOK)
+ success, ok := result.(*THSRAPIAvailableSeatStatusListStationOK)
if ok {
return success, nil
}
// unexpected success response
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
- msg := fmt.Sprintf("unexpected success response for THSRApi_AvailableSeatStatusList: API contract not enforced by server. Client expected to get an error, but got: %T", result)
+ msg := fmt.Sprintf("unexpected success response for THSRApi_AvailableSeatStatusList_Station: API contract not enforced by server. Client expected to get an error, but got: %T", result)
panic(msg)
}
/*
- THSRAPIAvailableSeatStatusList1 取得動態指定s 車站 的對號座剩餘座位資訊看板資料
+ THSRAPIAvailableSeatStatusListStation1 取得動態指定s 車站 的對號座剩餘座位資訊看板資料
取得動態指定[車站]的對號座剩餘座位資訊看板資料
*/
-func (a *Client) THSRAPIAvailableSeatStatusList1(params *THSRAPIAvailableSeatStatusList1Params) (*THSRAPIAvailableSeatStatusList1OK, error) {
+func (a *Client) THSRAPIAvailableSeatStatusListStation1(params *THSRAPIAvailableSeatStatusListStation1Params) (*THSRAPIAvailableSeatStatusListStation1OK, error) {
// TODO: Validate the params before sending
if params == nil {
- params = NewTHSRAPIAvailableSeatStatusList1Params()
+ params = NewTHSRAPIAvailableSeatStatusListStation1Params()
}
result, err := a.transport.Submit(&runtime.ClientOperation{
- ID: "THSRApi_AvailableSeatStatusList_1",
+ ID: "THSRApi_AvailableSeatStatusList_Station_1",
Method: "GET",
PathPattern: "/v2/Rail/THSR/AvailableSeatStatusList/{StationID}",
ProducesMediaTypes: []string{"application/json", "text/json"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"https"},
Params: params,
- Reader: &THSRAPIAvailableSeatStatusList1Reader{formats: a.formats},
+ Reader: &THSRAPIAvailableSeatStatusListStation1Reader{formats: a.formats},
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ success, ok := result.(*THSRAPIAvailableSeatStatusListStation1OK)
+ if ok {
+ return success, nil
+ }
+ // unexpected success response
+ // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
+ msg := fmt.Sprintf("unexpected success response for THSRApi_AvailableSeatStatusList_Station_1: API contract not enforced by server. Client expected to get an error, but got: %T", result)
+ panic(msg)
+}
+
+/*
+ THSRAPIAvailableSeatStatus1 開發用測試版s 取得指定 日期 對號座即時剩餘位資料 原始 列車區段 leg角度
+
+ 取得指定[日期]對號座即時剩餘位資料({原始}列車區段Leg角度)
+- 高鐵對號座即時剩餘位(列車區段Leg角度)之資料使用注意事項([連結](https://motc-ptx-api-documentation.gitbook.io/motc-ptx-api-documentation/api-zi-liao-shi-yong-zhu-yi-shi-xiang/rail))
+- 當日後27日(D+1~D+27)之更新頻率為每日的10、16、22時
+- **(本服務尚在測試中,穩定度及更新頻率將持續優化)**
+*/
+func (a *Client) THSRAPIAvailableSeatStatus1(params *THSRAPIAvailableSeatStatus1Params) (*THSRAPIAvailableSeatStatus1OK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewTHSRAPIAvailableSeatStatus1Params()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "THSRApi_AvailableSeatStatus_1",
+ Method: "GET",
+ PathPattern: "/v2/Rail/THSR/AvailableSeatStatus/Train/Leg/TrainDate/{TrainDate}",
+ ProducesMediaTypes: []string{"application/json", "text/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"https"},
+ Params: params,
+ Reader: &THSRAPIAvailableSeatStatus1Reader{formats: a.formats},
Context: params.Context,
Client: params.HTTPClient,
})
if err != nil {
return nil, err
}
- success, ok := result.(*THSRAPIAvailableSeatStatusList1OK)
+ success, ok := result.(*THSRAPIAvailableSeatStatus1OK)
if ok {
return success, nil
}
// unexpected success response
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
- msg := fmt.Sprintf("unexpected success response for THSRApi_AvailableSeatStatusList_1: API contract not enforced by server. Client expected to get an error, but got: %T", result)
+ msg := fmt.Sprintf("unexpected success response for THSRApi_AvailableSeatStatus_1: API contract not enforced by server. Client expected to get an error, but got: %T", result)
panic(msg)
}
diff --git a/rail/v2/client/t_r_a/t_r_a_api_daily_timetable1_responses.go b/rail/v2/client/t_r_a/t_r_a_api_daily_timetable1_responses.go
index 3663e422..63593c0f 100644
--- a/rail/v2/client/t_r_a/t_r_a_api_daily_timetable1_responses.go
+++ b/rail/v2/client/t_r_a/t_r_a_api_daily_timetable1_responses.go
@@ -31,7 +31,7 @@ func (o *TRAAPIDailyTimetable1Reader) ReadResponse(response runtime.ClientRespon
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/rail/v2/client/t_r_a/t_r_a_api_daily_timetable2_responses.go b/rail/v2/client/t_r_a/t_r_a_api_daily_timetable2_responses.go
index edd4b462..9281d9e2 100644
--- a/rail/v2/client/t_r_a/t_r_a_api_daily_timetable2_responses.go
+++ b/rail/v2/client/t_r_a/t_r_a_api_daily_timetable2_responses.go
@@ -31,7 +31,7 @@ func (o *TRAAPIDailyTimetable2Reader) ReadResponse(response runtime.ClientRespon
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/rail/v2/client/t_r_a/t_r_a_api_daily_timetable3_responses.go b/rail/v2/client/t_r_a/t_r_a_api_daily_timetable3_responses.go
index 03df37af..b0f08046 100644
--- a/rail/v2/client/t_r_a/t_r_a_api_daily_timetable3_responses.go
+++ b/rail/v2/client/t_r_a/t_r_a_api_daily_timetable3_responses.go
@@ -31,7 +31,7 @@ func (o *TRAAPIDailyTimetable3Reader) ReadResponse(response runtime.ClientRespon
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/rail/v2/client/t_r_a/t_r_a_api_daily_timetable_responses.go b/rail/v2/client/t_r_a/t_r_a_api_daily_timetable_responses.go
index 0a036503..e6a21f1e 100644
--- a/rail/v2/client/t_r_a/t_r_a_api_daily_timetable_responses.go
+++ b/rail/v2/client/t_r_a/t_r_a_api_daily_timetable_responses.go
@@ -31,7 +31,7 @@ func (o *TRAAPIDailyTimetableReader) ReadResponse(response runtime.ClientRespons
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/rail/v2/client/t_r_a/t_r_a_api_daily_train_info1_responses.go b/rail/v2/client/t_r_a/t_r_a_api_daily_train_info1_responses.go
index 75c002b5..40e5d623 100644
--- a/rail/v2/client/t_r_a/t_r_a_api_daily_train_info1_responses.go
+++ b/rail/v2/client/t_r_a/t_r_a_api_daily_train_info1_responses.go
@@ -31,7 +31,7 @@ func (o *TRAAPIDailyTrainInfo1Reader) ReadResponse(response runtime.ClientRespon
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/rail/v2/client/t_r_a/t_r_a_api_daily_train_info2_responses.go b/rail/v2/client/t_r_a/t_r_a_api_daily_train_info2_responses.go
index f139b680..2631078c 100644
--- a/rail/v2/client/t_r_a/t_r_a_api_daily_train_info2_responses.go
+++ b/rail/v2/client/t_r_a/t_r_a_api_daily_train_info2_responses.go
@@ -31,7 +31,7 @@ func (o *TRAAPIDailyTrainInfo2Reader) ReadResponse(response runtime.ClientRespon
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/rail/v2/client/t_r_a/t_r_a_api_daily_train_info3_responses.go b/rail/v2/client/t_r_a/t_r_a_api_daily_train_info3_responses.go
index 68d665cd..38e2a17e 100644
--- a/rail/v2/client/t_r_a/t_r_a_api_daily_train_info3_responses.go
+++ b/rail/v2/client/t_r_a/t_r_a_api_daily_train_info3_responses.go
@@ -31,7 +31,7 @@ func (o *TRAAPIDailyTrainInfo3Reader) ReadResponse(response runtime.ClientRespon
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/rail/v2/client/t_r_a/t_r_a_api_daily_train_info_responses.go b/rail/v2/client/t_r_a/t_r_a_api_daily_train_info_responses.go
index 187f324d..194486b1 100644
--- a/rail/v2/client/t_r_a/t_r_a_api_daily_train_info_responses.go
+++ b/rail/v2/client/t_r_a/t_r_a_api_daily_train_info_responses.go
@@ -31,7 +31,7 @@ func (o *TRAAPIDailyTrainInfoReader) ReadResponse(response runtime.ClientRespons
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/rail/v2/client/t_r_a/t_r_a_api_general_timetable1_responses.go b/rail/v2/client/t_r_a/t_r_a_api_general_timetable1_responses.go
index ad6b5aeb..5dc13be9 100644
--- a/rail/v2/client/t_r_a/t_r_a_api_general_timetable1_responses.go
+++ b/rail/v2/client/t_r_a/t_r_a_api_general_timetable1_responses.go
@@ -31,7 +31,7 @@ func (o *TRAAPIGeneralTimetable1Reader) ReadResponse(response runtime.ClientResp
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/rail/v2/client/t_r_a/t_r_a_api_general_timetable_responses.go b/rail/v2/client/t_r_a/t_r_a_api_general_timetable_responses.go
index 93faf1cc..d2a070d5 100644
--- a/rail/v2/client/t_r_a/t_r_a_api_general_timetable_responses.go
+++ b/rail/v2/client/t_r_a/t_r_a_api_general_timetable_responses.go
@@ -31,7 +31,7 @@ func (o *TRAAPIGeneralTimetableReader) ReadResponse(response runtime.ClientRespo
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/rail/v2/client/t_r_a/t_r_a_api_general_train_info1_responses.go b/rail/v2/client/t_r_a/t_r_a_api_general_train_info1_responses.go
index 7055f1b6..7e533133 100644
--- a/rail/v2/client/t_r_a/t_r_a_api_general_train_info1_responses.go
+++ b/rail/v2/client/t_r_a/t_r_a_api_general_train_info1_responses.go
@@ -31,7 +31,7 @@ func (o *TRAAPIGeneralTrainInfo1Reader) ReadResponse(response runtime.ClientResp
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/rail/v2/client/t_r_a/t_r_a_api_general_train_info_responses.go b/rail/v2/client/t_r_a/t_r_a_api_general_train_info_responses.go
index 48f90c07..fb78a0e0 100644
--- a/rail/v2/client/t_r_a/t_r_a_api_general_train_info_responses.go
+++ b/rail/v2/client/t_r_a/t_r_a_api_general_train_info_responses.go
@@ -31,7 +31,7 @@ func (o *TRAAPIGeneralTrainInfoReader) ReadResponse(response runtime.ClientRespo
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/rail/v2/client/t_r_a/t_r_a_api_line_responses.go b/rail/v2/client/t_r_a/t_r_a_api_line_responses.go
index 5564bf44..4e146290 100644
--- a/rail/v2/client/t_r_a/t_r_a_api_line_responses.go
+++ b/rail/v2/client/t_r_a/t_r_a_api_line_responses.go
@@ -31,7 +31,7 @@ func (o *TRAAPILineReader) ReadResponse(response runtime.ClientResponse, consume
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/rail/v2/client/t_r_a/t_r_a_api_live_board1_responses.go b/rail/v2/client/t_r_a/t_r_a_api_live_board1_responses.go
index 4a39c2da..7d1a9df2 100644
--- a/rail/v2/client/t_r_a/t_r_a_api_live_board1_responses.go
+++ b/rail/v2/client/t_r_a/t_r_a_api_live_board1_responses.go
@@ -31,7 +31,7 @@ func (o *TRAAPILiveBoard1Reader) ReadResponse(response runtime.ClientResponse, c
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/rail/v2/client/t_r_a/t_r_a_api_live_board_responses.go b/rail/v2/client/t_r_a/t_r_a_api_live_board_responses.go
index 9f1d005d..96414b6e 100644
--- a/rail/v2/client/t_r_a/t_r_a_api_live_board_responses.go
+++ b/rail/v2/client/t_r_a/t_r_a_api_live_board_responses.go
@@ -31,7 +31,7 @@ func (o *TRAAPILiveBoardReader) ReadResponse(response runtime.ClientResponse, co
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/rail/v2/client/t_r_a/t_r_a_api_live_train_delay_responses.go b/rail/v2/client/t_r_a/t_r_a_api_live_train_delay_responses.go
index 07300a5c..937e6ab2 100644
--- a/rail/v2/client/t_r_a/t_r_a_api_live_train_delay_responses.go
+++ b/rail/v2/client/t_r_a/t_r_a_api_live_train_delay_responses.go
@@ -31,7 +31,7 @@ func (o *TRAAPILiveTrainDelayReader) ReadResponse(response runtime.ClientRespons
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/rail/v2/client/t_r_a/t_r_a_api_network_responses.go b/rail/v2/client/t_r_a/t_r_a_api_network_responses.go
index 4a083ec6..fa536e90 100644
--- a/rail/v2/client/t_r_a/t_r_a_api_network_responses.go
+++ b/rail/v2/client/t_r_a/t_r_a_api_network_responses.go
@@ -31,7 +31,7 @@ func (o *TRAAPINetworkReader) ReadResponse(response runtime.ClientResponse, cons
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/rail/v2/client/t_r_a/t_r_a_api_o_d_daily_timetable_responses.go b/rail/v2/client/t_r_a/t_r_a_api_o_d_daily_timetable_responses.go
index b72b5f0d..faa03d9a 100644
--- a/rail/v2/client/t_r_a/t_r_a_api_o_d_daily_timetable_responses.go
+++ b/rail/v2/client/t_r_a/t_r_a_api_o_d_daily_timetable_responses.go
@@ -31,7 +31,7 @@ func (o *TRAAPIODDailyTimetableReader) ReadResponse(response runtime.ClientRespo
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/rail/v2/client/t_r_a/t_r_a_api_o_d_fare_station1_responses.go b/rail/v2/client/t_r_a/t_r_a_api_o_d_fare_station1_responses.go
index 18512b98..04cf70a2 100644
--- a/rail/v2/client/t_r_a/t_r_a_api_o_d_fare_station1_responses.go
+++ b/rail/v2/client/t_r_a/t_r_a_api_o_d_fare_station1_responses.go
@@ -31,7 +31,7 @@ func (o *TRAAPIODFareStation1Reader) ReadResponse(response runtime.ClientRespons
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/rail/v2/client/t_r_a/t_r_a_api_o_d_fare_station_responses.go b/rail/v2/client/t_r_a/t_r_a_api_o_d_fare_station_responses.go
index 58ab4752..bdcb457a 100644
--- a/rail/v2/client/t_r_a/t_r_a_api_o_d_fare_station_responses.go
+++ b/rail/v2/client/t_r_a/t_r_a_api_o_d_fare_station_responses.go
@@ -31,7 +31,7 @@ func (o *TRAAPIODFareStationReader) ReadResponse(response runtime.ClientResponse
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/rail/v2/client/t_r_a/t_r_a_api_shape_responses.go b/rail/v2/client/t_r_a/t_r_a_api_shape_responses.go
index c71e6ea9..dd2a8db2 100644
--- a/rail/v2/client/t_r_a/t_r_a_api_shape_responses.go
+++ b/rail/v2/client/t_r_a/t_r_a_api_shape_responses.go
@@ -31,7 +31,7 @@ func (o *TRAAPIShapeReader) ReadResponse(response runtime.ClientResponse, consum
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/rail/v2/client/t_r_a/t_r_a_api_station_of_line_responses.go b/rail/v2/client/t_r_a/t_r_a_api_station_of_line_responses.go
index ceeaeb52..5cc063f4 100644
--- a/rail/v2/client/t_r_a/t_r_a_api_station_of_line_responses.go
+++ b/rail/v2/client/t_r_a/t_r_a_api_station_of_line_responses.go
@@ -31,7 +31,7 @@ func (o *TRAAPIStationOfLineReader) ReadResponse(response runtime.ClientResponse
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/rail/v2/client/t_r_a/t_r_a_api_station_responses.go b/rail/v2/client/t_r_a/t_r_a_api_station_responses.go
index a697d918..dea2c842 100644
--- a/rail/v2/client/t_r_a/t_r_a_api_station_responses.go
+++ b/rail/v2/client/t_r_a/t_r_a_api_station_responses.go
@@ -31,7 +31,7 @@ func (o *TRAAPIStationReader) ReadResponse(response runtime.ClientResponse, cons
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/rail/v2/client/t_r_a/t_r_a_api_station_timetable_responses.go b/rail/v2/client/t_r_a/t_r_a_api_station_timetable_responses.go
index 9455a501..68058c72 100644
--- a/rail/v2/client/t_r_a/t_r_a_api_station_timetable_responses.go
+++ b/rail/v2/client/t_r_a/t_r_a_api_station_timetable_responses.go
@@ -31,7 +31,7 @@ func (o *TRAAPIStationTimetableReader) ReadResponse(response runtime.ClientRespo
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/rail/v2/client/t_r_a/t_r_a_api_train_type_responses.go b/rail/v2/client/t_r_a/t_r_a_api_train_type_responses.go
index e7f93ffc..cbcf0499 100644
--- a/rail/v2/client/t_r_a/t_r_a_api_train_type_responses.go
+++ b/rail/v2/client/t_r_a/t_r_a_api_train_type_responses.go
@@ -31,7 +31,7 @@ func (o *TRAAPITrainTypeReader) ReadResponse(response runtime.ClientResponse, co
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/rail/v2/models/m_o_t_c_api_rail_models_v2_t_h_s_r_avaliable_seat_status_old_wrapper_service_d_t_o_version2_rail_t_h_s_r_old_available_seat.go b/rail/v2/models/m_o_t_c_api_rail_models_v2_t_h_s_r_avaliable_seat_status_old_wrapper_service_d_t_o_version2_rail_t_h_s_r_old_available_seat.go
new file mode 100644
index 00000000..4f7c57ea
--- /dev/null
+++ b/rail/v2/models/m_o_t_c_api_rail_models_v2_t_h_s_r_avaliable_seat_status_old_wrapper_service_d_t_o_version2_rail_t_h_s_r_old_available_seat.go
@@ -0,0 +1,90 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "strconv"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/strfmt"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// MOTCAPIRailModelsV2THSRAvaliableSeatStatusOldWrapperServiceDTOVersion2RailTHSROldAvailableSeat V2THSRAvaliableSeatStatusWrapper
+//
+// swagger:model MOTC.API.Rail.Models.V2THSRAvaliableSeatStatusOldWrapper[Service.DTO.Version2.Rail.THSR.Old.AvailableSeat]
+type MOTCAPIRailModelsV2THSRAvaliableSeatStatusOldWrapperServiceDTOVersion2RailTHSROldAvailableSeat struct {
+
+ // 對號座位狀態資訊(依高鐵規定若營運狀態有異常狀況時,剩餘座位資訊將停留在最後正常運行時間之狀態不做更新,實際資料請參考高鐵各車站現場對號座剩餘座位資訊看板)
+ // Required: true
+ AvailableSeats []*ServiceDTOVersion2RailTHSROldAvailableSeat `json:"AvailableSeats"`
+
+ // 資料總筆數
+ Count int64 `json:"Count,omitempty"`
+
+ // DateTime
+ //
+ // 更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)
+ UpdateTime string `json:"UpdateTime,omitempty"`
+}
+
+// Validate validates this m o t c API rail models v2 t h s r avaliable seat status old wrapper service d t o version2 rail t h s r old available seat
+func (m *MOTCAPIRailModelsV2THSRAvaliableSeatStatusOldWrapperServiceDTOVersion2RailTHSROldAvailableSeat) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateAvailableSeats(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *MOTCAPIRailModelsV2THSRAvaliableSeatStatusOldWrapperServiceDTOVersion2RailTHSROldAvailableSeat) validateAvailableSeats(formats strfmt.Registry) error {
+
+ if err := validate.Required("AvailableSeats", "body", m.AvailableSeats); err != nil {
+ return err
+ }
+
+ for i := 0; i < len(m.AvailableSeats); i++ {
+ if swag.IsZero(m.AvailableSeats[i]) { // not required
+ continue
+ }
+
+ if m.AvailableSeats[i] != nil {
+ if err := m.AvailableSeats[i].Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("AvailableSeats" + "." + strconv.Itoa(i))
+ }
+ return err
+ }
+ }
+
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *MOTCAPIRailModelsV2THSRAvaliableSeatStatusOldWrapperServiceDTOVersion2RailTHSROldAvailableSeat) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *MOTCAPIRailModelsV2THSRAvaliableSeatStatusOldWrapperServiceDTOVersion2RailTHSROldAvailableSeat) UnmarshalBinary(b []byte) error {
+ var res MOTCAPIRailModelsV2THSRAvaliableSeatStatusOldWrapperServiceDTOVersion2RailTHSROldAvailableSeat
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/rail/v2/models/m_o_t_c_api_rail_models_v2_t_h_s_r_avaliable_seat_status_wrapper_service_d_t_o_version2_rail_t_h_s_r_available_seat.go b/rail/v2/models/m_o_t_c_api_rail_models_v2_t_h_s_r_avaliable_seat_status_wrapper_service_d_t_o_version2_rail_t_h_s_r_available_seat.go
index 8f67e13a..1c7976ce 100644
--- a/rail/v2/models/m_o_t_c_api_rail_models_v2_t_h_s_r_avaliable_seat_status_wrapper_service_d_t_o_version2_rail_t_h_s_r_available_seat.go
+++ b/rail/v2/models/m_o_t_c_api_rail_models_v2_t_h_s_r_avaliable_seat_status_wrapper_service_d_t_o_version2_rail_t_h_s_r_available_seat.go
@@ -14,7 +14,7 @@ import (
"github.com/go-openapi/validate"
)
-// MOTCAPIRailModelsV2THSRAvaliableSeatStatusWrapperServiceDTOVersion2RailTHSRAvailableSeat V2THSRAvaliableSeatStatusWrapper[AvailableSeat]
+// MOTCAPIRailModelsV2THSRAvaliableSeatStatusWrapperServiceDTOVersion2RailTHSRAvailableSeat AvaliableSeatStatus
//
// swagger:model MOTC.API.Rail.Models.V2THSRAvaliableSeatStatusWrapper[Service.DTO.Version2.Rail.THSR.AvailableSeat]
type MOTCAPIRailModelsV2THSRAvaliableSeatStatusWrapperServiceDTOVersion2RailTHSRAvailableSeat struct {
@@ -28,7 +28,15 @@ type MOTCAPIRailModelsV2THSRAvaliableSeatStatusWrapperServiceDTOVersion2RailTHSR
// DateTime
//
- // 更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)
+ // 來源平台更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)
+ SrcUpdateTime string `json:"SrcUpdateTime,omitempty"`
+
+ // 營運日說明(格式: yyyy-MM-dd)
+ TrainDate string `json:"TrainDate,omitempty"`
+
+ // DateTime
+ //
+ // PTX平台更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)
UpdateTime string `json:"UpdateTime,omitempty"`
}
diff --git a/rail/v2/models/service_d_t_o_version2_rail_t_h_s_r_available_seat.go b/rail/v2/models/service_d_t_o_version2_rail_t_h_s_r_available_seat.go
index 7dedbe3c..8ca40219 100644
--- a/rail/v2/models/service_d_t_o_version2_rail_t_h_s_r_available_seat.go
+++ b/rail/v2/models/service_d_t_o_version2_rail_t_h_s_r_available_seat.go
@@ -21,16 +21,16 @@ import (
// swagger:model Service.DTO.Version2.Rail.THSR.AvailableSeat
type ServiceDTOVersion2RailTHSRAvailableSeat struct {
- // 發車時間(格式: HH:mm)
- // Required: true
- DepartureTime *string `json:"DepartureTime"`
-
// integer
//
// 方向 : [0:'南下',1:'北上']
// Required: true
Direction *int32 `json:"Direction"`
+ // 終點車站簡碼(訂票系統用)
+ // Required: true
+ EndingStationCode *string `json:"EndingStationCode"`
+
// 終點車站代碼
// Required: true
EndingStationID *string `json:"EndingStationID"`
@@ -41,21 +41,19 @@ type ServiceDTOVersion2RailTHSRAvailableSeat struct {
// Required: true
EndingStationName *ServiceDTOVersion2BaseNameType `json:"EndingStationName"`
- // DateTime
- //
- // 來源端平台接收時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)
+ // 起站車站簡碼(訂票系統用)
// Required: true
- SrcRecTime *string `json:"SrcRecTime"`
+ StartingStationCode *string `json:"StartingStationCode"`
- // 查詢車站代碼
+ // 起點車站代碼
// Required: true
- StationID *string `json:"StationID"`
+ StartingStationID *string `json:"StartingStationID"`
// NameType
//
- // 查詢車站名稱
+ // 起點車站名稱
// Required: true
- StationName *ServiceDTOVersion2BaseNameType `json:"StationName"`
+ StartingStationName *ServiceDTOVersion2BaseNameType `json:"StartingStationName"`
// 車次停靠站點組合
// Required: true
@@ -64,23 +62,17 @@ type ServiceDTOVersion2RailTHSRAvailableSeat struct {
// 車次號碼
// Required: true
TrainNo *string `json:"TrainNo"`
-
- // DateTime
- //
- // 本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)
- // Required: true
- UpdateTime *string `json:"UpdateTime"`
}
// Validate validates this service d t o version2 rail t h s r available seat
func (m *ServiceDTOVersion2RailTHSRAvailableSeat) Validate(formats strfmt.Registry) error {
var res []error
- if err := m.validateDepartureTime(formats); err != nil {
+ if err := m.validateDirection(formats); err != nil {
res = append(res, err)
}
- if err := m.validateDirection(formats); err != nil {
+ if err := m.validateEndingStationCode(formats); err != nil {
res = append(res, err)
}
@@ -92,15 +84,15 @@ func (m *ServiceDTOVersion2RailTHSRAvailableSeat) Validate(formats strfmt.Regist
res = append(res, err)
}
- if err := m.validateSrcRecTime(formats); err != nil {
+ if err := m.validateStartingStationCode(formats); err != nil {
res = append(res, err)
}
- if err := m.validateStationID(formats); err != nil {
+ if err := m.validateStartingStationID(formats); err != nil {
res = append(res, err)
}
- if err := m.validateStationName(formats); err != nil {
+ if err := m.validateStartingStationName(formats); err != nil {
res = append(res, err)
}
@@ -112,28 +104,24 @@ func (m *ServiceDTOVersion2RailTHSRAvailableSeat) Validate(formats strfmt.Regist
res = append(res, err)
}
- if err := m.validateUpdateTime(formats); err != nil {
- res = append(res, err)
- }
-
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
-func (m *ServiceDTOVersion2RailTHSRAvailableSeat) validateDepartureTime(formats strfmt.Registry) error {
+func (m *ServiceDTOVersion2RailTHSRAvailableSeat) validateDirection(formats strfmt.Registry) error {
- if err := validate.Required("DepartureTime", "body", m.DepartureTime); err != nil {
+ if err := validate.Required("Direction", "body", m.Direction); err != nil {
return err
}
return nil
}
-func (m *ServiceDTOVersion2RailTHSRAvailableSeat) validateDirection(formats strfmt.Registry) error {
+func (m *ServiceDTOVersion2RailTHSRAvailableSeat) validateEndingStationCode(formats strfmt.Registry) error {
- if err := validate.Required("Direction", "body", m.Direction); err != nil {
+ if err := validate.Required("EndingStationCode", "body", m.EndingStationCode); err != nil {
return err
}
@@ -167,34 +155,34 @@ func (m *ServiceDTOVersion2RailTHSRAvailableSeat) validateEndingStationName(form
return nil
}
-func (m *ServiceDTOVersion2RailTHSRAvailableSeat) validateSrcRecTime(formats strfmt.Registry) error {
+func (m *ServiceDTOVersion2RailTHSRAvailableSeat) validateStartingStationCode(formats strfmt.Registry) error {
- if err := validate.Required("SrcRecTime", "body", m.SrcRecTime); err != nil {
+ if err := validate.Required("StartingStationCode", "body", m.StartingStationCode); err != nil {
return err
}
return nil
}
-func (m *ServiceDTOVersion2RailTHSRAvailableSeat) validateStationID(formats strfmt.Registry) error {
+func (m *ServiceDTOVersion2RailTHSRAvailableSeat) validateStartingStationID(formats strfmt.Registry) error {
- if err := validate.Required("StationID", "body", m.StationID); err != nil {
+ if err := validate.Required("StartingStationID", "body", m.StartingStationID); err != nil {
return err
}
return nil
}
-func (m *ServiceDTOVersion2RailTHSRAvailableSeat) validateStationName(formats strfmt.Registry) error {
+func (m *ServiceDTOVersion2RailTHSRAvailableSeat) validateStartingStationName(formats strfmt.Registry) error {
- if err := validate.Required("StationName", "body", m.StationName); err != nil {
+ if err := validate.Required("StartingStationName", "body", m.StartingStationName); err != nil {
return err
}
- if m.StationName != nil {
- if err := m.StationName.Validate(formats); err != nil {
+ if m.StartingStationName != nil {
+ if err := m.StartingStationName.Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
- return ve.ValidateName("StationName")
+ return ve.ValidateName("StartingStationName")
}
return err
}
@@ -237,15 +225,6 @@ func (m *ServiceDTOVersion2RailTHSRAvailableSeat) validateTrainNo(formats strfmt
return nil
}
-func (m *ServiceDTOVersion2RailTHSRAvailableSeat) validateUpdateTime(formats strfmt.Registry) error {
-
- if err := validate.Required("UpdateTime", "body", m.UpdateTime); err != nil {
- return err
- }
-
- return nil
-}
-
// MarshalBinary interface implementation
func (m *ServiceDTOVersion2RailTHSRAvailableSeat) MarshalBinary() ([]byte, error) {
if m == nil {
diff --git a/rail/v2/models/service_d_t_o_version2_rail_t_h_s_r_old_available_seat.go b/rail/v2/models/service_d_t_o_version2_rail_t_h_s_r_old_available_seat.go
new file mode 100644
index 00000000..9eb72c32
--- /dev/null
+++ b/rail/v2/models/service_d_t_o_version2_rail_t_h_s_r_old_available_seat.go
@@ -0,0 +1,265 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "strconv"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/strfmt"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// ServiceDTOVersion2RailTHSROldAvailableSeat AvailableSeat
+//
+// 高鐵對號座位狀態資訊
+//
+// swagger:model Service.DTO.Version2.Rail.THSR.Old.AvailableSeat
+type ServiceDTOVersion2RailTHSROldAvailableSeat struct {
+
+ // 發車時間(格式: HH:mm)
+ // Required: true
+ DepartureTime *string `json:"DepartureTime"`
+
+ // integer
+ //
+ // 方向 : [0:'南下',1:'北上']
+ // Required: true
+ Direction *int32 `json:"Direction"`
+
+ // 終點車站代碼
+ // Required: true
+ EndingStationID *string `json:"EndingStationID"`
+
+ // NameType
+ //
+ // 終點車站名稱
+ // Required: true
+ EndingStationName *ServiceDTOVersion2BaseNameType `json:"EndingStationName"`
+
+ // DateTime
+ //
+ // 來源端平台接收時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)
+ // Required: true
+ SrcRecTime *string `json:"SrcRecTime"`
+
+ // 查詢車站代碼
+ // Required: true
+ StationID *string `json:"StationID"`
+
+ // NameType
+ //
+ // 查詢車站名稱
+ // Required: true
+ StationName *ServiceDTOVersion2BaseNameType `json:"StationName"`
+
+ // 車次停靠站點組合
+ // Required: true
+ StopStations []*ServiceDTOVersion2RailTHSROldStopStation `json:"StopStations"`
+
+ // 車次號碼
+ // Required: true
+ TrainNo *string `json:"TrainNo"`
+
+ // DateTime
+ //
+ // 本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)
+ // Required: true
+ UpdateTime *string `json:"UpdateTime"`
+}
+
+// Validate validates this service d t o version2 rail t h s r old available seat
+func (m *ServiceDTOVersion2RailTHSROldAvailableSeat) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateDepartureTime(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateDirection(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateEndingStationID(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateEndingStationName(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateSrcRecTime(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateStationID(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateStationName(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateStopStations(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateTrainNo(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateUpdateTime(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *ServiceDTOVersion2RailTHSROldAvailableSeat) validateDepartureTime(formats strfmt.Registry) error {
+
+ if err := validate.Required("DepartureTime", "body", m.DepartureTime); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *ServiceDTOVersion2RailTHSROldAvailableSeat) validateDirection(formats strfmt.Registry) error {
+
+ if err := validate.Required("Direction", "body", m.Direction); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *ServiceDTOVersion2RailTHSROldAvailableSeat) validateEndingStationID(formats strfmt.Registry) error {
+
+ if err := validate.Required("EndingStationID", "body", m.EndingStationID); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *ServiceDTOVersion2RailTHSROldAvailableSeat) validateEndingStationName(formats strfmt.Registry) error {
+
+ if err := validate.Required("EndingStationName", "body", m.EndingStationName); err != nil {
+ return err
+ }
+
+ if m.EndingStationName != nil {
+ if err := m.EndingStationName.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("EndingStationName")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *ServiceDTOVersion2RailTHSROldAvailableSeat) validateSrcRecTime(formats strfmt.Registry) error {
+
+ if err := validate.Required("SrcRecTime", "body", m.SrcRecTime); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *ServiceDTOVersion2RailTHSROldAvailableSeat) validateStationID(formats strfmt.Registry) error {
+
+ if err := validate.Required("StationID", "body", m.StationID); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *ServiceDTOVersion2RailTHSROldAvailableSeat) validateStationName(formats strfmt.Registry) error {
+
+ if err := validate.Required("StationName", "body", m.StationName); err != nil {
+ return err
+ }
+
+ if m.StationName != nil {
+ if err := m.StationName.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("StationName")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *ServiceDTOVersion2RailTHSROldAvailableSeat) validateStopStations(formats strfmt.Registry) error {
+
+ if err := validate.Required("StopStations", "body", m.StopStations); err != nil {
+ return err
+ }
+
+ for i := 0; i < len(m.StopStations); i++ {
+ if swag.IsZero(m.StopStations[i]) { // not required
+ continue
+ }
+
+ if m.StopStations[i] != nil {
+ if err := m.StopStations[i].Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("StopStations" + "." + strconv.Itoa(i))
+ }
+ return err
+ }
+ }
+
+ }
+
+ return nil
+}
+
+func (m *ServiceDTOVersion2RailTHSROldAvailableSeat) validateTrainNo(formats strfmt.Registry) error {
+
+ if err := validate.Required("TrainNo", "body", m.TrainNo); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *ServiceDTOVersion2RailTHSROldAvailableSeat) validateUpdateTime(formats strfmt.Registry) error {
+
+ if err := validate.Required("UpdateTime", "body", m.UpdateTime); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *ServiceDTOVersion2RailTHSROldAvailableSeat) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *ServiceDTOVersion2RailTHSROldAvailableSeat) UnmarshalBinary(b []byte) error {
+ var res ServiceDTOVersion2RailTHSROldAvailableSeat
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/rail/v2/models/service_d_t_o_version2_rail_t_h_s_r_old_stop_station.go b/rail/v2/models/service_d_t_o_version2_rail_t_h_s_r_old_stop_station.go
new file mode 100644
index 00000000..b4abb081
--- /dev/null
+++ b/rail/v2/models/service_d_t_o_version2_rail_t_h_s_r_old_stop_station.go
@@ -0,0 +1,128 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/strfmt"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// ServiceDTOVersion2RailTHSROldStopStation StopStation
+//
+// 車次停靠站點組合
+//
+// swagger:model Service.DTO.Version2.Rail.THSR.Old.StopStation
+type ServiceDTOVersion2RailTHSROldStopStation struct {
+
+ // 商務席剩餘座位狀態 = ['Available: 尚有座位' or 'Limited: 座位有限' or 'Full: 已無座位']
+ // Required: true
+ BusinessSeatStatus *string `json:"BusinessSeatStatus"`
+
+ // 標準席剩餘座位狀態 = ['Available: 尚有座位' or 'Limited: 座位有限' or 'Full: 已無座位']
+ // Required: true
+ StandardSeatStatus *string `json:"StandardSeatStatus"`
+
+ // 車站代碼
+ // Required: true
+ StationID *string `json:"StationID"`
+
+ // NameType
+ //
+ // 車站名稱
+ // Required: true
+ StationName *ServiceDTOVersion2BaseNameType `json:"StationName"`
+}
+
+// Validate validates this service d t o version2 rail t h s r old stop station
+func (m *ServiceDTOVersion2RailTHSROldStopStation) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateBusinessSeatStatus(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateStandardSeatStatus(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateStationID(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateStationName(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *ServiceDTOVersion2RailTHSROldStopStation) validateBusinessSeatStatus(formats strfmt.Registry) error {
+
+ if err := validate.Required("BusinessSeatStatus", "body", m.BusinessSeatStatus); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *ServiceDTOVersion2RailTHSROldStopStation) validateStandardSeatStatus(formats strfmt.Registry) error {
+
+ if err := validate.Required("StandardSeatStatus", "body", m.StandardSeatStatus); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *ServiceDTOVersion2RailTHSROldStopStation) validateStationID(formats strfmt.Registry) error {
+
+ if err := validate.Required("StationID", "body", m.StationID); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *ServiceDTOVersion2RailTHSROldStopStation) validateStationName(formats strfmt.Registry) error {
+
+ if err := validate.Required("StationName", "body", m.StationName); err != nil {
+ return err
+ }
+
+ if m.StationName != nil {
+ if err := m.StationName.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("StationName")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *ServiceDTOVersion2RailTHSROldStopStation) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *ServiceDTOVersion2RailTHSROldStopStation) UnmarshalBinary(b []byte) error {
+ var res ServiceDTOVersion2RailTHSROldStopStation
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/rail/v2/models/service_d_t_o_version2_rail_t_h_s_r_stop_station.go b/rail/v2/models/service_d_t_o_version2_rail_t_h_s_r_stop_station.go
index 9d999c99..ae8222a8 100644
--- a/rail/v2/models/service_d_t_o_version2_rail_t_h_s_r_stop_station.go
+++ b/rail/v2/models/service_d_t_o_version2_rail_t_h_s_r_stop_station.go
@@ -19,14 +19,32 @@ import (
// swagger:model Service.DTO.Version2.Rail.THSR.StopStation
type ServiceDTOVersion2RailTHSRStopStation struct {
- // 商務席剩餘座位狀態 = ['Available: 尚有座位' or 'Limited: 座位有限' or 'Full: 已無座位']
+ // 商務席剩餘座位狀態 = ['O: 尚有座位' or 'L: 座位有限' or 'X: 已無座位']
// Required: true
BusinessSeatStatus *string `json:"BusinessSeatStatus"`
- // 標準席剩餘座位狀態 = ['Available: 尚有座位' or 'Limited: 座位有限' or 'Full: 已無座位']
+ // 下一停靠站車站簡碼(訂票系統用)
+ // Required: true
+ NextStationCode *string `json:"NextStationCode"`
+
+ // 下一停靠站車站代碼
+ // Required: true
+ NextStationID *string `json:"NextStationID"`
+
+ // NameType
+ //
+ // 下一停靠站車站名稱
+ // Required: true
+ NextStationName *ServiceDTOVersion2BaseNameType `json:"NextStationName"`
+
+ // 標準席剩餘座位狀態 = ['O: 尚有座位' or 'L: 座位有限' or 'X: 已無座位']
// Required: true
StandardSeatStatus *string `json:"StandardSeatStatus"`
+ // 車站簡碼(訂票系統用)
+ // Required: true
+ StationCode *string `json:"StationCode"`
+
// 車站代碼
// Required: true
StationID *string `json:"StationID"`
@@ -36,6 +54,10 @@ type ServiceDTOVersion2RailTHSRStopStation struct {
// 車站名稱
// Required: true
StationName *ServiceDTOVersion2BaseNameType `json:"StationName"`
+
+ // 跑法站序
+ // Required: true
+ StopSequence *int32 `json:"StopSequence"`
}
// Validate validates this service d t o version2 rail t h s r stop station
@@ -46,10 +68,26 @@ func (m *ServiceDTOVersion2RailTHSRStopStation) Validate(formats strfmt.Registry
res = append(res, err)
}
+ if err := m.validateNextStationCode(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateNextStationID(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := m.validateNextStationName(formats); err != nil {
+ res = append(res, err)
+ }
+
if err := m.validateStandardSeatStatus(formats); err != nil {
res = append(res, err)
}
+ if err := m.validateStationCode(formats); err != nil {
+ res = append(res, err)
+ }
+
if err := m.validateStationID(formats); err != nil {
res = append(res, err)
}
@@ -58,6 +96,10 @@ func (m *ServiceDTOVersion2RailTHSRStopStation) Validate(formats strfmt.Registry
res = append(res, err)
}
+ if err := m.validateStopSequence(formats); err != nil {
+ res = append(res, err)
+ }
+
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
@@ -73,6 +115,42 @@ func (m *ServiceDTOVersion2RailTHSRStopStation) validateBusinessSeatStatus(forma
return nil
}
+func (m *ServiceDTOVersion2RailTHSRStopStation) validateNextStationCode(formats strfmt.Registry) error {
+
+ if err := validate.Required("NextStationCode", "body", m.NextStationCode); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *ServiceDTOVersion2RailTHSRStopStation) validateNextStationID(formats strfmt.Registry) error {
+
+ if err := validate.Required("NextStationID", "body", m.NextStationID); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *ServiceDTOVersion2RailTHSRStopStation) validateNextStationName(formats strfmt.Registry) error {
+
+ if err := validate.Required("NextStationName", "body", m.NextStationName); err != nil {
+ return err
+ }
+
+ if m.NextStationName != nil {
+ if err := m.NextStationName.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("NextStationName")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
func (m *ServiceDTOVersion2RailTHSRStopStation) validateStandardSeatStatus(formats strfmt.Registry) error {
if err := validate.Required("StandardSeatStatus", "body", m.StandardSeatStatus); err != nil {
@@ -82,6 +160,15 @@ func (m *ServiceDTOVersion2RailTHSRStopStation) validateStandardSeatStatus(forma
return nil
}
+func (m *ServiceDTOVersion2RailTHSRStopStation) validateStationCode(formats strfmt.Registry) error {
+
+ if err := validate.Required("StationCode", "body", m.StationCode); err != nil {
+ return err
+ }
+
+ return nil
+}
+
func (m *ServiceDTOVersion2RailTHSRStopStation) validateStationID(formats strfmt.Registry) error {
if err := validate.Required("StationID", "body", m.StationID); err != nil {
@@ -109,6 +196,15 @@ func (m *ServiceDTOVersion2RailTHSRStopStation) validateStationName(formats strf
return nil
}
+func (m *ServiceDTOVersion2RailTHSRStopStation) validateStopSequence(formats strfmt.Registry) error {
+
+ if err := validate.Required("StopSequence", "body", m.StopSequence); err != nil {
+ return err
+ }
+
+ return nil
+}
+
// MarshalBinary interface implementation
func (m *ServiceDTOVersion2RailTHSRStopStation) MarshalBinary() ([]byte, error) {
if m == nil {
diff --git a/rail/v3/client/t_r_a/alert_api_controller_get_responses.go b/rail/v3/client/t_r_a/alert_api_controller_get_responses.go
index 1a8a7372..a9935772 100644
--- a/rail/v3/client/t_r_a/alert_api_controller_get_responses.go
+++ b/rail/v3/client/t_r_a/alert_api_controller_get_responses.go
@@ -31,7 +31,7 @@ func (o *AlertAPIControllerGetReader) ReadResponse(response runtime.ClientRespon
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/rail/v3/client/t_r_a/daily_station_time_table_api_controller_get1_responses.go b/rail/v3/client/t_r_a/daily_station_time_table_api_controller_get1_responses.go
index f197c3e5..e91d353d 100644
--- a/rail/v3/client/t_r_a/daily_station_time_table_api_controller_get1_responses.go
+++ b/rail/v3/client/t_r_a/daily_station_time_table_api_controller_get1_responses.go
@@ -31,7 +31,7 @@ func (o *DailyStationTimeTableAPIControllerGet1Reader) ReadResponse(response run
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/rail/v3/client/t_r_a/daily_station_time_table_api_controller_get2_responses.go b/rail/v3/client/t_r_a/daily_station_time_table_api_controller_get2_responses.go
index e6396dd3..6e65e8ef 100644
--- a/rail/v3/client/t_r_a/daily_station_time_table_api_controller_get2_responses.go
+++ b/rail/v3/client/t_r_a/daily_station_time_table_api_controller_get2_responses.go
@@ -31,7 +31,7 @@ func (o *DailyStationTimeTableAPIControllerGet2Reader) ReadResponse(response run
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/rail/v3/client/t_r_a/daily_station_time_table_api_controller_get_responses.go b/rail/v3/client/t_r_a/daily_station_time_table_api_controller_get_responses.go
index 9b3f5a4b..197a8778 100644
--- a/rail/v3/client/t_r_a/daily_station_time_table_api_controller_get_responses.go
+++ b/rail/v3/client/t_r_a/daily_station_time_table_api_controller_get_responses.go
@@ -31,7 +31,7 @@ func (o *DailyStationTimeTableAPIControllerGetReader) ReadResponse(response runt
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/rail/v3/client/t_r_a/daily_train_time_table_api_controller_get1_responses.go b/rail/v3/client/t_r_a/daily_train_time_table_api_controller_get1_responses.go
index 527533f9..1602ba01 100644
--- a/rail/v3/client/t_r_a/daily_train_time_table_api_controller_get1_responses.go
+++ b/rail/v3/client/t_r_a/daily_train_time_table_api_controller_get1_responses.go
@@ -31,7 +31,7 @@ func (o *DailyTrainTimeTableAPIControllerGet1Reader) ReadResponse(response runti
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/rail/v3/client/t_r_a/daily_train_time_table_api_controller_get2_responses.go b/rail/v3/client/t_r_a/daily_train_time_table_api_controller_get2_responses.go
index 8044265f..0fcafa76 100644
--- a/rail/v3/client/t_r_a/daily_train_time_table_api_controller_get2_responses.go
+++ b/rail/v3/client/t_r_a/daily_train_time_table_api_controller_get2_responses.go
@@ -31,7 +31,7 @@ func (o *DailyTrainTimeTableAPIControllerGet2Reader) ReadResponse(response runti
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/rail/v3/client/t_r_a/daily_train_time_table_api_controller_get3_responses.go b/rail/v3/client/t_r_a/daily_train_time_table_api_controller_get3_responses.go
index 28365146..f874d1fb 100644
--- a/rail/v3/client/t_r_a/daily_train_time_table_api_controller_get3_responses.go
+++ b/rail/v3/client/t_r_a/daily_train_time_table_api_controller_get3_responses.go
@@ -31,7 +31,7 @@ func (o *DailyTrainTimeTableAPIControllerGet3Reader) ReadResponse(response runti
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/rail/v3/client/t_r_a/daily_train_time_table_api_controller_get4_responses.go b/rail/v3/client/t_r_a/daily_train_time_table_api_controller_get4_responses.go
index e206b573..567892b6 100644
--- a/rail/v3/client/t_r_a/daily_train_time_table_api_controller_get4_responses.go
+++ b/rail/v3/client/t_r_a/daily_train_time_table_api_controller_get4_responses.go
@@ -31,7 +31,7 @@ func (o *DailyTrainTimeTableAPIControllerGet4Reader) ReadResponse(response runti
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/rail/v3/client/t_r_a/daily_train_time_table_api_controller_get_responses.go b/rail/v3/client/t_r_a/daily_train_time_table_api_controller_get_responses.go
index 8efcdce8..b98c8446 100644
--- a/rail/v3/client/t_r_a/daily_train_time_table_api_controller_get_responses.go
+++ b/rail/v3/client/t_r_a/daily_train_time_table_api_controller_get_responses.go
@@ -31,7 +31,7 @@ func (o *DailyTrainTimeTableAPIControllerGetReader) ReadResponse(response runtim
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/rail/v3/client/t_r_a/general_station_timetable_api_controller_get1_responses.go b/rail/v3/client/t_r_a/general_station_timetable_api_controller_get1_responses.go
index d820626e..935b481d 100644
--- a/rail/v3/client/t_r_a/general_station_timetable_api_controller_get1_responses.go
+++ b/rail/v3/client/t_r_a/general_station_timetable_api_controller_get1_responses.go
@@ -31,7 +31,7 @@ func (o *GeneralStationTimetableAPIControllerGet1Reader) ReadResponse(response r
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/rail/v3/client/t_r_a/general_station_timetable_api_controller_get_responses.go b/rail/v3/client/t_r_a/general_station_timetable_api_controller_get_responses.go
index c99541e1..607810d0 100644
--- a/rail/v3/client/t_r_a/general_station_timetable_api_controller_get_responses.go
+++ b/rail/v3/client/t_r_a/general_station_timetable_api_controller_get_responses.go
@@ -31,7 +31,7 @@ func (o *GeneralStationTimetableAPIControllerGetReader) ReadResponse(response ru
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/rail/v3/client/t_r_a/general_train_timetable_api_controller_get1_responses.go b/rail/v3/client/t_r_a/general_train_timetable_api_controller_get1_responses.go
index 8f0a9eb7..a0b255d5 100644
--- a/rail/v3/client/t_r_a/general_train_timetable_api_controller_get1_responses.go
+++ b/rail/v3/client/t_r_a/general_train_timetable_api_controller_get1_responses.go
@@ -31,7 +31,7 @@ func (o *GeneralTrainTimetableAPIControllerGet1Reader) ReadResponse(response run
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/rail/v3/client/t_r_a/general_train_timetable_api_controller_get_responses.go b/rail/v3/client/t_r_a/general_train_timetable_api_controller_get_responses.go
index 4668bc78..c9a54ff8 100644
--- a/rail/v3/client/t_r_a/general_train_timetable_api_controller_get_responses.go
+++ b/rail/v3/client/t_r_a/general_train_timetable_api_controller_get_responses.go
@@ -31,7 +31,7 @@ func (o *GeneralTrainTimetableAPIControllerGetReader) ReadResponse(response runt
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/rail/v3/client/t_r_a/line_api_controller_get_responses.go b/rail/v3/client/t_r_a/line_api_controller_get_responses.go
index b89e7113..3bb741b9 100644
--- a/rail/v3/client/t_r_a/line_api_controller_get_responses.go
+++ b/rail/v3/client/t_r_a/line_api_controller_get_responses.go
@@ -31,7 +31,7 @@ func (o *LineAPIControllerGetReader) ReadResponse(response runtime.ClientRespons
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/rail/v3/client/t_r_a/line_network_api_controller_get_responses.go b/rail/v3/client/t_r_a/line_network_api_controller_get_responses.go
index e284941a..9c4098f1 100644
--- a/rail/v3/client/t_r_a/line_network_api_controller_get_responses.go
+++ b/rail/v3/client/t_r_a/line_network_api_controller_get_responses.go
@@ -31,7 +31,7 @@ func (o *LineNetworkAPIControllerGetReader) ReadResponse(response runtime.Client
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/rail/v3/client/t_r_a/line_transfer_api_controller_get_responses.go b/rail/v3/client/t_r_a/line_transfer_api_controller_get_responses.go
index bd354980..1abd7afb 100644
--- a/rail/v3/client/t_r_a/line_transfer_api_controller_get_responses.go
+++ b/rail/v3/client/t_r_a/line_transfer_api_controller_get_responses.go
@@ -31,7 +31,7 @@ func (o *LineTransferAPIControllerGetReader) ReadResponse(response runtime.Clien
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/rail/v3/client/t_r_a/network_api_controller_get_responses.go b/rail/v3/client/t_r_a/network_api_controller_get_responses.go
index 5351d69e..2370a546 100644
--- a/rail/v3/client/t_r_a/network_api_controller_get_responses.go
+++ b/rail/v3/client/t_r_a/network_api_controller_get_responses.go
@@ -31,7 +31,7 @@ func (o *NetworkAPIControllerGetReader) ReadResponse(response runtime.ClientResp
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/rail/v3/client/t_r_a/news_api_controller_get_responses.go b/rail/v3/client/t_r_a/news_api_controller_get_responses.go
index 507de9d5..d04bfcb8 100644
--- a/rail/v3/client/t_r_a/news_api_controller_get_responses.go
+++ b/rail/v3/client/t_r_a/news_api_controller_get_responses.go
@@ -31,7 +31,7 @@ func (o *NewsAPIControllerGetReader) ReadResponse(response runtime.ClientRespons
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/rail/v3/client/t_r_a/o_d_fare_api_controller_api_controller_get1_responses.go b/rail/v3/client/t_r_a/o_d_fare_api_controller_api_controller_get1_responses.go
index 10bdd23b..b84af1d9 100644
--- a/rail/v3/client/t_r_a/o_d_fare_api_controller_api_controller_get1_responses.go
+++ b/rail/v3/client/t_r_a/o_d_fare_api_controller_api_controller_get1_responses.go
@@ -31,7 +31,7 @@ func (o *ODFareAPIControllerAPIControllerGet1Reader) ReadResponse(response runti
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/rail/v3/client/t_r_a/o_d_fare_api_controller_api_controller_get_responses.go b/rail/v3/client/t_r_a/o_d_fare_api_controller_api_controller_get_responses.go
index b9879b8f..c028faaa 100644
--- a/rail/v3/client/t_r_a/o_d_fare_api_controller_api_controller_get_responses.go
+++ b/rail/v3/client/t_r_a/o_d_fare_api_controller_api_controller_get_responses.go
@@ -31,7 +31,7 @@ func (o *ODFareAPIControllerAPIControllerGetReader) ReadResponse(response runtim
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/rail/v3/client/t_r_a/operator_api_controller_get_responses.go b/rail/v3/client/t_r_a/operator_api_controller_get_responses.go
index 85688331..4fd3056b 100644
--- a/rail/v3/client/t_r_a/operator_api_controller_get_responses.go
+++ b/rail/v3/client/t_r_a/operator_api_controller_get_responses.go
@@ -31,7 +31,7 @@ func (o *OperatorAPIControllerGetReader) ReadResponse(response runtime.ClientRes
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/rail/v3/client/t_r_a/shape_api_controller_get_responses.go b/rail/v3/client/t_r_a/shape_api_controller_get_responses.go
index ab735daf..db77f6a8 100644
--- a/rail/v3/client/t_r_a/shape_api_controller_get_responses.go
+++ b/rail/v3/client/t_r_a/shape_api_controller_get_responses.go
@@ -31,7 +31,7 @@ func (o *ShapeAPIControllerGetReader) ReadResponse(response runtime.ClientRespon
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/rail/v3/client/t_r_a/specific_train_timetable_api_controller_get1_responses.go b/rail/v3/client/t_r_a/specific_train_timetable_api_controller_get1_responses.go
index 96e81751..89e77c59 100644
--- a/rail/v3/client/t_r_a/specific_train_timetable_api_controller_get1_responses.go
+++ b/rail/v3/client/t_r_a/specific_train_timetable_api_controller_get1_responses.go
@@ -31,7 +31,7 @@ func (o *SpecificTrainTimetableAPIControllerGet1Reader) ReadResponse(response ru
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/rail/v3/client/t_r_a/specific_train_timetable_api_controller_get_responses.go b/rail/v3/client/t_r_a/specific_train_timetable_api_controller_get_responses.go
index 97a62b94..ba24b71e 100644
--- a/rail/v3/client/t_r_a/specific_train_timetable_api_controller_get_responses.go
+++ b/rail/v3/client/t_r_a/specific_train_timetable_api_controller_get_responses.go
@@ -31,7 +31,7 @@ func (o *SpecificTrainTimetableAPIControllerGetReader) ReadResponse(response run
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/rail/v3/client/t_r_a/station_api_controller_get_responses.go b/rail/v3/client/t_r_a/station_api_controller_get_responses.go
index 18bcba5e..7f680fb6 100644
--- a/rail/v3/client/t_r_a/station_api_controller_get_responses.go
+++ b/rail/v3/client/t_r_a/station_api_controller_get_responses.go
@@ -31,7 +31,7 @@ func (o *StationAPIControllerGetReader) ReadResponse(response runtime.ClientResp
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/rail/v3/client/t_r_a/station_exit_api_controller_get_responses.go b/rail/v3/client/t_r_a/station_exit_api_controller_get_responses.go
index 94cfd12a..aa3da525 100644
--- a/rail/v3/client/t_r_a/station_exit_api_controller_get_responses.go
+++ b/rail/v3/client/t_r_a/station_exit_api_controller_get_responses.go
@@ -31,7 +31,7 @@ func (o *StationExitAPIControllerGetReader) ReadResponse(response runtime.Client
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/rail/v3/client/t_r_a/station_facility_api_controller_get_responses.go b/rail/v3/client/t_r_a/station_facility_api_controller_get_responses.go
index f8c5a683..765d48ae 100644
--- a/rail/v3/client/t_r_a/station_facility_api_controller_get_responses.go
+++ b/rail/v3/client/t_r_a/station_facility_api_controller_get_responses.go
@@ -31,7 +31,7 @@ func (o *StationFacilityAPIControllerGetReader) ReadResponse(response runtime.Cl
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/rail/v3/client/t_r_a/station_live_board_api_controller_get1_responses.go b/rail/v3/client/t_r_a/station_live_board_api_controller_get1_responses.go
index 668bf297..318773ec 100644
--- a/rail/v3/client/t_r_a/station_live_board_api_controller_get1_responses.go
+++ b/rail/v3/client/t_r_a/station_live_board_api_controller_get1_responses.go
@@ -31,7 +31,7 @@ func (o *StationLiveBoardAPIControllerGet1Reader) ReadResponse(response runtime.
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/rail/v3/client/t_r_a/station_live_board_api_controller_get_responses.go b/rail/v3/client/t_r_a/station_live_board_api_controller_get_responses.go
index 850751fe..bf38038a 100644
--- a/rail/v3/client/t_r_a/station_live_board_api_controller_get_responses.go
+++ b/rail/v3/client/t_r_a/station_live_board_api_controller_get_responses.go
@@ -31,7 +31,7 @@ func (o *StationLiveBoardAPIControllerGetReader) ReadResponse(response runtime.C
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/rail/v3/client/t_r_a/station_of_line_api_controller_get_responses.go b/rail/v3/client/t_r_a/station_of_line_api_controller_get_responses.go
index 2c37000e..da0b2bbe 100644
--- a/rail/v3/client/t_r_a/station_of_line_api_controller_get_responses.go
+++ b/rail/v3/client/t_r_a/station_of_line_api_controller_get_responses.go
@@ -31,7 +31,7 @@ func (o *StationOfLineAPIControllerGetReader) ReadResponse(response runtime.Clie
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/rail/v3/client/t_r_a/station_transfer_api_controller_get_responses.go b/rail/v3/client/t_r_a/station_transfer_api_controller_get_responses.go
index ed4252ec..7a81a823 100644
--- a/rail/v3/client/t_r_a/station_transfer_api_controller_get_responses.go
+++ b/rail/v3/client/t_r_a/station_transfer_api_controller_get_responses.go
@@ -31,7 +31,7 @@ func (o *StationTransferAPIControllerGetReader) ReadResponse(response runtime.Cl
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/rail/v3/client/t_r_a/train_live_board_api_controller_get1_responses.go b/rail/v3/client/t_r_a/train_live_board_api_controller_get1_responses.go
index 815b9775..7b7136f5 100644
--- a/rail/v3/client/t_r_a/train_live_board_api_controller_get1_responses.go
+++ b/rail/v3/client/t_r_a/train_live_board_api_controller_get1_responses.go
@@ -31,7 +31,7 @@ func (o *TrainLiveBoardAPIControllerGet1Reader) ReadResponse(response runtime.Cl
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/rail/v3/client/t_r_a/train_live_board_api_controller_get_responses.go b/rail/v3/client/t_r_a/train_live_board_api_controller_get_responses.go
index 455effba..7bfc89be 100644
--- a/rail/v3/client/t_r_a/train_live_board_api_controller_get_responses.go
+++ b/rail/v3/client/t_r_a/train_live_board_api_controller_get_responses.go
@@ -31,7 +31,7 @@ func (o *TrainLiveBoardAPIControllerGetReader) ReadResponse(response runtime.Cli
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/rail/v3/client/t_r_a/train_type_api_controller_get_responses.go b/rail/v3/client/t_r_a/train_type_api_controller_get_responses.go
index b9554956..317b108f 100644
--- a/rail/v3/client/t_r_a/train_type_api_controller_get_responses.go
+++ b/rail/v3/client/t_r_a/train_type_api_controller_get_responses.go
@@ -31,7 +31,7 @@ func (o *TrainTypeAPIControllerGetReader) ReadResponse(response runtime.ClientRe
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/rail/v3/models/service_d_t_o_version3_rail_t_r_a_line_transfer.go b/rail/v3/models/service_d_t_o_version3_rail_t_r_a_line_transfer.go
index a73b29fe..2be1ef23 100644
--- a/rail/v3/models/service_d_t_o_version3_rail_t_r_a_line_transfer.go
+++ b/rail/v3/models/service_d_t_o_version3_rail_t_r_a_line_transfer.go
@@ -41,7 +41,7 @@ type ServiceDTOVersion3RailTRALineTransfer struct {
// 轉乘耗時參考時間(分)
// Required: true
- MinTransferTime *int32 `json:"MinTransferTime"`
+ MinTransferTime *float64 `json:"MinTransferTime"`
// 路線間轉乘(迄)之路線代碼
// Required: true
diff --git a/rail/v3/models/service_d_t_o_version3_rail_t_r_a_station_transfer_airport_transfer.go b/rail/v3/models/service_d_t_o_version3_rail_t_r_a_station_transfer_airport_transfer.go
index 7596c018..156f84c5 100644
--- a/rail/v3/models/service_d_t_o_version3_rail_t_r_a_station_transfer_airport_transfer.go
+++ b/rail/v3/models/service_d_t_o_version3_rail_t_r_a_station_transfer_airport_transfer.go
@@ -39,7 +39,7 @@ type ServiceDTOVersion3RailTRAStationTransferAirportTransfer struct {
IsOnSiteTransfer bool `json:"IsOnSiteTransfer,omitempty"`
// 最短轉乘時間
- MinTransferTime int32 `json:"MinTransferTime,omitempty"`
+ MinTransferTime float64 `json:"MinTransferTime,omitempty"`
// 運具種類代碼
// Required: true
diff --git a/rail/v3/models/service_d_t_o_version3_rail_t_r_a_station_transfer_bike_transfer.go b/rail/v3/models/service_d_t_o_version3_rail_t_r_a_station_transfer_bike_transfer.go
index 0fdc32c9..4fd3b514 100644
--- a/rail/v3/models/service_d_t_o_version3_rail_t_r_a_station_transfer_bike_transfer.go
+++ b/rail/v3/models/service_d_t_o_version3_rail_t_r_a_station_transfer_bike_transfer.go
@@ -29,7 +29,7 @@ type ServiceDTOVersion3RailTRAStationTransferBikeTransfer struct {
IsOnSiteTransfer bool `json:"IsOnSiteTransfer,omitempty"`
// 最短轉乘時間
- MinTransferTime int32 `json:"MinTransferTime,omitempty"`
+ MinTransferTime float64 `json:"MinTransferTime,omitempty"`
// 運具種類代碼
// Required: true
diff --git a/rail/v3/models/service_d_t_o_version3_rail_t_r_a_station_transfer_bus_transfer.go b/rail/v3/models/service_d_t_o_version3_rail_t_r_a_station_transfer_bus_transfer.go
index 164d479f..c07f259b 100644
--- a/rail/v3/models/service_d_t_o_version3_rail_t_r_a_station_transfer_bus_transfer.go
+++ b/rail/v3/models/service_d_t_o_version3_rail_t_r_a_station_transfer_bus_transfer.go
@@ -33,7 +33,7 @@ type ServiceDTOVersion3RailTRAStationTransferBusTransfer struct {
IsOnSiteTransfer bool `json:"IsOnSiteTransfer,omitempty"`
// 最短轉乘時間
- MinTransferTime int32 `json:"MinTransferTime,omitempty"`
+ MinTransferTime float64 `json:"MinTransferTime,omitempty"`
// 運具種類代碼
// Required: true
diff --git a/rail/v3/models/service_d_t_o_version3_rail_t_r_a_station_transfer_ferry_transfer.go b/rail/v3/models/service_d_t_o_version3_rail_t_r_a_station_transfer_ferry_transfer.go
index 105dc11c..87f8f3e3 100644
--- a/rail/v3/models/service_d_t_o_version3_rail_t_r_a_station_transfer_ferry_transfer.go
+++ b/rail/v3/models/service_d_t_o_version3_rail_t_r_a_station_transfer_ferry_transfer.go
@@ -38,7 +38,7 @@ type ServiceDTOVersion3RailTRAStationTransferFerryTransfer struct {
IsOnSiteTransfer bool `json:"IsOnSiteTransfer,omitempty"`
// 最短轉乘時間
- MinTransferTime int32 `json:"MinTransferTime,omitempty"`
+ MinTransferTime float64 `json:"MinTransferTime,omitempty"`
// 運具種類代碼
// Required: true
diff --git a/rail/v3/models/service_d_t_o_version3_rail_t_r_a_station_transfer_parking_transfer.go b/rail/v3/models/service_d_t_o_version3_rail_t_r_a_station_transfer_parking_transfer.go
index bf6513da..c69511e4 100644
--- a/rail/v3/models/service_d_t_o_version3_rail_t_r_a_station_transfer_parking_transfer.go
+++ b/rail/v3/models/service_d_t_o_version3_rail_t_r_a_station_transfer_parking_transfer.go
@@ -39,7 +39,7 @@ type ServiceDTOVersion3RailTRAStationTransferParkingTransfer struct {
IsOnSiteTransfer bool `json:"IsOnSiteTransfer,omitempty"`
// 最短轉乘時間
- MinTransferTime int32 `json:"MinTransferTime,omitempty"`
+ MinTransferTime float64 `json:"MinTransferTime,omitempty"`
// 運具種類代碼
// Required: true
diff --git a/rail/v3/models/service_d_t_o_version3_rail_t_r_a_station_transfer_rail_transfer.go b/rail/v3/models/service_d_t_o_version3_rail_t_r_a_station_transfer_rail_transfer.go
index 69513f58..0e18b847 100644
--- a/rail/v3/models/service_d_t_o_version3_rail_t_r_a_station_transfer_rail_transfer.go
+++ b/rail/v3/models/service_d_t_o_version3_rail_t_r_a_station_transfer_rail_transfer.go
@@ -29,7 +29,7 @@ type ServiceDTOVersion3RailTRAStationTransferRailTransfer struct {
IsOnSiteTransfer bool `json:"IsOnSiteTransfer,omitempty"`
// 最短轉乘時間
- MinTransferTime int32 `json:"MinTransferTime,omitempty"`
+ MinTransferTime float64 `json:"MinTransferTime,omitempty"`
// 運具種類代碼
// Required: true
diff --git a/rail/v3/models/service_d_t_o_version3_rail_t_r_a_station_transfer_taxi_transfer.go b/rail/v3/models/service_d_t_o_version3_rail_t_r_a_station_transfer_taxi_transfer.go
index 664722dc..71d1acb7 100644
--- a/rail/v3/models/service_d_t_o_version3_rail_t_r_a_station_transfer_taxi_transfer.go
+++ b/rail/v3/models/service_d_t_o_version3_rail_t_r_a_station_transfer_taxi_transfer.go
@@ -29,7 +29,7 @@ type ServiceDTOVersion3RailTRAStationTransferTaxiTransfer struct {
IsOnSiteTransfer bool `json:"IsOnSiteTransfer,omitempty"`
// 最短轉乘時間
- MinTransferTime int32 `json:"MinTransferTime,omitempty"`
+ MinTransferTime float64 `json:"MinTransferTime,omitempty"`
// 運具種類代碼
// Required: true
diff --git a/ship/v3/client/ship/ship_api_authority_responses.go b/ship/v3/client/ship/ship_api_authority_responses.go
index 1b151fdc..25781864 100644
--- a/ship/v3/client/ship/ship_api_authority_responses.go
+++ b/ship/v3/client/ship/ship_api_authority_responses.go
@@ -31,7 +31,7 @@ func (o *ShipAPIAuthorityReader) ReadResponse(response runtime.ClientResponse, c
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/ship/v3/client/ship/ship_api_general_schedule1_responses.go b/ship/v3/client/ship/ship_api_general_schedule1_responses.go
index c1a1bb89..588e60cf 100644
--- a/ship/v3/client/ship/ship_api_general_schedule1_responses.go
+++ b/ship/v3/client/ship/ship_api_general_schedule1_responses.go
@@ -31,7 +31,7 @@ func (o *ShipAPIGeneralSchedule1Reader) ReadResponse(response runtime.ClientResp
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/ship/v3/client/ship/ship_api_general_schedule_responses.go b/ship/v3/client/ship/ship_api_general_schedule_responses.go
index b1e68252..0d62b92f 100644
--- a/ship/v3/client/ship/ship_api_general_schedule_responses.go
+++ b/ship/v3/client/ship/ship_api_general_schedule_responses.go
@@ -31,7 +31,7 @@ func (o *ShipAPIGeneralScheduleReader) ReadResponse(response runtime.ClientRespo
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/ship/v3/client/ship/ship_api_operator_responses.go b/ship/v3/client/ship/ship_api_operator_responses.go
index 3359b0d7..cbe6f574 100644
--- a/ship/v3/client/ship/ship_api_operator_responses.go
+++ b/ship/v3/client/ship/ship_api_operator_responses.go
@@ -31,7 +31,7 @@ func (o *ShipAPIOperatorReader) ReadResponse(response runtime.ClientResponse, co
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/ship/v3/client/ship/ship_api_port_responses.go b/ship/v3/client/ship/ship_api_port_responses.go
index 71313b70..0f87604f 100644
--- a/ship/v3/client/ship/ship_api_port_responses.go
+++ b/ship/v3/client/ship/ship_api_port_responses.go
@@ -31,7 +31,7 @@ func (o *ShipAPIPortReader) ReadResponse(response runtime.ClientResponse, consum
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/ship/v3/client/ship/ship_api_route1_responses.go b/ship/v3/client/ship/ship_api_route1_responses.go
index 39ff93ea..c19bc183 100644
--- a/ship/v3/client/ship/ship_api_route1_responses.go
+++ b/ship/v3/client/ship/ship_api_route1_responses.go
@@ -31,7 +31,7 @@ func (o *ShipAPIRoute1Reader) ReadResponse(response runtime.ClientResponse, cons
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/ship/v3/client/ship/ship_api_route_fare1_responses.go b/ship/v3/client/ship/ship_api_route_fare1_responses.go
index 78432f41..3cc301af 100644
--- a/ship/v3/client/ship/ship_api_route_fare1_responses.go
+++ b/ship/v3/client/ship/ship_api_route_fare1_responses.go
@@ -31,7 +31,7 @@ func (o *ShipAPIRouteFare1Reader) ReadResponse(response runtime.ClientResponse,
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/ship/v3/client/ship/ship_api_route_fare_responses.go b/ship/v3/client/ship/ship_api_route_fare_responses.go
index aa09da25..e138598b 100644
--- a/ship/v3/client/ship/ship_api_route_fare_responses.go
+++ b/ship/v3/client/ship/ship_api_route_fare_responses.go
@@ -31,7 +31,7 @@ func (o *ShipAPIRouteFareReader) ReadResponse(response runtime.ClientResponse, c
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/ship/v3/client/ship/ship_api_route_responses.go b/ship/v3/client/ship/ship_api_route_responses.go
index 6ce17d66..3bb6c9f7 100644
--- a/ship/v3/client/ship/ship_api_route_responses.go
+++ b/ship/v3/client/ship/ship_api_route_responses.go
@@ -31,7 +31,7 @@ func (o *ShipAPIRouteReader) ReadResponse(response runtime.ClientResponse, consu
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/ship/v3/models/p_t_x_api_ship_model_schedule_wrapper_p_t_x_service_d_t_o_ship_specification_v3_general_schedule.go b/ship/v3/models/p_t_x_api_ship_model_schedule_wrapper_p_t_x_service_d_t_o_ship_specification_v3_general_schedule.go
index e03ab574..528cfa85 100644
--- a/ship/v3/models/p_t_x_api_ship_model_schedule_wrapper_p_t_x_service_d_t_o_ship_specification_v3_general_schedule.go
+++ b/ship/v3/models/p_t_x_api_ship_model_schedule_wrapper_p_t_x_service_d_t_o_ship_specification_v3_general_schedule.go
@@ -40,7 +40,7 @@ type PTXAPIShipModelScheduleWrapperPTXServiceDTOShipSpecificationV3GeneralSchedu
// Array
//
// 資料(陣列)
- Ports []*PTXServiceDTOShipSpecificationV3GeneralSchedule `json:"Ports"`
+ GeneralSchedules []*PTXServiceDTOShipSpecificationV3GeneralSchedule `json:"GeneralSchedules"`
// Int32
//
@@ -64,7 +64,7 @@ type PTXAPIShipModelScheduleWrapperPTXServiceDTOShipSpecificationV3GeneralSchedu
func (m *PTXAPIShipModelScheduleWrapperPTXServiceDTOShipSpecificationV3GeneralSchedule) Validate(formats strfmt.Registry) error {
var res []error
- if err := m.validatePorts(formats); err != nil {
+ if err := m.validateGeneralSchedules(formats); err != nil {
res = append(res, err)
}
@@ -82,21 +82,21 @@ func (m *PTXAPIShipModelScheduleWrapperPTXServiceDTOShipSpecificationV3GeneralSc
return nil
}
-func (m *PTXAPIShipModelScheduleWrapperPTXServiceDTOShipSpecificationV3GeneralSchedule) validatePorts(formats strfmt.Registry) error {
+func (m *PTXAPIShipModelScheduleWrapperPTXServiceDTOShipSpecificationV3GeneralSchedule) validateGeneralSchedules(formats strfmt.Registry) error {
- if swag.IsZero(m.Ports) { // not required
+ if swag.IsZero(m.GeneralSchedules) { // not required
return nil
}
- for i := 0; i < len(m.Ports); i++ {
- if swag.IsZero(m.Ports[i]) { // not required
+ for i := 0; i < len(m.GeneralSchedules); i++ {
+ if swag.IsZero(m.GeneralSchedules[i]) { // not required
continue
}
- if m.Ports[i] != nil {
- if err := m.Ports[i].Validate(formats); err != nil {
+ if m.GeneralSchedules[i] != nil {
+ if err := m.GeneralSchedules[i].Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
- return ve.ValidateName("Ports" + "." + strconv.Itoa(i))
+ return ve.ValidateName("GeneralSchedules" + "." + strconv.Itoa(i))
}
return err
}
diff --git a/ship/v3/models/p_t_x_api_ship_model_ship_wrapper_p_t_x_service_d_t_o_shared_specification_v3_base_authority.go b/ship/v3/models/p_t_x_api_ship_model_ship_wrapper_p_t_x_service_d_t_o_shared_specification_v3_base_authority.go
index 4060901a..ce70bc0a 100644
--- a/ship/v3/models/p_t_x_api_ship_model_ship_wrapper_p_t_x_service_d_t_o_shared_specification_v3_base_authority.go
+++ b/ship/v3/models/p_t_x_api_ship_model_ship_wrapper_p_t_x_service_d_t_o_shared_specification_v3_base_authority.go
@@ -19,6 +19,11 @@ import (
// swagger:model PTX.API.Ship.Model.ShipWrapper[PTX.Service.DTO.Shared.Specification.V3.Base.Authority]
type PTXAPIShipModelShipWrapperPTXServiceDTOSharedSpecificationV3BaseAuthority struct {
+ // Array
+ //
+ // 資料(陣列)
+ Authorities []*PTXServiceDTOSharedSpecificationV3BaseAuthority `json:"Authorities"`
+
// String
//
// 業管機關簡碼
@@ -27,11 +32,6 @@ type PTXAPIShipModelShipWrapperPTXServiceDTOSharedSpecificationV3BaseAuthority s
// 資料總筆數
Count int64 `json:"Count,omitempty"`
- // Array
- //
- // 資料(陣列)
- Ports []*PTXServiceDTOSharedSpecificationV3BaseAuthority `json:"Ports"`
-
// Int32
//
// 本平台資料更新週期(秒)
@@ -54,7 +54,7 @@ type PTXAPIShipModelShipWrapperPTXServiceDTOSharedSpecificationV3BaseAuthority s
func (m *PTXAPIShipModelShipWrapperPTXServiceDTOSharedSpecificationV3BaseAuthority) Validate(formats strfmt.Registry) error {
var res []error
- if err := m.validatePorts(formats); err != nil {
+ if err := m.validateAuthorities(formats); err != nil {
res = append(res, err)
}
@@ -72,21 +72,21 @@ func (m *PTXAPIShipModelShipWrapperPTXServiceDTOSharedSpecificationV3BaseAuthori
return nil
}
-func (m *PTXAPIShipModelShipWrapperPTXServiceDTOSharedSpecificationV3BaseAuthority) validatePorts(formats strfmt.Registry) error {
+func (m *PTXAPIShipModelShipWrapperPTXServiceDTOSharedSpecificationV3BaseAuthority) validateAuthorities(formats strfmt.Registry) error {
- if swag.IsZero(m.Ports) { // not required
+ if swag.IsZero(m.Authorities) { // not required
return nil
}
- for i := 0; i < len(m.Ports); i++ {
- if swag.IsZero(m.Ports[i]) { // not required
+ for i := 0; i < len(m.Authorities); i++ {
+ if swag.IsZero(m.Authorities[i]) { // not required
continue
}
- if m.Ports[i] != nil {
- if err := m.Ports[i].Validate(formats); err != nil {
+ if m.Authorities[i] != nil {
+ if err := m.Authorities[i].Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
- return ve.ValidateName("Ports" + "." + strconv.Itoa(i))
+ return ve.ValidateName("Authorities" + "." + strconv.Itoa(i))
}
return err
}
diff --git a/ship/v3/models/p_t_x_api_ship_model_ship_wrapper_p_t_x_service_d_t_o_ship_specification_v3_operator.go b/ship/v3/models/p_t_x_api_ship_model_ship_wrapper_p_t_x_service_d_t_o_ship_specification_v3_operator.go
index f9243b7c..5a6bec1f 100644
--- a/ship/v3/models/p_t_x_api_ship_model_ship_wrapper_p_t_x_service_d_t_o_ship_specification_v3_operator.go
+++ b/ship/v3/models/p_t_x_api_ship_model_ship_wrapper_p_t_x_service_d_t_o_ship_specification_v3_operator.go
@@ -30,7 +30,7 @@ type PTXAPIShipModelShipWrapperPTXServiceDTOShipSpecificationV3Operator struct {
// Array
//
// 資料(陣列)
- Ports []*PTXServiceDTOShipSpecificationV3Operator `json:"Ports"`
+ Operators []*PTXServiceDTOShipSpecificationV3Operator `json:"Operators"`
// Int32
//
@@ -54,7 +54,7 @@ type PTXAPIShipModelShipWrapperPTXServiceDTOShipSpecificationV3Operator struct {
func (m *PTXAPIShipModelShipWrapperPTXServiceDTOShipSpecificationV3Operator) Validate(formats strfmt.Registry) error {
var res []error
- if err := m.validatePorts(formats); err != nil {
+ if err := m.validateOperators(formats); err != nil {
res = append(res, err)
}
@@ -72,21 +72,21 @@ func (m *PTXAPIShipModelShipWrapperPTXServiceDTOShipSpecificationV3Operator) Val
return nil
}
-func (m *PTXAPIShipModelShipWrapperPTXServiceDTOShipSpecificationV3Operator) validatePorts(formats strfmt.Registry) error {
+func (m *PTXAPIShipModelShipWrapperPTXServiceDTOShipSpecificationV3Operator) validateOperators(formats strfmt.Registry) error {
- if swag.IsZero(m.Ports) { // not required
+ if swag.IsZero(m.Operators) { // not required
return nil
}
- for i := 0; i < len(m.Ports); i++ {
- if swag.IsZero(m.Ports[i]) { // not required
+ for i := 0; i < len(m.Operators); i++ {
+ if swag.IsZero(m.Operators[i]) { // not required
continue
}
- if m.Ports[i] != nil {
- if err := m.Ports[i].Validate(formats); err != nil {
+ if m.Operators[i] != nil {
+ if err := m.Operators[i].Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
- return ve.ValidateName("Ports" + "." + strconv.Itoa(i))
+ return ve.ValidateName("Operators" + "." + strconv.Itoa(i))
}
return err
}
diff --git a/ship/v3/models/p_t_x_api_ship_model_ship_wrapper_p_t_x_service_d_t_o_ship_specification_v3_route.go b/ship/v3/models/p_t_x_api_ship_model_ship_wrapper_p_t_x_service_d_t_o_ship_specification_v3_route.go
index b0a5f48f..b4d6053a 100644
--- a/ship/v3/models/p_t_x_api_ship_model_ship_wrapper_p_t_x_service_d_t_o_ship_specification_v3_route.go
+++ b/ship/v3/models/p_t_x_api_ship_model_ship_wrapper_p_t_x_service_d_t_o_ship_specification_v3_route.go
@@ -30,7 +30,7 @@ type PTXAPIShipModelShipWrapperPTXServiceDTOShipSpecificationV3Route struct {
// Array
//
// 資料(陣列)
- Ports []*PTXServiceDTOShipSpecificationV3Route `json:"Ports"`
+ Routes []*PTXServiceDTOShipSpecificationV3Route `json:"Routes"`
// Int32
//
@@ -54,7 +54,7 @@ type PTXAPIShipModelShipWrapperPTXServiceDTOShipSpecificationV3Route struct {
func (m *PTXAPIShipModelShipWrapperPTXServiceDTOShipSpecificationV3Route) Validate(formats strfmt.Registry) error {
var res []error
- if err := m.validatePorts(formats); err != nil {
+ if err := m.validateRoutes(formats); err != nil {
res = append(res, err)
}
@@ -72,21 +72,21 @@ func (m *PTXAPIShipModelShipWrapperPTXServiceDTOShipSpecificationV3Route) Valida
return nil
}
-func (m *PTXAPIShipModelShipWrapperPTXServiceDTOShipSpecificationV3Route) validatePorts(formats strfmt.Registry) error {
+func (m *PTXAPIShipModelShipWrapperPTXServiceDTOShipSpecificationV3Route) validateRoutes(formats strfmt.Registry) error {
- if swag.IsZero(m.Ports) { // not required
+ if swag.IsZero(m.Routes) { // not required
return nil
}
- for i := 0; i < len(m.Ports); i++ {
- if swag.IsZero(m.Ports[i]) { // not required
+ for i := 0; i < len(m.Routes); i++ {
+ if swag.IsZero(m.Routes[i]) { // not required
continue
}
- if m.Ports[i] != nil {
- if err := m.Ports[i].Validate(formats); err != nil {
+ if m.Routes[i] != nil {
+ if err := m.Routes[i].Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
- return ve.ValidateName("Ports" + "." + strconv.Itoa(i))
+ return ve.ValidateName("Routes" + "." + strconv.Itoa(i))
}
return err
}
diff --git a/ship/v3/models/p_t_x_api_ship_model_ship_wrapper_p_t_x_service_d_t_o_ship_specification_v3_route_fare.go b/ship/v3/models/p_t_x_api_ship_model_ship_wrapper_p_t_x_service_d_t_o_ship_specification_v3_route_fare.go
index 67bb59ef..f5e893c7 100644
--- a/ship/v3/models/p_t_x_api_ship_model_ship_wrapper_p_t_x_service_d_t_o_ship_specification_v3_route_fare.go
+++ b/ship/v3/models/p_t_x_api_ship_model_ship_wrapper_p_t_x_service_d_t_o_ship_specification_v3_route_fare.go
@@ -30,7 +30,7 @@ type PTXAPIShipModelShipWrapperPTXServiceDTOShipSpecificationV3RouteFare struct
// Array
//
// 資料(陣列)
- Ports []*PTXServiceDTOShipSpecificationV3RouteFare `json:"Ports"`
+ RouteFares []*PTXServiceDTOShipSpecificationV3RouteFare `json:"RouteFares"`
// Int32
//
@@ -54,7 +54,7 @@ type PTXAPIShipModelShipWrapperPTXServiceDTOShipSpecificationV3RouteFare struct
func (m *PTXAPIShipModelShipWrapperPTXServiceDTOShipSpecificationV3RouteFare) Validate(formats strfmt.Registry) error {
var res []error
- if err := m.validatePorts(formats); err != nil {
+ if err := m.validateRouteFares(formats); err != nil {
res = append(res, err)
}
@@ -72,21 +72,21 @@ func (m *PTXAPIShipModelShipWrapperPTXServiceDTOShipSpecificationV3RouteFare) Va
return nil
}
-func (m *PTXAPIShipModelShipWrapperPTXServiceDTOShipSpecificationV3RouteFare) validatePorts(formats strfmt.Registry) error {
+func (m *PTXAPIShipModelShipWrapperPTXServiceDTOShipSpecificationV3RouteFare) validateRouteFares(formats strfmt.Registry) error {
- if swag.IsZero(m.Ports) { // not required
+ if swag.IsZero(m.RouteFares) { // not required
return nil
}
- for i := 0; i < len(m.Ports); i++ {
- if swag.IsZero(m.Ports[i]) { // not required
+ for i := 0; i < len(m.RouteFares); i++ {
+ if swag.IsZero(m.RouteFares[i]) { // not required
continue
}
- if m.Ports[i] != nil {
- if err := m.Ports[i].Validate(formats); err != nil {
+ if m.RouteFares[i] != nil {
+ if err := m.RouteFares[i].Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
- return ve.ValidateName("Ports" + "." + strconv.Itoa(i))
+ return ve.ValidateName("RouteFares" + "." + strconv.Itoa(i))
}
return err
}
diff --git a/ship/v3/models/p_t_x_service_d_t_o_shared_specification_v3_base_authority.go b/ship/v3/models/p_t_x_service_d_t_o_shared_specification_v3_base_authority.go
index 510ae90f..2e4a6e56 100644
--- a/ship/v3/models/p_t_x_service_d_t_o_shared_specification_v3_base_authority.go
+++ b/ship/v3/models/p_t_x_service_d_t_o_shared_specification_v3_base_authority.go
@@ -37,11 +37,6 @@ type PTXServiceDTOSharedSpecificationV3BaseAuthority struct {
// Required: true
AuthorityEmail *string `json:"AuthorityEmail"`
- // String
- //
- // 業管機關代號
- AuthorityID string `json:"AuthorityID,omitempty"`
-
// NameType
//
// 業管機關名稱
@@ -67,52 +62,11 @@ type PTXServiceDTOSharedSpecificationV3BaseAuthority struct {
// 業管機關官網網址
AuthorityURL string `json:"AuthorityUrl,omitempty"`
- // Int32
- //
- // 對應至程式所定義之Enum
- EnumID int32 `json:"EnumID,omitempty"`
-
- // Boolean
- //
- // 是否為航空資料之權責單位
- IsAirDataAuth bool `json:"IsAirDataAuth,omitempty"`
-
- // Boolean
- //
- // 是否為自行車資料之權責單位
- IsBikeDataAuth bool `json:"IsBikeDataAuth,omitempty"`
-
- // Boolean
- //
- // 是否為公車資料之權責單位
- IsBusDataAuth bool `json:"IsBusDataAuth,omitempty"`
-
- // Boolean
- //
- // 是否為軌道資料之權責單位
- IsRailDataAuth bool `json:"IsRailDataAuth,omitempty"`
-
- // Boolean
- //
- // 是否為航運資料之權責單位
- IsShipDataAuth bool `json:"IsShipDataAuth,omitempty"`
-
- // Boolean
- //
- // 是否為觀光資料之權責單位
- IsTourismDataAuth bool `json:"IsTourismDataAuth,omitempty"`
-
// String
//
// 業管機關Logo網址
LogoURL string `json:"LogoURL,omitempty"`
- // Guid
- //
- // 資料唯一碼
- // Format: uuid
- PKBaseAuthority strfmt.UUID `json:"PK_BaseAuthority,omitempty"`
-
// DateTime
//
// 資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)
@@ -148,10 +102,6 @@ func (m *PTXServiceDTOSharedSpecificationV3BaseAuthority) Validate(formats strfm
res = append(res, err)
}
- if err := m.validatePKBaseAuthority(formats); err != nil {
- res = append(res, err)
- }
-
if err := m.validateUpdateTime(formats); err != nil {
res = append(res, err)
}
@@ -212,19 +162,6 @@ func (m *PTXServiceDTOSharedSpecificationV3BaseAuthority) validateAuthorityPhone
return nil
}
-func (m *PTXServiceDTOSharedSpecificationV3BaseAuthority) validatePKBaseAuthority(formats strfmt.Registry) error {
-
- if swag.IsZero(m.PKBaseAuthority) { // not required
- return nil
- }
-
- if err := validate.FormatOf("PK_BaseAuthority", "body", "uuid", m.PKBaseAuthority.String(), formats); err != nil {
- return err
- }
-
- return nil
-}
-
func (m *PTXServiceDTOSharedSpecificationV3BaseAuthority) validateUpdateTime(formats strfmt.Registry) error {
if err := validate.Required("UpdateTime", "body", m.UpdateTime); err != nil {
diff --git a/spec/main.go b/spec/main.go
index 6455b601..ffdef2aa 100644
--- a/spec/main.go
+++ b/spec/main.go
@@ -29,6 +29,9 @@ func main() {
{
Filename: "oas.rail.v2.json",
URL: "https://ptx.transportdata.tw/MOTC/v2/Rail/api-docs/oas",
+ Pipeline: []Step{
+ fixNotDefinedProperty,
+ },
},
{
Filename: "oas.rail.v3.json",
@@ -101,3 +104,12 @@ func fixProperty(data []byte) []byte {
},
"Ports": {`), -1)
}
+
+// see https://github.com/minchao/go-ptx/issues/27
+func fixNotDefinedProperty(data []byte) []byte {
+ return bytes.Replace(data,
+ []byte(`"EndingStationName","StopStations","SrcUpdateTime","UpdateTime"`),
+ []byte(`"EndingStationName","StopStations"`),
+ 1,
+ )
+}
diff --git a/tourism/v2/client/tourism/taiwan_trip_bus_api_estimated_time_of_arrival1_responses.go b/tourism/v2/client/tourism/taiwan_trip_bus_api_estimated_time_of_arrival1_responses.go
index 41db797a..ea136e40 100644
--- a/tourism/v2/client/tourism/taiwan_trip_bus_api_estimated_time_of_arrival1_responses.go
+++ b/tourism/v2/client/tourism/taiwan_trip_bus_api_estimated_time_of_arrival1_responses.go
@@ -31,7 +31,7 @@ func (o *TaiwanTripBusAPIEstimatedTimeOfArrival1Reader) ReadResponse(response ru
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/tourism/v2/client/tourism/taiwan_trip_bus_api_estimated_time_of_arrival_responses.go b/tourism/v2/client/tourism/taiwan_trip_bus_api_estimated_time_of_arrival_responses.go
index 0b7e1c4e..92e6fdb5 100644
--- a/tourism/v2/client/tourism/taiwan_trip_bus_api_estimated_time_of_arrival_responses.go
+++ b/tourism/v2/client/tourism/taiwan_trip_bus_api_estimated_time_of_arrival_responses.go
@@ -31,7 +31,7 @@ func (o *TaiwanTripBusAPIEstimatedTimeOfArrivalReader) ReadResponse(response run
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/tourism/v2/client/tourism/taiwan_trip_bus_api_news_responses.go b/tourism/v2/client/tourism/taiwan_trip_bus_api_news_responses.go
index 4e1939c4..3a883b13 100644
--- a/tourism/v2/client/tourism/taiwan_trip_bus_api_news_responses.go
+++ b/tourism/v2/client/tourism/taiwan_trip_bus_api_news_responses.go
@@ -31,7 +31,7 @@ func (o *TaiwanTripBusAPINewsReader) ReadResponse(response runtime.ClientRespons
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/tourism/v2/client/tourism/taiwan_trip_bus_api_real_time_by_frequency1_responses.go b/tourism/v2/client/tourism/taiwan_trip_bus_api_real_time_by_frequency1_responses.go
index f23afd5c..4b816fbf 100644
--- a/tourism/v2/client/tourism/taiwan_trip_bus_api_real_time_by_frequency1_responses.go
+++ b/tourism/v2/client/tourism/taiwan_trip_bus_api_real_time_by_frequency1_responses.go
@@ -31,7 +31,7 @@ func (o *TaiwanTripBusAPIRealTimeByFrequency1Reader) ReadResponse(response runti
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/tourism/v2/client/tourism/taiwan_trip_bus_api_real_time_by_frequency_responses.go b/tourism/v2/client/tourism/taiwan_trip_bus_api_real_time_by_frequency_responses.go
index 54d5685e..8ef2590f 100644
--- a/tourism/v2/client/tourism/taiwan_trip_bus_api_real_time_by_frequency_responses.go
+++ b/tourism/v2/client/tourism/taiwan_trip_bus_api_real_time_by_frequency_responses.go
@@ -31,7 +31,7 @@ func (o *TaiwanTripBusAPIRealTimeByFrequencyReader) ReadResponse(response runtim
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/tourism/v2/client/tourism/taiwan_trip_bus_api_real_time_near_stop1_responses.go b/tourism/v2/client/tourism/taiwan_trip_bus_api_real_time_near_stop1_responses.go
index 4b747bd1..6d87ec16 100644
--- a/tourism/v2/client/tourism/taiwan_trip_bus_api_real_time_near_stop1_responses.go
+++ b/tourism/v2/client/tourism/taiwan_trip_bus_api_real_time_near_stop1_responses.go
@@ -31,7 +31,7 @@ func (o *TaiwanTripBusAPIRealTimeNearStop1Reader) ReadResponse(response runtime.
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/tourism/v2/client/tourism/taiwan_trip_bus_api_real_time_near_stop_responses.go b/tourism/v2/client/tourism/taiwan_trip_bus_api_real_time_near_stop_responses.go
index 615e645b..ad305349 100644
--- a/tourism/v2/client/tourism/taiwan_trip_bus_api_real_time_near_stop_responses.go
+++ b/tourism/v2/client/tourism/taiwan_trip_bus_api_real_time_near_stop_responses.go
@@ -31,7 +31,7 @@ func (o *TaiwanTripBusAPIRealTimeNearStopReader) ReadResponse(response runtime.C
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/tourism/v2/client/tourism/taiwan_trip_bus_api_route1_responses.go b/tourism/v2/client/tourism/taiwan_trip_bus_api_route1_responses.go
index 35960f17..5643d744 100644
--- a/tourism/v2/client/tourism/taiwan_trip_bus_api_route1_responses.go
+++ b/tourism/v2/client/tourism/taiwan_trip_bus_api_route1_responses.go
@@ -31,7 +31,7 @@ func (o *TaiwanTripBusAPIRoute1Reader) ReadResponse(response runtime.ClientRespo
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/tourism/v2/client/tourism/taiwan_trip_bus_api_route_responses.go b/tourism/v2/client/tourism/taiwan_trip_bus_api_route_responses.go
index 34775923..e57119fb 100644
--- a/tourism/v2/client/tourism/taiwan_trip_bus_api_route_responses.go
+++ b/tourism/v2/client/tourism/taiwan_trip_bus_api_route_responses.go
@@ -31,7 +31,7 @@ func (o *TaiwanTripBusAPIRouteReader) ReadResponse(response runtime.ClientRespon
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/tourism/v2/client/tourism/taiwan_trip_bus_api_s2_travel_time_responses.go b/tourism/v2/client/tourism/taiwan_trip_bus_api_s2_travel_time_responses.go
index eafbb09c..d01dc26e 100644
--- a/tourism/v2/client/tourism/taiwan_trip_bus_api_s2_travel_time_responses.go
+++ b/tourism/v2/client/tourism/taiwan_trip_bus_api_s2_travel_time_responses.go
@@ -31,7 +31,7 @@ func (o *TaiwanTripBusAPIS2TravelTimeReader) ReadResponse(response runtime.Clien
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/tourism/v2/client/tourism/taiwan_trip_bus_api_schedule1_responses.go b/tourism/v2/client/tourism/taiwan_trip_bus_api_schedule1_responses.go
index 3606fba8..cb0e27ab 100644
--- a/tourism/v2/client/tourism/taiwan_trip_bus_api_schedule1_responses.go
+++ b/tourism/v2/client/tourism/taiwan_trip_bus_api_schedule1_responses.go
@@ -31,7 +31,7 @@ func (o *TaiwanTripBusAPISchedule1Reader) ReadResponse(response runtime.ClientRe
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/tourism/v2/client/tourism/taiwan_trip_bus_api_schedule_responses.go b/tourism/v2/client/tourism/taiwan_trip_bus_api_schedule_responses.go
index d01e3a2f..a6b9a57b 100644
--- a/tourism/v2/client/tourism/taiwan_trip_bus_api_schedule_responses.go
+++ b/tourism/v2/client/tourism/taiwan_trip_bus_api_schedule_responses.go
@@ -31,7 +31,7 @@ func (o *TaiwanTripBusAPIScheduleReader) ReadResponse(response runtime.ClientRes
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/tourism/v2/client/tourism/taiwan_trip_bus_api_shape1_responses.go b/tourism/v2/client/tourism/taiwan_trip_bus_api_shape1_responses.go
index 01c416b6..400f27f3 100644
--- a/tourism/v2/client/tourism/taiwan_trip_bus_api_shape1_responses.go
+++ b/tourism/v2/client/tourism/taiwan_trip_bus_api_shape1_responses.go
@@ -31,7 +31,7 @@ func (o *TaiwanTripBusAPIShape1Reader) ReadResponse(response runtime.ClientRespo
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/tourism/v2/client/tourism/taiwan_trip_bus_api_shape_responses.go b/tourism/v2/client/tourism/taiwan_trip_bus_api_shape_responses.go
index 6193d5d0..8a5b7ed9 100644
--- a/tourism/v2/client/tourism/taiwan_trip_bus_api_shape_responses.go
+++ b/tourism/v2/client/tourism/taiwan_trip_bus_api_shape_responses.go
@@ -31,7 +31,7 @@ func (o *TaiwanTripBusAPIShapeReader) ReadResponse(response runtime.ClientRespon
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/tourism/v2/client/tourism/taiwan_trip_bus_api_stop_of_route1_responses.go b/tourism/v2/client/tourism/taiwan_trip_bus_api_stop_of_route1_responses.go
index aa6a5cff..93f97961 100644
--- a/tourism/v2/client/tourism/taiwan_trip_bus_api_stop_of_route1_responses.go
+++ b/tourism/v2/client/tourism/taiwan_trip_bus_api_stop_of_route1_responses.go
@@ -31,7 +31,7 @@ func (o *TaiwanTripBusAPIStopOfRoute1Reader) ReadResponse(response runtime.Clien
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/tourism/v2/client/tourism/taiwan_trip_bus_api_stop_of_route_responses.go b/tourism/v2/client/tourism/taiwan_trip_bus_api_stop_of_route_responses.go
index 73f6ee7e..757579ea 100644
--- a/tourism/v2/client/tourism/taiwan_trip_bus_api_stop_of_route_responses.go
+++ b/tourism/v2/client/tourism/taiwan_trip_bus_api_stop_of_route_responses.go
@@ -31,7 +31,7 @@ func (o *TaiwanTripBusAPIStopOfRouteReader) ReadResponse(response runtime.Client
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/tourism/v2/client/tourism/tourism_api_activity0_responses.go b/tourism/v2/client/tourism/tourism_api_activity0_responses.go
index 23df73a3..829b23d6 100644
--- a/tourism/v2/client/tourism/tourism_api_activity0_responses.go
+++ b/tourism/v2/client/tourism/tourism_api_activity0_responses.go
@@ -31,7 +31,7 @@ func (o *TourismAPIActivity0Reader) ReadResponse(response runtime.ClientResponse
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/tourism/v2/client/tourism/tourism_api_activity_responses.go b/tourism/v2/client/tourism/tourism_api_activity_responses.go
index b53abe72..bbdfb86a 100644
--- a/tourism/v2/client/tourism/tourism_api_activity_responses.go
+++ b/tourism/v2/client/tourism/tourism_api_activity_responses.go
@@ -31,7 +31,7 @@ func (o *TourismAPIActivityReader) ReadResponse(response runtime.ClientResponse,
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/tourism/v2/client/tourism/tourism_api_hotel0_responses.go b/tourism/v2/client/tourism/tourism_api_hotel0_responses.go
index f0322683..23360854 100644
--- a/tourism/v2/client/tourism/tourism_api_hotel0_responses.go
+++ b/tourism/v2/client/tourism/tourism_api_hotel0_responses.go
@@ -31,7 +31,7 @@ func (o *TourismAPIHotel0Reader) ReadResponse(response runtime.ClientResponse, c
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/tourism/v2/client/tourism/tourism_api_hotel_responses.go b/tourism/v2/client/tourism/tourism_api_hotel_responses.go
index bb68e625..07905f66 100644
--- a/tourism/v2/client/tourism/tourism_api_hotel_responses.go
+++ b/tourism/v2/client/tourism/tourism_api_hotel_responses.go
@@ -31,7 +31,7 @@ func (o *TourismAPIHotelReader) ReadResponse(response runtime.ClientResponse, co
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/tourism/v2/client/tourism/tourism_api_restaurant0_responses.go b/tourism/v2/client/tourism/tourism_api_restaurant0_responses.go
index ccb99f98..fce5bcdb 100644
--- a/tourism/v2/client/tourism/tourism_api_restaurant0_responses.go
+++ b/tourism/v2/client/tourism/tourism_api_restaurant0_responses.go
@@ -31,7 +31,7 @@ func (o *TourismAPIRestaurant0Reader) ReadResponse(response runtime.ClientRespon
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/tourism/v2/client/tourism/tourism_api_restaurant_responses.go b/tourism/v2/client/tourism/tourism_api_restaurant_responses.go
index 24cfccc3..3d686e99 100644
--- a/tourism/v2/client/tourism/tourism_api_restaurant_responses.go
+++ b/tourism/v2/client/tourism/tourism_api_restaurant_responses.go
@@ -31,7 +31,7 @@ func (o *TourismAPIRestaurantReader) ReadResponse(response runtime.ClientRespons
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/tourism/v2/client/tourism/tourism_api_scenic_spot0_responses.go b/tourism/v2/client/tourism/tourism_api_scenic_spot0_responses.go
index 6329c075..0a3532cb 100644
--- a/tourism/v2/client/tourism/tourism_api_scenic_spot0_responses.go
+++ b/tourism/v2/client/tourism/tourism_api_scenic_spot0_responses.go
@@ -31,7 +31,7 @@ func (o *TourismAPIScenicSpot0Reader) ReadResponse(response runtime.ClientRespon
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/tourism/v2/client/tourism/tourism_api_scenic_spot_responses.go b/tourism/v2/client/tourism/tourism_api_scenic_spot_responses.go
index 6cbeaaef..58bcfe7d 100644
--- a/tourism/v2/client/tourism/tourism_api_scenic_spot_responses.go
+++ b/tourism/v2/client/tourism/tourism_api_scenic_spot_responses.go
@@ -31,7 +31,7 @@ func (o *TourismAPIScenicSpotReader) ReadResponse(response runtime.ClientRespons
return result, nil
default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
diff --git a/tourism/v2/models/service_d_t_o_version2_bus_stop.go b/tourism/v2/models/service_d_t_o_version2_bus_stop.go
index af202d2f..ceeff00a 100644
--- a/tourism/v2/models/service_d_t_o_version2_bus_stop.go
+++ b/tourism/v2/models/service_d_t_o_version2_bus_stop.go
@@ -29,10 +29,6 @@ type ServiceDTOVersion2BusStop struct {
// 站牌所屬的站位ID
StationID string `json:"StationID,omitempty"`
- // 站牌所屬的站名碼ID
- // Required: true
- StationNameID *string `json:"StationNameID"`
-
// integer
//
// 上下車站別 : [-1:'可下車',0:'可上下車',1:'可上車']
@@ -71,10 +67,6 @@ func (m *ServiceDTOVersion2BusStop) Validate(formats strfmt.Registry) error {
res = append(res, err)
}
- if err := m.validateStationNameID(formats); err != nil {
- res = append(res, err)
- }
-
if err := m.validateStopID(formats); err != nil {
res = append(res, err)
}
@@ -110,15 +102,6 @@ func (m *ServiceDTOVersion2BusStop) validateStationGroupID(formats strfmt.Regist
return nil
}
-func (m *ServiceDTOVersion2BusStop) validateStationNameID(formats strfmt.Registry) error {
-
- if err := validate.Required("StationNameID", "body", m.StationNameID); err != nil {
- return err
- }
-
- return nil
-}
-
func (m *ServiceDTOVersion2BusStop) validateStopID(formats strfmt.Registry) error {
if err := validate.Required("StopID", "body", m.StopID); err != nil {