From 7d81e8a41be5607616a6cc3779ee77b3ce6dac1e Mon Sep 17 00:00:00 2001 From: bot <73154172+code-automation@users.noreply.github.com> Date: Sat, 27 Feb 2021 13:01:15 +0800 Subject: [PATCH] chore(api): openapi specifications update (#58) Co-authored-by: minchao --- .../city_bus/city_bus_api_alert_parameters.go | 34 - .../city_bus/city_bus_api_alert_responses.go | 16 +- bus/v2/client/city_bus/city_bus_client.go | 43 + .../inter_city_bus_api_alert_parameters.go | 372 +++++ .../inter_city_bus_api_alert_responses.go | 130 ++ .../inter_city_bus/inter_city_bus_client.go | 43 + ...ce_d_t_o_bus_specification_v2_bus_alert.go | 206 +++ ...ice_d_t_o_bus_specification_v2_bus_news.go | 26 +- ..._d_t_o_bus_specification_v2_bus_station.go | 5 + ...ervice_d_t_o_bus_specification_v2_scope.go | 391 +++++ ...t_o_bus_specification_v2_scope_operator.go | 93 ++ ..._d_t_o_bus_specification_v2_scope_route.go | 98 ++ ..._t_o_bus_specification_v2_scope_station.go | 93 ++ ...e_d_t_o_bus_specification_v2_scope_stop.go | 98 ++ ..._o_bus_specification_v2_scope_sub_route.go | 98 ++ ...e_d_t_o_bus_specification_v2_scope_trip.go | 74 + .../city_bus_api_alert1_parameters.go | 428 +++++ .../city_bus/city_bus_api_alert1_responses.go | 132 ++ bus/v3/client/city_bus/city_bus_client.go | 16 +- go.sum | 2 + oas.bike.v2.json | 58 +- oas.bus.v2.json | 1471 ++++++++++++----- oas.bus.v3.json | 2 +- oas.rail.v2.json | 84 +- oas.tourism.v2.json | 128 +- 25 files changed, 3499 insertions(+), 642 deletions(-) rename bus/{v3 => v2}/client/city_bus/city_bus_api_alert_parameters.go (92%) rename bus/{v3 => v2}/client/city_bus/city_bus_api_alert_responses.go (85%) create mode 100644 bus/v2/client/inter_city_bus/inter_city_bus_api_alert_parameters.go create mode 100644 bus/v2/client/inter_city_bus/inter_city_bus_api_alert_responses.go create mode 100644 bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_bus_alert.go create mode 100644 bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_scope.go create mode 100644 bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_scope_operator.go create mode 100644 bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_scope_route.go create mode 100644 bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_scope_station.go create mode 100644 bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_scope_stop.go create mode 100644 bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_scope_sub_route.go create mode 100644 bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_scope_trip.go create mode 100644 bus/v3/client/city_bus/city_bus_api_alert1_parameters.go create mode 100644 bus/v3/client/city_bus/city_bus_api_alert1_responses.go diff --git a/bus/v3/client/city_bus/city_bus_api_alert_parameters.go b/bus/v2/client/city_bus/city_bus_api_alert_parameters.go similarity index 92% rename from bus/v3/client/city_bus/city_bus_api_alert_parameters.go rename to bus/v2/client/city_bus/city_bus_api_alert_parameters.go index 4adf9b19..c0a8a673 100644 --- a/bus/v3/client/city_bus/city_bus_api_alert_parameters.go +++ b/bus/v2/client/city_bus/city_bus_api_alert_parameters.go @@ -60,12 +60,6 @@ func NewCityBusAPIAlertParamsWithHTTPClient(client *http.Client) *CityBusAPIAler */ type CityBusAPIAlertParams struct { - /* DollarCount. - - 查詢數量 - */ - DollarCount *bool - /* DollarFilter. 過濾 @@ -180,17 +174,6 @@ func (o *CityBusAPIAlertParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } -// WithDollarCount adds the dollarCount to the city bus Api alert params -func (o *CityBusAPIAlertParams) WithDollarCount(dollarCount *bool) *CityBusAPIAlertParams { - o.SetDollarCount(dollarCount) - return o -} - -// SetDollarCount adds the dollarCount to the city bus Api alert params -func (o *CityBusAPIAlertParams) SetDollarCount(dollarCount *bool) { - o.DollarCount = dollarCount -} - // WithDollarFilter adds the dollarFilter to the city bus Api alert params func (o *CityBusAPIAlertParams) WithDollarFilter(dollarFilter *string) *CityBusAPIAlertParams { o.SetDollarFilter(dollarFilter) @@ -287,23 +270,6 @@ func (o *CityBusAPIAlertParams) WriteToRequest(r runtime.ClientRequest, reg strf } var res []error - if o.DollarCount != nil { - - // query param $count - var qrDollarCount bool - - if o.DollarCount != nil { - qrDollarCount = *o.DollarCount - } - qDollarCount := swag.FormatBool(qrDollarCount) - if qDollarCount != "" { - - if err := r.SetQueryParam("$count", qDollarCount); err != nil { - return err - } - } - } - if o.DollarFilter != nil { // query param $filter diff --git a/bus/v3/client/city_bus/city_bus_api_alert_responses.go b/bus/v2/client/city_bus/city_bus_api_alert_responses.go similarity index 85% rename from bus/v3/client/city_bus/city_bus_api_alert_responses.go rename to bus/v2/client/city_bus/city_bus_api_alert_responses.go index 9a621207..bfca1afa 100644 --- a/bus/v3/client/city_bus/city_bus_api_alert_responses.go +++ b/bus/v2/client/city_bus/city_bus_api_alert_responses.go @@ -12,7 +12,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/strfmt" - "github.com/minchao/go-ptx/bus/v3/models" + "github.com/minchao/go-ptx/bus/v2/models" ) // CityBusAPIAlertReader is a Reader for the CityBusAPIAlert structure. @@ -56,22 +56,20 @@ func NewCityBusAPIAlertOK() *CityBusAPIAlertOK { Success */ type CityBusAPIAlertOK struct { - Payload *models.PTXServiceDTOBusSpecificationV3WrapperBusWrapperPTXServiceDTOBusSpecificationV3Alert + Payload []*models.PTXServiceDTOBusSpecificationV2BusAlert } func (o *CityBusAPIAlertOK) Error() string { - return fmt.Sprintf("[GET /v3/Bus/Alert/City/{City}][%d] cityBusApiAlertOK %+v", 200, o.Payload) + return fmt.Sprintf("[GET /v2/Bus/Alert/City/{City}][%d] cityBusApiAlertOK %+v", 200, o.Payload) } -func (o *CityBusAPIAlertOK) GetPayload() *models.PTXServiceDTOBusSpecificationV3WrapperBusWrapperPTXServiceDTOBusSpecificationV3Alert { +func (o *CityBusAPIAlertOK) GetPayload() []*models.PTXServiceDTOBusSpecificationV2BusAlert { return o.Payload } func (o *CityBusAPIAlertOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(models.PTXServiceDTOBusSpecificationV3WrapperBusWrapperPTXServiceDTOBusSpecificationV3Alert) - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err } @@ -92,7 +90,7 @@ type CityBusAPIAlertStatus299 struct { } func (o *CityBusAPIAlertStatus299) Error() string { - return fmt.Sprintf("[GET /v3/Bus/Alert/City/{City}][%d] cityBusApiAlertStatus299 %+v", 299, o.Payload) + return fmt.Sprintf("[GET /v2/Bus/Alert/City/{City}][%d] cityBusApiAlertStatus299 %+v", 299, o.Payload) } func (o *CityBusAPIAlertStatus299) GetPayload() *models.PTXServiceDTOSharedSpecificationV3BaseDisplayHealth { return o.Payload @@ -123,7 +121,7 @@ type CityBusAPIAlertNotModified struct { } func (o *CityBusAPIAlertNotModified) Error() string { - return fmt.Sprintf("[GET /v3/Bus/Alert/City/{City}][%d] cityBusApiAlertNotModified ", 304) + return fmt.Sprintf("[GET /v2/Bus/Alert/City/{City}][%d] cityBusApiAlertNotModified ", 304) } func (o *CityBusAPIAlertNotModified) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { diff --git a/bus/v2/client/city_bus/city_bus_client.go b/bus/v2/client/city_bus/city_bus_client.go index 7702667f..3ee90a50 100644 --- a/bus/v2/client/city_bus/city_bus_client.go +++ b/bus/v2/client/city_bus/city_bus_client.go @@ -30,6 +30,8 @@ type ClientOption func(*runtime.ClientOperation) // ClientService is the interface for Client methods type ClientService interface { + CityBusAPIAlert(params *CityBusAPIAlertParams, opts ...ClientOption) (*CityBusAPIAlertOK, *CityBusAPIAlertStatus299, error) + CityBusAPIDataVersion(params *CityBusAPIDataVersionParams, opts ...ClientOption) (*CityBusAPIDataVersionOK, *CityBusAPIDataVersionStatus299, error) CityBusAPIDisplayStopOfRoute(params *CityBusAPIDisplayStopOfRouteParams, opts ...ClientOption) (*CityBusAPIDisplayStopOfRouteOK, *CityBusAPIDisplayStopOfRouteStatus299, error) @@ -101,6 +103,47 @@ type ClientService interface { SetTransport(transport runtime.ClientTransport) } +/* + CityBusAPIAlert 取得指定s 縣市 的市區公車營運通阻資料 + + 市區公車營運通阻資料 +*/ +func (a *Client) CityBusAPIAlert(params *CityBusAPIAlertParams, opts ...ClientOption) (*CityBusAPIAlertOK, *CityBusAPIAlertStatus299, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewCityBusAPIAlertParams() + } + op := &runtime.ClientOperation{ + ID: "CityBusApi_Alert", + Method: "GET", + PathPattern: "/v2/Bus/Alert/City/{City}", + ProducesMediaTypes: []string{"application/json", "application/xml"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &CityBusAPIAlertReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, nil, err + } + switch value := result.(type) { + case *CityBusAPIAlertOK: + return value, nil, nil + case *CityBusAPIAlertStatus299: + 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) +} + /* CityBusAPIDataVersion 取得指定s 縣市 目前資料的最新版本資訊 diff --git a/bus/v2/client/inter_city_bus/inter_city_bus_api_alert_parameters.go b/bus/v2/client/inter_city_bus/inter_city_bus_api_alert_parameters.go new file mode 100644 index 00000000..9b5fede5 --- /dev/null +++ b/bus/v2/client/inter_city_bus/inter_city_bus_api_alert_parameters.go @@ -0,0 +1,372 @@ +// 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" +) + +// NewInterCityBusAPIAlertParams creates a new InterCityBusAPIAlertParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewInterCityBusAPIAlertParams() *InterCityBusAPIAlertParams { + return &InterCityBusAPIAlertParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewInterCityBusAPIAlertParamsWithTimeout creates a new InterCityBusAPIAlertParams object +// with the ability to set a timeout on a request. +func NewInterCityBusAPIAlertParamsWithTimeout(timeout time.Duration) *InterCityBusAPIAlertParams { + return &InterCityBusAPIAlertParams{ + timeout: timeout, + } +} + +// NewInterCityBusAPIAlertParamsWithContext creates a new InterCityBusAPIAlertParams object +// with the ability to set a context for a request. +func NewInterCityBusAPIAlertParamsWithContext(ctx context.Context) *InterCityBusAPIAlertParams { + return &InterCityBusAPIAlertParams{ + Context: ctx, + } +} + +// NewInterCityBusAPIAlertParamsWithHTTPClient creates a new InterCityBusAPIAlertParams object +// with the ability to set a custom HTTPClient for a request. +func NewInterCityBusAPIAlertParamsWithHTTPClient(client *http.Client) *InterCityBusAPIAlertParams { + return &InterCityBusAPIAlertParams{ + HTTPClient: client, + } +} + +/* InterCityBusAPIAlertParams contains all the parameters to send to the API endpoint + for the inter city bus Api alert operation. + + Typically these are written to a http.Request. +*/ +type InterCityBusAPIAlertParams struct { + + /* DollarFilter. + + 過濾 + */ + DollarFilter *string + + /* DollarFormat. + + 指定來源格式 + */ + DollarFormat string + + /* DollarOrderby. + + 排序 + */ + DollarOrderby *string + + /* DollarSelect. + + 挑選 + */ + DollarSelect *string + + /* DollarSkip. + + 跳過前幾筆 + */ + DollarSkip *string + + /* DollarTop. + + 取前幾筆 + + Default: 30 + */ + DollarTop *int64 + + /* Health. + + 加入參數'?health=true'即可查詢此API服務的健康狀態 + */ + Health *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the inter city bus Api alert params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *InterCityBusAPIAlertParams) WithDefaults() *InterCityBusAPIAlertParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the inter city bus Api alert params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *InterCityBusAPIAlertParams) SetDefaults() { + var ( + dollarTopDefault = int64(30) + ) + + val := InterCityBusAPIAlertParams{ + DollarTop: &dollarTopDefault, + } + + val.timeout = o.timeout + val.Context = o.Context + val.HTTPClient = o.HTTPClient + *o = val +} + +// WithTimeout adds the timeout to the inter city bus Api alert params +func (o *InterCityBusAPIAlertParams) WithTimeout(timeout time.Duration) *InterCityBusAPIAlertParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the inter city bus Api alert params +func (o *InterCityBusAPIAlertParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the inter city bus Api alert params +func (o *InterCityBusAPIAlertParams) WithContext(ctx context.Context) *InterCityBusAPIAlertParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the inter city bus Api alert params +func (o *InterCityBusAPIAlertParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the inter city bus Api alert params +func (o *InterCityBusAPIAlertParams) WithHTTPClient(client *http.Client) *InterCityBusAPIAlertParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the inter city bus Api alert params +func (o *InterCityBusAPIAlertParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithDollarFilter adds the dollarFilter to the inter city bus Api alert params +func (o *InterCityBusAPIAlertParams) WithDollarFilter(dollarFilter *string) *InterCityBusAPIAlertParams { + o.SetDollarFilter(dollarFilter) + return o +} + +// SetDollarFilter adds the dollarFilter to the inter city bus Api alert params +func (o *InterCityBusAPIAlertParams) SetDollarFilter(dollarFilter *string) { + o.DollarFilter = dollarFilter +} + +// WithDollarFormat adds the dollarFormat to the inter city bus Api alert params +func (o *InterCityBusAPIAlertParams) WithDollarFormat(dollarFormat string) *InterCityBusAPIAlertParams { + o.SetDollarFormat(dollarFormat) + return o +} + +// SetDollarFormat adds the dollarFormat to the inter city bus Api alert params +func (o *InterCityBusAPIAlertParams) SetDollarFormat(dollarFormat string) { + o.DollarFormat = dollarFormat +} + +// WithDollarOrderby adds the dollarOrderby to the inter city bus Api alert params +func (o *InterCityBusAPIAlertParams) WithDollarOrderby(dollarOrderby *string) *InterCityBusAPIAlertParams { + o.SetDollarOrderby(dollarOrderby) + return o +} + +// SetDollarOrderby adds the dollarOrderby to the inter city bus Api alert params +func (o *InterCityBusAPIAlertParams) SetDollarOrderby(dollarOrderby *string) { + o.DollarOrderby = dollarOrderby +} + +// WithDollarSelect adds the dollarSelect to the inter city bus Api alert params +func (o *InterCityBusAPIAlertParams) WithDollarSelect(dollarSelect *string) *InterCityBusAPIAlertParams { + o.SetDollarSelect(dollarSelect) + return o +} + +// SetDollarSelect adds the dollarSelect to the inter city bus Api alert params +func (o *InterCityBusAPIAlertParams) SetDollarSelect(dollarSelect *string) { + o.DollarSelect = dollarSelect +} + +// WithDollarSkip adds the dollarSkip to the inter city bus Api alert params +func (o *InterCityBusAPIAlertParams) WithDollarSkip(dollarSkip *string) *InterCityBusAPIAlertParams { + o.SetDollarSkip(dollarSkip) + return o +} + +// SetDollarSkip adds the dollarSkip to the inter city bus Api alert params +func (o *InterCityBusAPIAlertParams) SetDollarSkip(dollarSkip *string) { + o.DollarSkip = dollarSkip +} + +// WithDollarTop adds the dollarTop to the inter city bus Api alert params +func (o *InterCityBusAPIAlertParams) WithDollarTop(dollarTop *int64) *InterCityBusAPIAlertParams { + o.SetDollarTop(dollarTop) + return o +} + +// SetDollarTop adds the dollarTop to the inter city bus Api alert params +func (o *InterCityBusAPIAlertParams) SetDollarTop(dollarTop *int64) { + o.DollarTop = dollarTop +} + +// WithHealth adds the health to the inter city bus Api alert params +func (o *InterCityBusAPIAlertParams) WithHealth(health *string) *InterCityBusAPIAlertParams { + o.SetHealth(health) + return o +} + +// SetHealth adds the health to the inter city bus Api alert params +func (o *InterCityBusAPIAlertParams) SetHealth(health *string) { + o.Health = health +} + +// WriteToRequest writes these params to a swagger request +func (o *InterCityBusAPIAlertParams) 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 + } + } + } + + 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_alert_responses.go b/bus/v2/client/inter_city_bus/inter_city_bus_api_alert_responses.go new file mode 100644 index 00000000..24e83b74 --- /dev/null +++ b/bus/v2/client/inter_city_bus/inter_city_bus_api_alert_responses.go @@ -0,0 +1,130 @@ +// 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" +) + +// InterCityBusAPIAlertReader is a Reader for the InterCityBusAPIAlert structure. +type InterCityBusAPIAlertReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *InterCityBusAPIAlertReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewInterCityBusAPIAlertOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 299: + result := NewInterCityBusAPIAlertStatus299() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 304: + result := NewInterCityBusAPIAlertNotModified() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + 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()) + } +} + +// NewInterCityBusAPIAlertOK creates a InterCityBusAPIAlertOK with default headers values +func NewInterCityBusAPIAlertOK() *InterCityBusAPIAlertOK { + return &InterCityBusAPIAlertOK{} +} + +/* InterCityBusAPIAlertOK describes a response with status code 200, with default header values. + +Success +*/ +type InterCityBusAPIAlertOK struct { + Payload []*models.PTXServiceDTOBusSpecificationV2BusAlert +} + +func (o *InterCityBusAPIAlertOK) Error() string { + return fmt.Sprintf("[GET /v2/Bus/Alert/InterCity][%d] interCityBusApiAlertOK %+v", 200, o.Payload) +} +func (o *InterCityBusAPIAlertOK) GetPayload() []*models.PTXServiceDTOBusSpecificationV2BusAlert { + return o.Payload +} + +func (o *InterCityBusAPIAlertOK) 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 +} + +// NewInterCityBusAPIAlertStatus299 creates a InterCityBusAPIAlertStatus299 with default headers values +func NewInterCityBusAPIAlertStatus299() *InterCityBusAPIAlertStatus299 { + return &InterCityBusAPIAlertStatus299{} +} + +/* InterCityBusAPIAlertStatus299 describes a response with status code 299, with default header values. + +加入參數'?health=true'即可查詢此API服務的健康狀態 +*/ +type InterCityBusAPIAlertStatus299 struct { + Payload *models.PTXServiceDTOSharedSpecificationV3BaseDisplayHealth +} + +func (o *InterCityBusAPIAlertStatus299) Error() string { + return fmt.Sprintf("[GET /v2/Bus/Alert/InterCity][%d] interCityBusApiAlertStatus299 %+v", 299, o.Payload) +} +func (o *InterCityBusAPIAlertStatus299) GetPayload() *models.PTXServiceDTOSharedSpecificationV3BaseDisplayHealth { + return o.Payload +} + +func (o *InterCityBusAPIAlertStatus299) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.PTXServiceDTOSharedSpecificationV3BaseDisplayHealth) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewInterCityBusAPIAlertNotModified creates a InterCityBusAPIAlertNotModified with default headers values +func NewInterCityBusAPIAlertNotModified() *InterCityBusAPIAlertNotModified { + return &InterCityBusAPIAlertNotModified{} +} + +/* InterCityBusAPIAlertNotModified describes a response with status code 304, with default header values. + +服務端會在Response加上Last-Modified header,表示最近的更新時間。客戶端能利用此時間,於Request加上If-Modified-Since header,若沒有更新,服務端會回應304 StatusCode且空值Content +*/ +type InterCityBusAPIAlertNotModified struct { +} + +func (o *InterCityBusAPIAlertNotModified) Error() string { + return fmt.Sprintf("[GET /v2/Bus/Alert/InterCity][%d] interCityBusApiAlertNotModified ", 304) +} + +func (o *InterCityBusAPIAlertNotModified) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} 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 d0d554be..e5faf4ff 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 @@ -30,6 +30,8 @@ type ClientOption func(*runtime.ClientOperation) // ClientService is the interface for Client methods type ClientService interface { + InterCityBusAPIAlert(params *InterCityBusAPIAlertParams, opts ...ClientOption) (*InterCityBusAPIAlertOK, *InterCityBusAPIAlertStatus299, error) + InterCityBusAPIDataVersion(params *InterCityBusAPIDataVersionParams, opts ...ClientOption) (*InterCityBusAPIDataVersionOK, *InterCityBusAPIDataVersionStatus299, error) InterCityBusAPIEstimatedTimeOfArrival(params *InterCityBusAPIEstimatedTimeOfArrivalParams, opts ...ClientOption) (*InterCityBusAPIEstimatedTimeOfArrivalOK, *InterCityBusAPIEstimatedTimeOfArrivalStatus299, error) @@ -93,6 +95,47 @@ type ClientService interface { SetTransport(transport runtime.ClientTransport) } +/* + InterCityBusAPIAlert 取得公路客運之營運通阻資料s + + 公路客運之營運通阻資料 +*/ +func (a *Client) InterCityBusAPIAlert(params *InterCityBusAPIAlertParams, opts ...ClientOption) (*InterCityBusAPIAlertOK, *InterCityBusAPIAlertStatus299, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewInterCityBusAPIAlertParams() + } + op := &runtime.ClientOperation{ + ID: "InterCityBusApi_Alert", + Method: "GET", + PathPattern: "/v2/Bus/Alert/InterCity", + ProducesMediaTypes: []string{"application/json", "application/xml"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &InterCityBusAPIAlertReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, nil, err + } + switch value := result.(type) { + case *InterCityBusAPIAlertOK: + return value, nil, nil + case *InterCityBusAPIAlertStatus299: + 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) +} + /* InterCityBusAPIDataVersion 取得公路客運目前資料的最新版本資訊s diff --git a/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_bus_alert.go b/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_bus_alert.go new file mode 100644 index 00000000..478e206e --- /dev/null +++ b/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_bus_alert.go @@ -0,0 +1,206 @@ +// 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 ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// PTXServiceDTOBusSpecificationV2BusAlert BusAlert +// +// swagger:model PTX.Service.DTO.Bus.Specification.V2.BusAlert +type PTXServiceDTOBusSpecificationV2BusAlert struct { + + // String + // + // 通阻事件原單位發布代碼 + // Required: true + AlertID *string `json:"AlertID"` + + // String + // + // 詳細描述網站連結 + AlertURL string `json:"AlertURL,omitempty"` + + // integer + // + // 原因 : [1:'事故',2:'維護',3:'技術問題',4:'施工',5:'急救',6:'天災',7:'示威遊行',8:'維安',9:'假日',10:'罷工',254:'其他',255:'未知原因'] + Cause int32 `json:"Cause,omitempty"` + + // String + // + // 發布單位 + // Required: true + Department *string `json:"Department"` + + // String + // + // 事件描述 + // Required: true + Description *string `json:"Description"` + + // integer + // + // 影響 : [1:'車輛改道',2:'服務班次增加',3:'服務班次減少',4:'服務班次取消',5:'服務班次改變',6:'站牌不停靠',7:'重大延遲',254:'其他影響',255:'未知影響'] + Effect int32 `json:"Effect,omitempty"` + + // DateTime + // + // 結束日期時間 + EndTime string `json:"EndTime,omitempty"` + + // DateTime + // + // 消息公告日期時間 + PublishTime string `json:"PublishTime,omitempty"` + + // Scope + // + // 通阻影響範圍 + // Required: true + Scope struct { + PTXServiceDTOBusSpecificationV2Scope + } `json:"Scope"` + + // DateTime + // + // [來源端平臺]此筆資料最後更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) + SrcUpdateTime string `json:"SrcUpdateTime,omitempty"` + + // DateTime + // + // 開始日期時間 + StartTime string `json:"StartTime,omitempty"` + + // integer + // + // 營運狀況 : [0:'全部營運停止',1:'全部營運正常',2:'有異常狀況'] + Status int32 `json:"Status,omitempty"` + + // String + // + // 通阻標題 + // Required: true + Title *string `json:"Title"` + + // DateTime + // + // 本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) + UpdateTime string `json:"UpdateTime,omitempty"` +} + +// Validate validates this p t x service d t o bus specification v2 bus alert +func (m *PTXServiceDTOBusSpecificationV2BusAlert) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAlertID(formats); err != nil { + res = append(res, err) + } + + if err := m.validateDepartment(formats); err != nil { + res = append(res, err) + } + + if err := m.validateDescription(formats); err != nil { + res = append(res, err) + } + + if err := m.validateScope(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTitle(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *PTXServiceDTOBusSpecificationV2BusAlert) validateAlertID(formats strfmt.Registry) error { + + if err := validate.Required("AlertID", "body", m.AlertID); err != nil { + return err + } + + return nil +} + +func (m *PTXServiceDTOBusSpecificationV2BusAlert) validateDepartment(formats strfmt.Registry) error { + + if err := validate.Required("Department", "body", m.Department); err != nil { + return err + } + + return nil +} + +func (m *PTXServiceDTOBusSpecificationV2BusAlert) validateDescription(formats strfmt.Registry) error { + + if err := validate.Required("Description", "body", m.Description); err != nil { + return err + } + + return nil +} + +func (m *PTXServiceDTOBusSpecificationV2BusAlert) validateScope(formats strfmt.Registry) error { + + return nil +} + +func (m *PTXServiceDTOBusSpecificationV2BusAlert) validateTitle(formats strfmt.Registry) error { + + if err := validate.Required("Title", "body", m.Title); err != nil { + return err + } + + return nil +} + +// ContextValidate validate this p t x service d t o bus specification v2 bus alert based on the context it is used +func (m *PTXServiceDTOBusSpecificationV2BusAlert) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateScope(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *PTXServiceDTOBusSpecificationV2BusAlert) contextValidateScope(ctx context.Context, formats strfmt.Registry) error { + + return nil +} + +// MarshalBinary interface implementation +func (m *PTXServiceDTOBusSpecificationV2BusAlert) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *PTXServiceDTOBusSpecificationV2BusAlert) UnmarshalBinary(b []byte) error { + var res PTXServiceDTOBusSpecificationV2BusAlert + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_bus_news.go b/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_bus_news.go index ed7e8283..4c89fd49 100644 --- a/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_bus_news.go +++ b/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_bus_news.go @@ -26,6 +26,21 @@ type PTXServiceDTOBusSpecificationV2BusNews struct { // 相關網站連結 AttachmentURL string `json:"AttachmentURL,omitempty"` + // String + // + // 聯絡人/單位 + ContactName string `json:"ContactName,omitempty"` + + // String + // + // 聯絡電話 + ContactPhone string `json:"ContactPhone,omitempty"` + + // String + // + // 發布單位 + Department string `json:"Department,omitempty"` + // String // // 內容描述 @@ -43,10 +58,10 @@ type PTXServiceDTOBusSpecificationV2BusNews struct { // Required: true Language *string `json:"Language"` - // String + // integer // - // 消息類別 - NewsCategory string `json:"NewsCategory,omitempty"` + // 消息類別 : [1:'最新消息',2:'新聞稿',3:'營運資訊',4:'轉乘資訊',5:'活動訊息',6:'系統公告',7:'通阻資訊',99:'其他'] + NewsCategory int32 `json:"NewsCategory,omitempty"` // String // @@ -65,6 +80,11 @@ type PTXServiceDTOBusSpecificationV2BusNews struct { // Required: true PublishTime *string `json:"PublishTime"` + // DateTime + // + // 來源端平台資料更新時間 + SrcUpdateTime string `json:"SrcUpdateTime,omitempty"` + // DateTime // // 開始時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) diff --git a/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_bus_station.go b/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_bus_station.go index 36d6ac35..3419bf62 100644 --- a/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_bus_station.go +++ b/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_bus_station.go @@ -22,6 +22,11 @@ import ( // swagger:model PTX.Service.DTO.Bus.Specification.V2.BusStation type PTXServiceDTOBusSpecificationV2BusStation struct { + // String + // + // 方位角,E:東行;W:西行;S:南行;N:北行;SE:東南行;NE:東北行;SW:西南行;NW:西北行 + Bearing string `json:"Bearing,omitempty"` + // String // // 站位地址 diff --git a/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_scope.go b/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_scope.go new file mode 100644 index 00000000..fa8deaaa --- /dev/null +++ b/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_scope.go @@ -0,0 +1,391 @@ +// 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 ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// PTXServiceDTOBusSpecificationV2Scope Scope +// +// 通阻影響範圍 +// +// swagger:model PTX.Service.DTO.Bus.Specification.V2.Scope +type PTXServiceDTOBusSpecificationV2Scope struct { + + // Array + // + // 營運業者資料 + Operators []*PTXServiceDTOBusSpecificationV2ScopeOperator `json:"Operators"` + + // Array + // + // 路線資料 + Routes []*PTXServiceDTOBusSpecificationV2ScopeRoute `json:"Routes"` + + // Array + // + // 站位資料 + Stations []*PTXServiceDTOBusSpecificationV2ScopeStation `json:"Stations"` + + // Array + // + // 站牌資料 + Stops []*PTXServiceDTOBusSpecificationV2ScopeStop `json:"Stops"` + + // Array + // + // 附屬路線資料 + SubRoutes []*PTXServiceDTOBusSpecificationV2ScopeSubRoute `json:"SubRoutes"` + + // Array + // + // 班次資料 + Trips []*PTXServiceDTOBusSpecificationV2ScopeTrip `json:"Trips"` +} + +// Validate validates this p t x service d t o bus specification v2 scope +func (m *PTXServiceDTOBusSpecificationV2Scope) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateOperators(formats); err != nil { + res = append(res, err) + } + + if err := m.validateRoutes(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStations(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStops(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSubRoutes(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTrips(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *PTXServiceDTOBusSpecificationV2Scope) validateOperators(formats strfmt.Registry) error { + if swag.IsZero(m.Operators) { // not required + return nil + } + + for i := 0; i < len(m.Operators); i++ { + if swag.IsZero(m.Operators[i]) { // not required + continue + } + + if m.Operators[i] != nil { + if err := m.Operators[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Operators" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *PTXServiceDTOBusSpecificationV2Scope) validateRoutes(formats strfmt.Registry) error { + if swag.IsZero(m.Routes) { // not required + return nil + } + + for i := 0; i < len(m.Routes); i++ { + if swag.IsZero(m.Routes[i]) { // not required + continue + } + + if m.Routes[i] != nil { + if err := m.Routes[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Routes" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *PTXServiceDTOBusSpecificationV2Scope) validateStations(formats strfmt.Registry) error { + if swag.IsZero(m.Stations) { // not required + return nil + } + + for i := 0; i < len(m.Stations); i++ { + if swag.IsZero(m.Stations[i]) { // not required + continue + } + + if m.Stations[i] != nil { + if err := m.Stations[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Stations" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *PTXServiceDTOBusSpecificationV2Scope) validateStops(formats strfmt.Registry) error { + if swag.IsZero(m.Stops) { // not required + return nil + } + + for i := 0; i < len(m.Stops); i++ { + if swag.IsZero(m.Stops[i]) { // not required + continue + } + + if m.Stops[i] != nil { + if err := m.Stops[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Stops" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *PTXServiceDTOBusSpecificationV2Scope) validateSubRoutes(formats strfmt.Registry) error { + if swag.IsZero(m.SubRoutes) { // not required + return nil + } + + for i := 0; i < len(m.SubRoutes); i++ { + if swag.IsZero(m.SubRoutes[i]) { // not required + continue + } + + if m.SubRoutes[i] != nil { + if err := m.SubRoutes[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("SubRoutes" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *PTXServiceDTOBusSpecificationV2Scope) validateTrips(formats strfmt.Registry) error { + if swag.IsZero(m.Trips) { // not required + return nil + } + + for i := 0; i < len(m.Trips); i++ { + if swag.IsZero(m.Trips[i]) { // not required + continue + } + + if m.Trips[i] != nil { + if err := m.Trips[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Trips" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this p t x service d t o bus specification v2 scope based on the context it is used +func (m *PTXServiceDTOBusSpecificationV2Scope) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateOperators(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateRoutes(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateStations(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateStops(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateSubRoutes(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateTrips(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *PTXServiceDTOBusSpecificationV2Scope) contextValidateOperators(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Operators); i++ { + + if m.Operators[i] != nil { + if err := m.Operators[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Operators" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *PTXServiceDTOBusSpecificationV2Scope) contextValidateRoutes(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Routes); i++ { + + if m.Routes[i] != nil { + if err := m.Routes[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Routes" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *PTXServiceDTOBusSpecificationV2Scope) contextValidateStations(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Stations); i++ { + + if m.Stations[i] != nil { + if err := m.Stations[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Stations" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *PTXServiceDTOBusSpecificationV2Scope) contextValidateStops(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Stops); i++ { + + if m.Stops[i] != nil { + if err := m.Stops[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Stops" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *PTXServiceDTOBusSpecificationV2Scope) contextValidateSubRoutes(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.SubRoutes); i++ { + + if m.SubRoutes[i] != nil { + if err := m.SubRoutes[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("SubRoutes" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *PTXServiceDTOBusSpecificationV2Scope) contextValidateTrips(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Trips); i++ { + + if m.Trips[i] != nil { + if err := m.Trips[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Trips" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *PTXServiceDTOBusSpecificationV2Scope) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *PTXServiceDTOBusSpecificationV2Scope) UnmarshalBinary(b []byte) error { + var res PTXServiceDTOBusSpecificationV2Scope + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_scope_operator.go b/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_scope_operator.go new file mode 100644 index 00000000..d0f0c515 --- /dev/null +++ b/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_scope_operator.go @@ -0,0 +1,93 @@ +// 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 ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// PTXServiceDTOBusSpecificationV2ScopeOperator Operator +// +// 營運業者資料 +// +// swagger:model PTX.Service.DTO.Bus.Specification.V2.Scope+Operator +type PTXServiceDTOBusSpecificationV2ScopeOperator struct { + + // String + // + // 營運業者代碼 , + OperatorID string `json:"OperatorID,omitempty"` + + // NameType + // + // 營運業者名稱 + OperatorName struct { + PTXServiceDTOSharedSpecificationV2BaseNameType + } `json:"OperatorName,omitempty"` +} + +// Validate validates this p t x service d t o bus specification v2 scope operator +func (m *PTXServiceDTOBusSpecificationV2ScopeOperator) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateOperatorName(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *PTXServiceDTOBusSpecificationV2ScopeOperator) validateOperatorName(formats strfmt.Registry) error { + if swag.IsZero(m.OperatorName) { // not required + return nil + } + + return nil +} + +// ContextValidate validate this p t x service d t o bus specification v2 scope operator based on the context it is used +func (m *PTXServiceDTOBusSpecificationV2ScopeOperator) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateOperatorName(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *PTXServiceDTOBusSpecificationV2ScopeOperator) contextValidateOperatorName(ctx context.Context, formats strfmt.Registry) error { + + return nil +} + +// MarshalBinary interface implementation +func (m *PTXServiceDTOBusSpecificationV2ScopeOperator) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *PTXServiceDTOBusSpecificationV2ScopeOperator) UnmarshalBinary(b []byte) error { + var res PTXServiceDTOBusSpecificationV2ScopeOperator + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_scope_route.go b/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_scope_route.go new file mode 100644 index 00000000..f38f0ae9 --- /dev/null +++ b/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_scope_route.go @@ -0,0 +1,98 @@ +// 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 ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// PTXServiceDTOBusSpecificationV2ScopeRoute Route +// +// 路線資料 +// +// swagger:model PTX.Service.DTO.Bus.Specification.V2.Scope+Route +type PTXServiceDTOBusSpecificationV2ScopeRoute struct { + + // integer + // + // 影響方向 : [0:'去程',1:'返程',2:'迴圈',255:'未知'] + Direction int32 `json:"Direction,omitempty"` + + // String + // + // 地區既用中之班次代碼(為原資料內碼) + RouteID string `json:"RouteID,omitempty"` + + // NameType + // + // 路線名稱 + RouteName struct { + PTXServiceDTOSharedSpecificationV2BaseNameType + } `json:"RouteName,omitempty"` +} + +// Validate validates this p t x service d t o bus specification v2 scope route +func (m *PTXServiceDTOBusSpecificationV2ScopeRoute) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateRouteName(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *PTXServiceDTOBusSpecificationV2ScopeRoute) validateRouteName(formats strfmt.Registry) error { + if swag.IsZero(m.RouteName) { // not required + return nil + } + + return nil +} + +// ContextValidate validate this p t x service d t o bus specification v2 scope route based on the context it is used +func (m *PTXServiceDTOBusSpecificationV2ScopeRoute) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateRouteName(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *PTXServiceDTOBusSpecificationV2ScopeRoute) contextValidateRouteName(ctx context.Context, formats strfmt.Registry) error { + + return nil +} + +// MarshalBinary interface implementation +func (m *PTXServiceDTOBusSpecificationV2ScopeRoute) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *PTXServiceDTOBusSpecificationV2ScopeRoute) UnmarshalBinary(b []byte) error { + var res PTXServiceDTOBusSpecificationV2ScopeRoute + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_scope_station.go b/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_scope_station.go new file mode 100644 index 00000000..fe4f8baa --- /dev/null +++ b/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_scope_station.go @@ -0,0 +1,93 @@ +// 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 ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// PTXServiceDTOBusSpecificationV2ScopeStation Station +// +// 站位資料 +// +// swagger:model PTX.Service.DTO.Bus.Specification.V2.Scope+Station +type PTXServiceDTOBusSpecificationV2ScopeStation struct { + + // String + // + // 站位代碼 + StationID string `json:"StationID,omitempty"` + + // NameType + // + // 站位名稱 + StationName struct { + PTXServiceDTOSharedSpecificationV2BaseNameType + } `json:"StationName,omitempty"` +} + +// Validate validates this p t x service d t o bus specification v2 scope station +func (m *PTXServiceDTOBusSpecificationV2ScopeStation) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateStationName(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *PTXServiceDTOBusSpecificationV2ScopeStation) validateStationName(formats strfmt.Registry) error { + if swag.IsZero(m.StationName) { // not required + return nil + } + + return nil +} + +// ContextValidate validate this p t x service d t o bus specification v2 scope station based on the context it is used +func (m *PTXServiceDTOBusSpecificationV2ScopeStation) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateStationName(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *PTXServiceDTOBusSpecificationV2ScopeStation) contextValidateStationName(ctx context.Context, formats strfmt.Registry) error { + + return nil +} + +// MarshalBinary interface implementation +func (m *PTXServiceDTOBusSpecificationV2ScopeStation) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *PTXServiceDTOBusSpecificationV2ScopeStation) UnmarshalBinary(b []byte) error { + var res PTXServiceDTOBusSpecificationV2ScopeStation + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_scope_stop.go b/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_scope_stop.go new file mode 100644 index 00000000..c8c78488 --- /dev/null +++ b/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_scope_stop.go @@ -0,0 +1,98 @@ +// 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 ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// PTXServiceDTOBusSpecificationV2ScopeStop Stop +// +// 站牌資料 +// +// swagger:model PTX.Service.DTO.Bus.Specification.V2.Scope+Stop +type PTXServiceDTOBusSpecificationV2ScopeStop struct { + + // String + // + // 站位代碼 + StationID string `json:"StationID,omitempty"` + + // String + // + // 地區既用中之站牌代碼(為原資料內碼) + StopID string `json:"StopID,omitempty"` + + // NameType + // + // 站牌名稱 + StopName struct { + PTXServiceDTOSharedSpecificationV2BaseNameType + } `json:"StopName,omitempty"` +} + +// Validate validates this p t x service d t o bus specification v2 scope stop +func (m *PTXServiceDTOBusSpecificationV2ScopeStop) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateStopName(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *PTXServiceDTOBusSpecificationV2ScopeStop) validateStopName(formats strfmt.Registry) error { + if swag.IsZero(m.StopName) { // not required + return nil + } + + return nil +} + +// ContextValidate validate this p t x service d t o bus specification v2 scope stop based on the context it is used +func (m *PTXServiceDTOBusSpecificationV2ScopeStop) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateStopName(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *PTXServiceDTOBusSpecificationV2ScopeStop) contextValidateStopName(ctx context.Context, formats strfmt.Registry) error { + + return nil +} + +// MarshalBinary interface implementation +func (m *PTXServiceDTOBusSpecificationV2ScopeStop) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *PTXServiceDTOBusSpecificationV2ScopeStop) UnmarshalBinary(b []byte) error { + var res PTXServiceDTOBusSpecificationV2ScopeStop + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_scope_sub_route.go b/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_scope_sub_route.go new file mode 100644 index 00000000..70bfeb2b --- /dev/null +++ b/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_scope_sub_route.go @@ -0,0 +1,98 @@ +// 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 ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// PTXServiceDTOBusSpecificationV2ScopeSubRoute SubRoute +// +// 附屬路線資料 +// +// swagger:model PTX.Service.DTO.Bus.Specification.V2.Scope+SubRoute +type PTXServiceDTOBusSpecificationV2ScopeSubRoute struct { + + // integer + // + // 影響方向 : [0:'去程',1:'返程',2:'迴圈',255:'未知'] + Direction int32 `json:"Direction,omitempty"` + + // String + // + // 地區既用中之附屬班次代碼(為原資料內碼) + SubRouteID string `json:"SubRouteID,omitempty"` + + // NameType + // + // 附屬路線名稱 + SubRouteName struct { + PTXServiceDTOSharedSpecificationV2BaseNameType + } `json:"SubRouteName,omitempty"` +} + +// Validate validates this p t x service d t o bus specification v2 scope sub route +func (m *PTXServiceDTOBusSpecificationV2ScopeSubRoute) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateSubRouteName(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *PTXServiceDTOBusSpecificationV2ScopeSubRoute) validateSubRouteName(formats strfmt.Registry) error { + if swag.IsZero(m.SubRouteName) { // not required + return nil + } + + return nil +} + +// ContextValidate validate this p t x service d t o bus specification v2 scope sub route based on the context it is used +func (m *PTXServiceDTOBusSpecificationV2ScopeSubRoute) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateSubRouteName(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *PTXServiceDTOBusSpecificationV2ScopeSubRoute) contextValidateSubRouteName(ctx context.Context, formats strfmt.Registry) error { + + return nil +} + +// MarshalBinary interface implementation +func (m *PTXServiceDTOBusSpecificationV2ScopeSubRoute) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *PTXServiceDTOBusSpecificationV2ScopeSubRoute) UnmarshalBinary(b []byte) error { + var res PTXServiceDTOBusSpecificationV2ScopeSubRoute + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_scope_trip.go b/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_scope_trip.go new file mode 100644 index 00000000..c930d271 --- /dev/null +++ b/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_scope_trip.go @@ -0,0 +1,74 @@ +// 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 ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// PTXServiceDTOBusSpecificationV2ScopeTrip Trip +// +// 班次代碼資料 +// +// swagger:model PTX.Service.DTO.Bus.Specification.V2.Scope+Trip +type PTXServiceDTOBusSpecificationV2ScopeTrip struct { + + // integer + // + // 影響方向 : [0:'去程',1:'返程',2:'迴圈',255:'未知'] + Direction int32 `json:"Direction,omitempty"` + + // String + // + // 地區既用中之班次代碼(為原資料內碼) + RouteID string `json:"RouteID,omitempty"` + + // String + // + // 地區既用中之附屬班次代碼(為原資料內碼) + SubRouteID string `json:"SubRouteID,omitempty"` + + // String + // + // 首站發車時間(HH:mm) + TripDepTime string `json:"TripDepTime,omitempty"` + + // String + // + // 地區既用中之班次代碼(為原資料內碼) + TripID string `json:"TripID,omitempty"` +} + +// Validate validates this p t x service d t o bus specification v2 scope trip +func (m *PTXServiceDTOBusSpecificationV2ScopeTrip) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this p t x service d t o bus specification v2 scope trip based on context it is used +func (m *PTXServiceDTOBusSpecificationV2ScopeTrip) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *PTXServiceDTOBusSpecificationV2ScopeTrip) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *PTXServiceDTOBusSpecificationV2ScopeTrip) UnmarshalBinary(b []byte) error { + var res PTXServiceDTOBusSpecificationV2ScopeTrip + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/bus/v3/client/city_bus/city_bus_api_alert1_parameters.go b/bus/v3/client/city_bus/city_bus_api_alert1_parameters.go new file mode 100644 index 00000000..ee4a6695 --- /dev/null +++ b/bus/v3/client/city_bus/city_bus_api_alert1_parameters.go @@ -0,0 +1,428 @@ +// 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" +) + +// NewCityBusAPIAlert1Params creates a new CityBusAPIAlert1Params object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewCityBusAPIAlert1Params() *CityBusAPIAlert1Params { + return &CityBusAPIAlert1Params{ + timeout: cr.DefaultTimeout, + } +} + +// NewCityBusAPIAlert1ParamsWithTimeout creates a new CityBusAPIAlert1Params object +// with the ability to set a timeout on a request. +func NewCityBusAPIAlert1ParamsWithTimeout(timeout time.Duration) *CityBusAPIAlert1Params { + return &CityBusAPIAlert1Params{ + timeout: timeout, + } +} + +// NewCityBusAPIAlert1ParamsWithContext creates a new CityBusAPIAlert1Params object +// with the ability to set a context for a request. +func NewCityBusAPIAlert1ParamsWithContext(ctx context.Context) *CityBusAPIAlert1Params { + return &CityBusAPIAlert1Params{ + Context: ctx, + } +} + +// NewCityBusAPIAlert1ParamsWithHTTPClient creates a new CityBusAPIAlert1Params object +// with the ability to set a custom HTTPClient for a request. +func NewCityBusAPIAlert1ParamsWithHTTPClient(client *http.Client) *CityBusAPIAlert1Params { + return &CityBusAPIAlert1Params{ + HTTPClient: client, + } +} + +/* CityBusAPIAlert1Params contains all the parameters to send to the API endpoint + for the city bus Api alert 1 operation. + + Typically these are written to a http.Request. +*/ +type CityBusAPIAlert1Params struct { + + /* DollarCount. + + 查詢數量 + */ + DollarCount *bool + + /* DollarFilter. + + 過濾 + */ + DollarFilter *string + + /* DollarFormat. + + 指定來源格式 + */ + DollarFormat string + + /* DollarOrderby. + + 排序 + */ + DollarOrderby *string + + /* DollarSelect. + + 挑選 + */ + DollarSelect *string + + /* DollarSkip. + + 跳過前幾筆 + */ + DollarSkip *string + + /* DollarTop. + + 取前幾筆 + + Default: 30 + */ + DollarTop *int64 + + /* City. + + 欲查詢縣市 + */ + City string + + /* Health. + + 加入參數'?health=true'即可查詢此API服務的健康狀態 + */ + Health *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the city bus Api alert 1 params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *CityBusAPIAlert1Params) WithDefaults() *CityBusAPIAlert1Params { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the city bus Api alert 1 params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *CityBusAPIAlert1Params) SetDefaults() { + var ( + dollarTopDefault = int64(30) + ) + + val := CityBusAPIAlert1Params{ + DollarTop: &dollarTopDefault, + } + + val.timeout = o.timeout + val.Context = o.Context + val.HTTPClient = o.HTTPClient + *o = val +} + +// WithTimeout adds the timeout to the city bus Api alert 1 params +func (o *CityBusAPIAlert1Params) WithTimeout(timeout time.Duration) *CityBusAPIAlert1Params { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the city bus Api alert 1 params +func (o *CityBusAPIAlert1Params) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the city bus Api alert 1 params +func (o *CityBusAPIAlert1Params) WithContext(ctx context.Context) *CityBusAPIAlert1Params { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the city bus Api alert 1 params +func (o *CityBusAPIAlert1Params) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the city bus Api alert 1 params +func (o *CityBusAPIAlert1Params) WithHTTPClient(client *http.Client) *CityBusAPIAlert1Params { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the city bus Api alert 1 params +func (o *CityBusAPIAlert1Params) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithDollarCount adds the dollarCount to the city bus Api alert 1 params +func (o *CityBusAPIAlert1Params) WithDollarCount(dollarCount *bool) *CityBusAPIAlert1Params { + o.SetDollarCount(dollarCount) + return o +} + +// SetDollarCount adds the dollarCount to the city bus Api alert 1 params +func (o *CityBusAPIAlert1Params) SetDollarCount(dollarCount *bool) { + o.DollarCount = dollarCount +} + +// WithDollarFilter adds the dollarFilter to the city bus Api alert 1 params +func (o *CityBusAPIAlert1Params) WithDollarFilter(dollarFilter *string) *CityBusAPIAlert1Params { + o.SetDollarFilter(dollarFilter) + return o +} + +// SetDollarFilter adds the dollarFilter to the city bus Api alert 1 params +func (o *CityBusAPIAlert1Params) SetDollarFilter(dollarFilter *string) { + o.DollarFilter = dollarFilter +} + +// WithDollarFormat adds the dollarFormat to the city bus Api alert 1 params +func (o *CityBusAPIAlert1Params) WithDollarFormat(dollarFormat string) *CityBusAPIAlert1Params { + o.SetDollarFormat(dollarFormat) + return o +} + +// SetDollarFormat adds the dollarFormat to the city bus Api alert 1 params +func (o *CityBusAPIAlert1Params) SetDollarFormat(dollarFormat string) { + o.DollarFormat = dollarFormat +} + +// WithDollarOrderby adds the dollarOrderby to the city bus Api alert 1 params +func (o *CityBusAPIAlert1Params) WithDollarOrderby(dollarOrderby *string) *CityBusAPIAlert1Params { + o.SetDollarOrderby(dollarOrderby) + return o +} + +// SetDollarOrderby adds the dollarOrderby to the city bus Api alert 1 params +func (o *CityBusAPIAlert1Params) SetDollarOrderby(dollarOrderby *string) { + o.DollarOrderby = dollarOrderby +} + +// WithDollarSelect adds the dollarSelect to the city bus Api alert 1 params +func (o *CityBusAPIAlert1Params) WithDollarSelect(dollarSelect *string) *CityBusAPIAlert1Params { + o.SetDollarSelect(dollarSelect) + return o +} + +// SetDollarSelect adds the dollarSelect to the city bus Api alert 1 params +func (o *CityBusAPIAlert1Params) SetDollarSelect(dollarSelect *string) { + o.DollarSelect = dollarSelect +} + +// WithDollarSkip adds the dollarSkip to the city bus Api alert 1 params +func (o *CityBusAPIAlert1Params) WithDollarSkip(dollarSkip *string) *CityBusAPIAlert1Params { + o.SetDollarSkip(dollarSkip) + return o +} + +// SetDollarSkip adds the dollarSkip to the city bus Api alert 1 params +func (o *CityBusAPIAlert1Params) SetDollarSkip(dollarSkip *string) { + o.DollarSkip = dollarSkip +} + +// WithDollarTop adds the dollarTop to the city bus Api alert 1 params +func (o *CityBusAPIAlert1Params) WithDollarTop(dollarTop *int64) *CityBusAPIAlert1Params { + o.SetDollarTop(dollarTop) + return o +} + +// SetDollarTop adds the dollarTop to the city bus Api alert 1 params +func (o *CityBusAPIAlert1Params) SetDollarTop(dollarTop *int64) { + o.DollarTop = dollarTop +} + +// WithCity adds the city to the city bus Api alert 1 params +func (o *CityBusAPIAlert1Params) WithCity(city string) *CityBusAPIAlert1Params { + o.SetCity(city) + return o +} + +// SetCity adds the city to the city bus Api alert 1 params +func (o *CityBusAPIAlert1Params) SetCity(city string) { + o.City = city +} + +// WithHealth adds the health to the city bus Api alert 1 params +func (o *CityBusAPIAlert1Params) WithHealth(health *string) *CityBusAPIAlert1Params { + o.SetHealth(health) + return o +} + +// SetHealth adds the health to the city bus Api alert 1 params +func (o *CityBusAPIAlert1Params) SetHealth(health *string) { + o.Health = health +} + +// WriteToRequest writes these params to a swagger request +func (o *CityBusAPIAlert1Params) 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 bool + + if o.DollarCount != nil { + qrDollarCount = *o.DollarCount + } + qDollarCount := swag.FormatBool(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 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/v3/client/city_bus/city_bus_api_alert1_responses.go b/bus/v3/client/city_bus/city_bus_api_alert1_responses.go new file mode 100644 index 00000000..2c45ef81 --- /dev/null +++ b/bus/v3/client/city_bus/city_bus_api_alert1_responses.go @@ -0,0 +1,132 @@ +// 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/v3/models" +) + +// CityBusAPIAlert1Reader is a Reader for the CityBusAPIAlert1 structure. +type CityBusAPIAlert1Reader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *CityBusAPIAlert1Reader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewCityBusAPIAlert1OK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 299: + result := NewCityBusAPIAlert1Status299() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 304: + result := NewCityBusAPIAlert1NotModified() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + 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()) + } +} + +// NewCityBusAPIAlert1OK creates a CityBusAPIAlert1OK with default headers values +func NewCityBusAPIAlert1OK() *CityBusAPIAlert1OK { + return &CityBusAPIAlert1OK{} +} + +/* CityBusAPIAlert1OK describes a response with status code 200, with default header values. + +Success +*/ +type CityBusAPIAlert1OK struct { + Payload *models.PTXServiceDTOBusSpecificationV3WrapperBusWrapperPTXServiceDTOBusSpecificationV3Alert +} + +func (o *CityBusAPIAlert1OK) Error() string { + return fmt.Sprintf("[GET /v3/Bus/Alert/City/{City}][%d] cityBusApiAlert1OK %+v", 200, o.Payload) +} +func (o *CityBusAPIAlert1OK) GetPayload() *models.PTXServiceDTOBusSpecificationV3WrapperBusWrapperPTXServiceDTOBusSpecificationV3Alert { + return o.Payload +} + +func (o *CityBusAPIAlert1OK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.PTXServiceDTOBusSpecificationV3WrapperBusWrapperPTXServiceDTOBusSpecificationV3Alert) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewCityBusAPIAlert1Status299 creates a CityBusAPIAlert1Status299 with default headers values +func NewCityBusAPIAlert1Status299() *CityBusAPIAlert1Status299 { + return &CityBusAPIAlert1Status299{} +} + +/* CityBusAPIAlert1Status299 describes a response with status code 299, with default header values. + +加入參數'?health=true'即可查詢此API服務的健康狀態 +*/ +type CityBusAPIAlert1Status299 struct { + Payload *models.PTXServiceDTOSharedSpecificationV3BaseDisplayHealth +} + +func (o *CityBusAPIAlert1Status299) Error() string { + return fmt.Sprintf("[GET /v3/Bus/Alert/City/{City}][%d] cityBusApiAlert1Status299 %+v", 299, o.Payload) +} +func (o *CityBusAPIAlert1Status299) GetPayload() *models.PTXServiceDTOSharedSpecificationV3BaseDisplayHealth { + return o.Payload +} + +func (o *CityBusAPIAlert1Status299) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.PTXServiceDTOSharedSpecificationV3BaseDisplayHealth) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewCityBusAPIAlert1NotModified creates a CityBusAPIAlert1NotModified with default headers values +func NewCityBusAPIAlert1NotModified() *CityBusAPIAlert1NotModified { + return &CityBusAPIAlert1NotModified{} +} + +/* CityBusAPIAlert1NotModified describes a response with status code 304, with default header values. + +服務端會在Response加上Last-Modified header,表示最近的更新時間。客戶端能利用此時間,於Request加上If-Modified-Since header,若沒有更新,服務端會回應304 StatusCode且空值Content +*/ +type CityBusAPIAlert1NotModified struct { +} + +func (o *CityBusAPIAlert1NotModified) Error() string { + return fmt.Sprintf("[GET /v3/Bus/Alert/City/{City}][%d] cityBusApiAlert1NotModified ", 304) +} + +func (o *CityBusAPIAlert1NotModified) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/bus/v3/client/city_bus/city_bus_client.go b/bus/v3/client/city_bus/city_bus_client.go index b7cad4ec..1d651045 100644 --- a/bus/v3/client/city_bus/city_bus_client.go +++ b/bus/v3/client/city_bus/city_bus_client.go @@ -30,7 +30,7 @@ type ClientOption func(*runtime.ClientOperation) // ClientService is the interface for Client methods type ClientService interface { - CityBusAPIAlert(params *CityBusAPIAlertParams, opts ...ClientOption) (*CityBusAPIAlertOK, *CityBusAPIAlertStatus299, error) + CityBusAPIAlert1(params *CityBusAPIAlert1Params, opts ...ClientOption) (*CityBusAPIAlert1OK, *CityBusAPIAlert1Status299, error) CityBusAPIDailyTimeTable(params *CityBusAPIDailyTimeTableParams, opts ...ClientOption) (*CityBusAPIDailyTimeTableOK, *CityBusAPIDailyTimeTableStatus299, error) @@ -88,24 +88,24 @@ type ClientService interface { } /* - CityBusAPIAlert 取得指定s 縣市 的公車通阻資料 + CityBusAPIAlert1 取得指定s 縣市 的公車通阻資料 市區公車之公車通阻資料 */ -func (a *Client) CityBusAPIAlert(params *CityBusAPIAlertParams, opts ...ClientOption) (*CityBusAPIAlertOK, *CityBusAPIAlertStatus299, error) { +func (a *Client) CityBusAPIAlert1(params *CityBusAPIAlert1Params, opts ...ClientOption) (*CityBusAPIAlert1OK, *CityBusAPIAlert1Status299, error) { // TODO: Validate the params before sending if params == nil { - params = NewCityBusAPIAlertParams() + params = NewCityBusAPIAlert1Params() } op := &runtime.ClientOperation{ - ID: "CityBusApi_Alert", + ID: "CityBusApi_Alert_1", Method: "GET", PathPattern: "/v3/Bus/Alert/City/{City}", ProducesMediaTypes: []string{"application/json", "application/xml"}, ConsumesMediaTypes: []string{"application/json"}, Schemes: []string{"https"}, Params: params, - Reader: &CityBusAPIAlertReader{formats: a.formats}, + Reader: &CityBusAPIAlert1Reader{formats: a.formats}, Context: params.Context, Client: params.HTTPClient, } @@ -118,9 +118,9 @@ func (a *Client) CityBusAPIAlert(params *CityBusAPIAlertParams, opts ...ClientOp return nil, nil, err } switch value := result.(type) { - case *CityBusAPIAlertOK: + case *CityBusAPIAlert1OK: return value, nil, nil - case *CityBusAPIAlertStatus299: + case *CityBusAPIAlert1Status299: return nil, value, nil } // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue diff --git a/go.sum b/go.sum index a4662aa7..bf4196eb 100644 --- a/go.sum +++ b/go.sum @@ -312,6 +312,7 @@ github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJy github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/tidwall/pretty v1.0.0 h1:HsD+QiTn7sK6flMKIvNmpqz1qrpP3Ps6jOKIKMooyg4= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= @@ -428,4 +429,5 @@ gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C gopkg.in/yaml.v3 v3.0.0-20200605160147-a5ece683394c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776 h1:tQIYjPdBoyREyB9XMu+nnTclpTYkz2zFM+lzLJFO4gQ= gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/oas.bike.v2.json b/oas.bike.v2.json index d0979329..f92e20c2 100644 --- a/oas.bike.v2.json +++ b/oas.bike.v2.json @@ -44,17 +44,17 @@ "Tainan" ], "x-enum": { - "Taipei": "臺北市", - "MiaoliCounty": "苗栗縣", - "KinmenCounty": "金門縣", - "ChanghuaCounty": "彰化縣", + "Tainan": "臺南市", "PingtungCounty": "屏東縣", + "KinmenCounty": "金門縣", + "Taipei": "臺北市", + "Taoyuan": "桃園市", "Hsinchu": "新竹市", "NewTaipei": "新北市", "Kaohsiung": "高雄市", - "Tainan": "臺南市", - "Taoyuan": "桃園市", - "Taichung": "臺中市" + "MiaoliCounty": "苗栗縣", + "Taichung": "臺中市", + "ChanghuaCounty": "彰化縣" } }, { @@ -156,17 +156,17 @@ "Tainan" ], "x-enum": { - "Taipei": "臺北市", - "Tainan": "臺南市", - "KinmenCounty": "金門縣", - "Taoyuan": "桃園市", - "Hsinchu": "新竹市", "NewTaipei": "新北市", + "MiaoliCounty": "苗栗縣", "ChanghuaCounty": "彰化縣", "Kaohsiung": "高雄市", + "Tainan": "臺南市", + "KinmenCounty": "金門縣", "PingtungCounty": "屏東縣", + "Taoyuan": "桃園市", + "Taipei": "臺北市", "Taichung": "臺中市", - "MiaoliCounty": "苗栗縣" + "Hsinchu": "新竹市" } }, { @@ -271,28 +271,28 @@ "Tainan" ], "x-enum": { - "NantouCounty": "南投縣", - "Tainan": "臺南市", - "Kaohsiung": "高雄市", - "PenghuCounty": "澎湖縣", "Taipei": "臺北市", - "NewTaipei": "新北市", - "Chiayi": "嘉義市", + "Hsinchu": "新竹市", "TaitungCounty": "臺東縣", - "LienchiangCounty": "連江縣", - "Keelung": "基隆市", - "YilanCounty": "宜蘭縣", + "Tainan": "臺南市", + "PenghuCounty": "澎湖縣", "KinmenCounty": "金門縣", - "ChiayiCounty": "嘉義縣", - "YunlinCounty": "雲林縣", - "HsinchuCounty": "新竹縣", - "MiaoliCounty": "苗栗縣", - "PingtungCounty": "屏東縣", "Taoyuan": "桃園市", "ChanghuaCounty": "彰化縣", - "Taichung": "臺中市", + "PingtungCounty": "屏東縣", "HualienCounty": "花蓮縣", - "Hsinchu": "新竹市" + "Keelung": "基隆市", + "LienchiangCounty": "連江縣", + "YunlinCounty": "雲林縣", + "MiaoliCounty": "苗栗縣", + "HsinchuCounty": "新竹縣", + "NantouCounty": "南投縣", + "Chiayi": "嘉義市", + "Taichung": "臺中市", + "NewTaipei": "新北市", + "ChiayiCounty": "嘉義縣", + "Kaohsiung": "高雄市", + "YilanCounty": "宜蘭縣" } }, { diff --git a/oas.bus.v2.json b/oas.bus.v2.json index 4c569bf2..943c229b 100644 --- a/oas.bus.v2.json +++ b/oas.bus.v2.json @@ -46,19 +46,19 @@ "PenghuCounty" ], "x-enum": { - "ChanghuaCounty": "彰化縣", - "MiaoliCounty": "苗栗縣", - "YilanCounty": "宜蘭縣", "Hsinchu": "新竹市", - "TaitungCounty": "臺東縣", + "HsinchuCounty": "新竹縣", + "MiaoliCounty": "苗栗縣", + "ChanghuaCounty": "彰化縣", + "NantouCounty": "南投縣", "YunlinCounty": "雲林縣", - "HualienCounty": "花蓮縣", - "PenghuCounty": "澎湖縣", "ChiayiCounty": "嘉義縣", - "NantouCounty": "南投縣", + "Chiayi": "嘉義市", "PingtungCounty": "屏東縣", - "HsinchuCounty": "新竹縣", - "Chiayi": "嘉義市" + "YilanCounty": "宜蘭縣", + "HualienCounty": "花蓮縣", + "TaitungCounty": "臺東縣", + "PenghuCounty": "澎湖縣" } }, { @@ -178,19 +178,19 @@ "PenghuCounty" ], "x-enum": { - "ChanghuaCounty": "彰化縣", - "MiaoliCounty": "苗栗縣", - "YilanCounty": "宜蘭縣", "Hsinchu": "新竹市", - "TaitungCounty": "臺東縣", + "HsinchuCounty": "新竹縣", + "MiaoliCounty": "苗栗縣", + "ChanghuaCounty": "彰化縣", + "NantouCounty": "南投縣", "YunlinCounty": "雲林縣", - "HualienCounty": "花蓮縣", - "PenghuCounty": "澎湖縣", "ChiayiCounty": "嘉義縣", - "NantouCounty": "南投縣", + "Chiayi": "嘉義市", "PingtungCounty": "屏東縣", - "HsinchuCounty": "新竹縣", - "Chiayi": "嘉義市" + "YilanCounty": "宜蘭縣", + "HualienCounty": "花蓮縣", + "TaitungCounty": "臺東縣", + "PenghuCounty": "澎湖縣" } }, { @@ -317,19 +317,19 @@ "PenghuCounty" ], "x-enum": { - "MiaoliCounty": "苗栗縣", - "HualienCounty": "花蓮縣", - "YunlinCounty": "雲林縣", - "YilanCounty": "宜蘭縣", - "NantouCounty": "南投縣", "Hsinchu": "新竹市", - "PingtungCounty": "屏東縣", - "PenghuCounty": "澎湖縣", - "ChiayiCounty": "嘉義縣", "HsinchuCounty": "新竹縣", + "MiaoliCounty": "苗栗縣", "ChanghuaCounty": "彰化縣", + "NantouCounty": "南投縣", + "YunlinCounty": "雲林縣", + "ChiayiCounty": "嘉義縣", "Chiayi": "嘉義市", - "TaitungCounty": "臺東縣" + "PingtungCounty": "屏東縣", + "YilanCounty": "宜蘭縣", + "HualienCounty": "花蓮縣", + "TaitungCounty": "臺東縣", + "PenghuCounty": "澎湖縣" } }, { @@ -443,19 +443,19 @@ "PenghuCounty" ], "x-enum": { - "MiaoliCounty": "苗栗縣", - "HualienCounty": "花蓮縣", - "YunlinCounty": "雲林縣", - "YilanCounty": "宜蘭縣", - "NantouCounty": "南投縣", "Hsinchu": "新竹市", - "PingtungCounty": "屏東縣", - "PenghuCounty": "澎湖縣", - "ChiayiCounty": "嘉義縣", "HsinchuCounty": "新竹縣", + "MiaoliCounty": "苗栗縣", "ChanghuaCounty": "彰化縣", + "NantouCounty": "南投縣", + "YunlinCounty": "雲林縣", + "ChiayiCounty": "嘉義縣", "Chiayi": "嘉義市", - "TaitungCounty": "臺東縣" + "PingtungCounty": "屏東縣", + "YilanCounty": "宜蘭縣", + "HualienCounty": "花蓮縣", + "TaitungCounty": "臺東縣", + "PenghuCounty": "澎湖縣" } }, { @@ -576,19 +576,19 @@ "PenghuCounty" ], "x-enum": { - "PingtungCounty": "屏東縣", - "YunlinCounty": "雲林縣", + "Hsinchu": "新竹市", + "HsinchuCounty": "新竹縣", "MiaoliCounty": "苗栗縣", - "YilanCounty": "宜蘭縣", - "NantouCounty": "南投縣", "ChanghuaCounty": "彰化縣", + "NantouCounty": "南投縣", + "YunlinCounty": "雲林縣", + "ChiayiCounty": "嘉義縣", "Chiayi": "嘉義市", - "Hsinchu": "新竹市", + "PingtungCounty": "屏東縣", + "YilanCounty": "宜蘭縣", "HualienCounty": "花蓮縣", - "HsinchuCounty": "新竹縣", - "ChiayiCounty": "嘉義縣", - "PenghuCounty": "澎湖縣", - "TaitungCounty": "臺東縣" + "TaitungCounty": "臺東縣", + "PenghuCounty": "澎湖縣" } }, { @@ -702,19 +702,19 @@ "PenghuCounty" ], "x-enum": { - "PingtungCounty": "屏東縣", - "YunlinCounty": "雲林縣", + "Hsinchu": "新竹市", + "HsinchuCounty": "新竹縣", "MiaoliCounty": "苗栗縣", - "YilanCounty": "宜蘭縣", - "NantouCounty": "南投縣", "ChanghuaCounty": "彰化縣", + "NantouCounty": "南投縣", + "YunlinCounty": "雲林縣", + "ChiayiCounty": "嘉義縣", "Chiayi": "嘉義市", - "Hsinchu": "新竹市", + "PingtungCounty": "屏東縣", + "YilanCounty": "宜蘭縣", "HualienCounty": "花蓮縣", - "HsinchuCounty": "新竹縣", - "ChiayiCounty": "嘉義縣", - "PenghuCounty": "澎湖縣", - "TaitungCounty": "臺東縣" + "TaitungCounty": "臺東縣", + "PenghuCounty": "澎湖縣" } }, { @@ -844,27 +844,27 @@ "LienchiangCounty" ], "x-enum": { + "Taipei": "臺北市", + "NewTaipei": "新北市", + "Taoyuan": "桃園市", + "Taichung": "臺中市", + "Tainan": "臺南市", "Kaohsiung": "高雄市", + "Keelung": "基隆市", + "Hsinchu": "新竹市", "HsinchuCounty": "新竹縣", - "Taoyuan": "桃園市", - "ChiayiCounty": "嘉義縣", - "KinmenCounty": "金門縣", - "YunlinCounty": "雲林縣", + "MiaoliCounty": "苗栗縣", "ChanghuaCounty": "彰化縣", + "NantouCounty": "南投縣", + "YunlinCounty": "雲林縣", + "ChiayiCounty": "嘉義縣", + "Chiayi": "嘉義市", "PingtungCounty": "屏東縣", - "Keelung": "基隆市", "YilanCounty": "宜蘭縣", - "NewTaipei": "新北市", - "PenghuCounty": "澎湖縣", - "TaitungCounty": "臺東縣", - "Taichung": "臺中市", - "Taipei": "臺北市", "HualienCounty": "花蓮縣", - "Tainan": "臺南市", - "MiaoliCounty": "苗栗縣", - "Hsinchu": "新竹市", - "Chiayi": "嘉義市", - "NantouCounty": "南投縣", + "TaitungCounty": "臺東縣", + "KinmenCounty": "金門縣", + "PenghuCounty": "澎湖縣", "LienchiangCounty": "連江縣" } }, @@ -994,27 +994,27 @@ "LienchiangCounty" ], "x-enum": { + "Taipei": "臺北市", + "NewTaipei": "新北市", + "Taoyuan": "桃園市", + "Taichung": "臺中市", + "Tainan": "臺南市", "Kaohsiung": "高雄市", + "Keelung": "基隆市", + "Hsinchu": "新竹市", "HsinchuCounty": "新竹縣", - "Taoyuan": "桃園市", - "ChiayiCounty": "嘉義縣", - "KinmenCounty": "金門縣", - "YunlinCounty": "雲林縣", + "MiaoliCounty": "苗栗縣", "ChanghuaCounty": "彰化縣", + "NantouCounty": "南投縣", + "YunlinCounty": "雲林縣", + "ChiayiCounty": "嘉義縣", + "Chiayi": "嘉義市", "PingtungCounty": "屏東縣", - "Keelung": "基隆市", "YilanCounty": "宜蘭縣", - "NewTaipei": "新北市", - "PenghuCounty": "澎湖縣", - "TaitungCounty": "臺東縣", - "Taichung": "臺中市", - "Taipei": "臺北市", "HualienCounty": "花蓮縣", - "Tainan": "臺南市", - "MiaoliCounty": "苗栗縣", - "Hsinchu": "新竹市", - "Chiayi": "嘉義市", - "NantouCounty": "南投縣", + "TaitungCounty": "臺東縣", + "KinmenCounty": "金門縣", + "PenghuCounty": "澎湖縣", "LienchiangCounty": "連江縣" } }, @@ -1151,28 +1151,28 @@ "LienchiangCounty" ], "x-enum": { - "PenghuCounty": "澎湖縣", - "ChiayiCounty": "嘉義縣", - "Taichung": "臺中市", - "LienchiangCounty": "連江縣", + "Taipei": "臺北市", "NewTaipei": "新北市", - "TaitungCounty": "臺東縣", + "Taoyuan": "桃園市", + "Taichung": "臺中市", + "Tainan": "臺南市", "Kaohsiung": "高雄市", + "Keelung": "基隆市", + "Hsinchu": "新竹市", "HsinchuCounty": "新竹縣", - "Taipei": "臺北市", + "MiaoliCounty": "苗栗縣", + "ChanghuaCounty": "彰化縣", "NantouCounty": "南投縣", - "YilanCounty": "宜蘭縣", + "YunlinCounty": "雲林縣", + "ChiayiCounty": "嘉義縣", "Chiayi": "嘉義市", + "PingtungCounty": "屏東縣", + "YilanCounty": "宜蘭縣", "HualienCounty": "花蓮縣", - "ChanghuaCounty": "彰化縣", - "Taoyuan": "桃園市", + "TaitungCounty": "臺東縣", "KinmenCounty": "金門縣", - "Hsinchu": "新竹市", - "PingtungCounty": "屏東縣", - "Tainan": "臺南市", - "Keelung": "基隆市", - "MiaoliCounty": "苗栗縣", - "YunlinCounty": "雲林縣" + "PenghuCounty": "澎湖縣", + "LienchiangCounty": "連江縣" } }, { @@ -1295,28 +1295,28 @@ "LienchiangCounty" ], "x-enum": { - "PenghuCounty": "澎湖縣", - "ChiayiCounty": "嘉義縣", - "Taichung": "臺中市", - "LienchiangCounty": "連江縣", + "Taipei": "臺北市", "NewTaipei": "新北市", - "TaitungCounty": "臺東縣", + "Taoyuan": "桃園市", + "Taichung": "臺中市", + "Tainan": "臺南市", "Kaohsiung": "高雄市", + "Keelung": "基隆市", + "Hsinchu": "新竹市", "HsinchuCounty": "新竹縣", - "Taipei": "臺北市", + "MiaoliCounty": "苗栗縣", + "ChanghuaCounty": "彰化縣", "NantouCounty": "南投縣", - "YilanCounty": "宜蘭縣", + "YunlinCounty": "雲林縣", + "ChiayiCounty": "嘉義縣", "Chiayi": "嘉義市", + "PingtungCounty": "屏東縣", + "YilanCounty": "宜蘭縣", "HualienCounty": "花蓮縣", - "ChanghuaCounty": "彰化縣", - "Taoyuan": "桃園市", + "TaitungCounty": "臺東縣", "KinmenCounty": "金門縣", - "Hsinchu": "新竹市", - "PingtungCounty": "屏東縣", - "Tainan": "臺南市", - "Keelung": "基隆市", - "MiaoliCounty": "苗栗縣", - "YunlinCounty": "雲林縣" + "PenghuCounty": "澎湖縣", + "LienchiangCounty": "連江縣" } }, { @@ -1446,28 +1446,28 @@ "LienchiangCounty" ], "x-enum": { - "YunlinCounty": "雲林縣", - "KinmenCounty": "金門縣", - "ChiayiCounty": "嘉義縣", + "Taipei": "臺北市", "NewTaipei": "新北市", - "NantouCounty": "南投縣", - "ChanghuaCounty": "彰化縣", - "Hsinchu": "新竹市", + "Taoyuan": "桃園市", "Taichung": "臺中市", - "HsinchuCounty": "新竹縣", - "LienchiangCounty": "連江縣", - "PenghuCounty": "澎湖縣", - "Keelung": "基隆市", - "PingtungCounty": "屏東縣", - "MiaoliCounty": "苗栗縣", "Tainan": "臺南市", "Kaohsiung": "高雄市", - "TaitungCounty": "臺東縣", - "Taipei": "臺北市", - "Taoyuan": "桃園市", + "Keelung": "基隆市", + "Hsinchu": "新竹市", + "HsinchuCounty": "新竹縣", + "MiaoliCounty": "苗栗縣", + "ChanghuaCounty": "彰化縣", + "NantouCounty": "南投縣", + "YunlinCounty": "雲林縣", + "ChiayiCounty": "嘉義縣", "Chiayi": "嘉義市", + "PingtungCounty": "屏東縣", "YilanCounty": "宜蘭縣", - "HualienCounty": "花蓮縣" + "HualienCounty": "花蓮縣", + "TaitungCounty": "臺東縣", + "KinmenCounty": "金門縣", + "PenghuCounty": "澎湖縣", + "LienchiangCounty": "連江縣" } }, { @@ -1590,28 +1590,28 @@ "LienchiangCounty" ], "x-enum": { - "YunlinCounty": "雲林縣", - "KinmenCounty": "金門縣", - "ChiayiCounty": "嘉義縣", + "Taipei": "臺北市", "NewTaipei": "新北市", - "NantouCounty": "南投縣", - "ChanghuaCounty": "彰化縣", - "Hsinchu": "新竹市", + "Taoyuan": "桃園市", "Taichung": "臺中市", - "HsinchuCounty": "新竹縣", - "LienchiangCounty": "連江縣", - "PenghuCounty": "澎湖縣", - "Keelung": "基隆市", - "PingtungCounty": "屏東縣", - "MiaoliCounty": "苗栗縣", "Tainan": "臺南市", "Kaohsiung": "高雄市", - "TaitungCounty": "臺東縣", - "Taipei": "臺北市", - "Taoyuan": "桃園市", + "Keelung": "基隆市", + "Hsinchu": "新竹市", + "HsinchuCounty": "新竹縣", + "MiaoliCounty": "苗栗縣", + "ChanghuaCounty": "彰化縣", + "NantouCounty": "南投縣", + "YunlinCounty": "雲林縣", + "ChiayiCounty": "嘉義縣", "Chiayi": "嘉義市", + "PingtungCounty": "屏東縣", "YilanCounty": "宜蘭縣", - "HualienCounty": "花蓮縣" + "HualienCounty": "花蓮縣", + "TaitungCounty": "臺東縣", + "KinmenCounty": "金門縣", + "PenghuCounty": "澎湖縣", + "LienchiangCounty": "連江縣" } }, { @@ -1743,28 +1743,28 @@ "LienchiangCounty" ], "x-enum": { + "Taipei": "臺北市", "NewTaipei": "新北市", - "PingtungCounty": "屏東縣", - "MiaoliCounty": "苗栗縣", - "Keelung": "基隆市", - "KinmenCounty": "金門縣", - "NantouCounty": "南投縣", + "Taoyuan": "桃園市", + "Taichung": "臺中市", + "Tainan": "臺南市", "Kaohsiung": "高雄市", - "Taipei": "臺北市", - "PenghuCounty": "澎湖縣", + "Keelung": "基隆市", "Hsinchu": "新竹市", "HsinchuCounty": "新竹縣", - "Tainan": "臺南市", - "Taoyuan": "桃園市", - "ChiayiCounty": "嘉義縣", - "YunlinCounty": "雲林縣", - "TaitungCounty": "臺東縣", + "MiaoliCounty": "苗栗縣", "ChanghuaCounty": "彰化縣", - "Taichung": "臺中市", - "LienchiangCounty": "連江縣", + "NantouCounty": "南投縣", + "YunlinCounty": "雲林縣", + "ChiayiCounty": "嘉義縣", + "Chiayi": "嘉義市", + "PingtungCounty": "屏東縣", "YilanCounty": "宜蘭縣", "HualienCounty": "花蓮縣", - "Chiayi": "嘉義市" + "TaitungCounty": "臺東縣", + "KinmenCounty": "金門縣", + "PenghuCounty": "澎湖縣", + "LienchiangCounty": "連江縣" } }, { @@ -1852,28 +1852,28 @@ "LienchiangCounty" ], "x-enum": { - "MiaoliCounty": "苗栗縣", - "HsinchuCounty": "新竹縣", - "NantouCounty": "南投縣", - "TaitungCounty": "臺東縣", - "Chiayi": "嘉義市", + "Taipei": "臺北市", + "NewTaipei": "新北市", "Taoyuan": "桃園市", + "Taichung": "臺中市", + "Tainan": "臺南市", + "Kaohsiung": "高雄市", "Keelung": "基隆市", - "LienchiangCounty": "連江縣", - "Taipei": "臺北市", + "Hsinchu": "新竹市", + "HsinchuCounty": "新竹縣", + "MiaoliCounty": "苗栗縣", "ChanghuaCounty": "彰化縣", - "NewTaipei": "新北市", + "NantouCounty": "南投縣", + "YunlinCounty": "雲林縣", + "ChiayiCounty": "嘉義縣", + "Chiayi": "嘉義市", + "PingtungCounty": "屏東縣", "YilanCounty": "宜蘭縣", + "HualienCounty": "花蓮縣", + "TaitungCounty": "臺東縣", "KinmenCounty": "金門縣", - "Kaohsiung": "高雄市", - "PingtungCounty": "屏東縣", - "Tainan": "臺南市", "PenghuCounty": "澎湖縣", - "Taichung": "臺中市", - "YunlinCounty": "雲林縣", - "ChiayiCounty": "嘉義縣", - "Hsinchu": "新竹市", - "HualienCounty": "花蓮縣" + "LienchiangCounty": "連江縣" } }, { @@ -1996,28 +1996,28 @@ "LienchiangCounty" ], "x-enum": { - "NantouCounty": "南投縣", - "Tainan": "臺南市", - "Taichung": "臺中市", - "ChiayiCounty": "嘉義縣", - "KinmenCounty": "金門縣", - "Taoyuan": "桃園市", "Taipei": "臺北市", - "MiaoliCounty": "苗栗縣", - "Hsinchu": "新竹市", + "NewTaipei": "新北市", + "Taoyuan": "桃園市", + "Taichung": "臺中市", + "Tainan": "臺南市", + "Kaohsiung": "高雄市", "Keelung": "基隆市", - "TaitungCounty": "臺東縣", + "Hsinchu": "新竹市", + "HsinchuCounty": "新竹縣", + "MiaoliCounty": "苗栗縣", "ChanghuaCounty": "彰化縣", - "YilanCounty": "宜蘭縣", - "LienchiangCounty": "連江縣", - "Kaohsiung": "高雄市", - "NewTaipei": "新北市", + "NantouCounty": "南投縣", "YunlinCounty": "雲林縣", + "ChiayiCounty": "嘉義縣", "Chiayi": "嘉義市", "PingtungCounty": "屏東縣", + "YilanCounty": "宜蘭縣", "HualienCounty": "花蓮縣", - "HsinchuCounty": "新竹縣", - "PenghuCounty": "澎湖縣" + "TaitungCounty": "臺東縣", + "KinmenCounty": "金門縣", + "PenghuCounty": "澎湖縣", + "LienchiangCounty": "連江縣" } }, { @@ -2140,28 +2140,28 @@ "LienchiangCounty" ], "x-enum": { - "NantouCounty": "南投縣", - "Tainan": "臺南市", - "Taichung": "臺中市", - "ChiayiCounty": "嘉義縣", - "KinmenCounty": "金門縣", - "Taoyuan": "桃園市", "Taipei": "臺北市", - "MiaoliCounty": "苗栗縣", - "Hsinchu": "新竹市", + "NewTaipei": "新北市", + "Taoyuan": "桃園市", + "Taichung": "臺中市", + "Tainan": "臺南市", + "Kaohsiung": "高雄市", "Keelung": "基隆市", - "TaitungCounty": "臺東縣", + "Hsinchu": "新竹市", + "HsinchuCounty": "新竹縣", + "MiaoliCounty": "苗栗縣", "ChanghuaCounty": "彰化縣", - "YilanCounty": "宜蘭縣", - "LienchiangCounty": "連江縣", - "Kaohsiung": "高雄市", - "NewTaipei": "新北市", + "NantouCounty": "南投縣", "YunlinCounty": "雲林縣", + "ChiayiCounty": "嘉義縣", "Chiayi": "嘉義市", "PingtungCounty": "屏東縣", + "YilanCounty": "宜蘭縣", "HualienCounty": "花蓮縣", - "HsinchuCounty": "新竹縣", - "PenghuCounty": "澎湖縣" + "TaitungCounty": "臺東縣", + "KinmenCounty": "金門縣", + "PenghuCounty": "澎湖縣", + "LienchiangCounty": "連江縣" } }, { @@ -2291,28 +2291,28 @@ "Taipei" ], "x-enum": { - "ChanghuaCounty": "彰化縣", - "Tainan": "臺南市", - "TaitungCounty": "臺東縣", - "KinmenCounty": "金門縣", - "PingtungCounty": "屏東縣", "Taipei": "臺北市", - "HualienCounty": "花蓮縣", - "NantouCounty": "南投縣", + "NewTaipei": "新北市", + "Taoyuan": "桃園市", "Taichung": "臺中市", - "LienchiangCounty": "連江縣", + "Tainan": "臺南市", + "Kaohsiung": "高雄市", + "Keelung": "基隆市", "Hsinchu": "新竹市", "HsinchuCounty": "新竹縣", - "Kaohsiung": "高雄市", "MiaoliCounty": "苗栗縣", - "NewTaipei": "新北市", - "YilanCounty": "宜蘭縣", - "Taoyuan": "桃園市", + "ChanghuaCounty": "彰化縣", + "NantouCounty": "南投縣", "YunlinCounty": "雲林縣", - "Keelung": "基隆市", - "PenghuCounty": "澎湖縣", + "ChiayiCounty": "嘉義縣", "Chiayi": "嘉義市", - "ChiayiCounty": "嘉義縣" + "PingtungCounty": "屏東縣", + "YilanCounty": "宜蘭縣", + "HualienCounty": "花蓮縣", + "TaitungCounty": "臺東縣", + "KinmenCounty": "金門縣", + "PenghuCounty": "澎湖縣", + "LienchiangCounty": "連江縣" } }, { @@ -2437,24 +2437,24 @@ "KinmenCounty" ], "x-enum": { - "YunlinCounty": "雲林縣", - "ChiayiCounty": "嘉義縣", - "Chiayi": "嘉義市", - "Hsinchu": "新竹市", - "HualienCounty": "花蓮縣", - "HsinchuCounty": "新竹縣", "Taipei": "臺北市", - "PingtungCounty": "屏東縣", - "KinmenCounty": "金門縣", - "NantouCounty": "南投縣", "NewTaipei": "新北市", - "Tainan": "臺南市", - "MiaoliCounty": "苗栗縣", - "PenghuCounty": "澎湖縣", "Kaohsiung": "高雄市", + "Hsinchu": "新竹市", + "HsinchuCounty": "新竹縣", + "MiaoliCounty": "苗栗縣", "ChanghuaCounty": "彰化縣", + "NantouCounty": "南投縣", + "YunlinCounty": "雲林縣", + "ChiayiCounty": "嘉義縣", + "Chiayi": "嘉義市", + "PingtungCounty": "屏東縣", + "YilanCounty": "宜蘭縣", + "HualienCounty": "花蓮縣", "TaitungCounty": "臺東縣", - "YilanCounty": "宜蘭縣" + "PenghuCounty": "澎湖縣", + "KinmenCounty": "金門縣", + "Tainan": "臺南市" } }, { @@ -2564,8 +2564,8 @@ "NewTaipei" ], "x-enum": { - "Taipei": "臺北市", "Tainan": "臺南市", + "Taipei": "臺北市", "NewTaipei": "新北市" } }, @@ -2670,8 +2670,8 @@ "NewTaipei" ], "x-enum": { - "Taipei": "臺北市", "Tainan": "臺南市", + "Taipei": "臺北市", "NewTaipei": "新北市" } }, @@ -2803,27 +2803,27 @@ ], "x-enum": { "Taipei": "臺北市", - "NantouCounty": "南投縣", - "HualienCounty": "花蓮縣", - "HsinchuCounty": "新竹縣", - "Kaohsiung": "高雄市", - "Chiayi": "嘉義市", + "NewTaipei": "新北市", "Taoyuan": "桃園市", + "Taichung": "臺中市", + "Tainan": "臺南市", + "Kaohsiung": "高雄市", + "Keelung": "基隆市", + "Hsinchu": "新竹市", + "HsinchuCounty": "新竹縣", + "MiaoliCounty": "苗栗縣", "ChanghuaCounty": "彰化縣", - "PingtungCounty": "屏東縣", + "NantouCounty": "南投縣", + "YunlinCounty": "雲林縣", "ChiayiCounty": "嘉義縣", - "TaitungCounty": "臺東縣", + "Chiayi": "嘉義市", + "PingtungCounty": "屏東縣", "YilanCounty": "宜蘭縣", - "Taichung": "臺中市", + "HualienCounty": "花蓮縣", + "TaitungCounty": "臺東縣", "KinmenCounty": "金門縣", - "YunlinCounty": "雲林縣", "PenghuCounty": "澎湖縣", - "Keelung": "基隆市", - "NewTaipei": "新北市", - "Hsinchu": "新竹市", - "MiaoliCounty": "苗栗縣", - "LienchiangCounty": "連江縣", - "Tainan": "臺南市" + "LienchiangCounty": "連江縣" } }, { @@ -2947,29 +2947,29 @@ ], "x-enum": { "Taipei": "臺北市", - "NantouCounty": "南投縣", - "HualienCounty": "花蓮縣", - "HsinchuCounty": "新竹縣", - "Kaohsiung": "高雄市", - "Chiayi": "嘉義市", + "NewTaipei": "新北市", "Taoyuan": "桃園市", - "ChanghuaCounty": "彰化縣", - "PingtungCounty": "屏東縣", - "ChiayiCounty": "嘉義縣", - "TaitungCounty": "臺東縣", - "YilanCounty": "宜蘭縣", "Taichung": "臺中市", - "KinmenCounty": "金門縣", - "YunlinCounty": "雲林縣", - "PenghuCounty": "澎湖縣", + "Tainan": "臺南市", + "Kaohsiung": "高雄市", "Keelung": "基隆市", - "NewTaipei": "新北市", "Hsinchu": "新竹市", + "HsinchuCounty": "新竹縣", "MiaoliCounty": "苗栗縣", - "LienchiangCounty": "連江縣", - "Tainan": "臺南市" - } - }, + "ChanghuaCounty": "彰化縣", + "NantouCounty": "南投縣", + "YunlinCounty": "雲林縣", + "ChiayiCounty": "嘉義縣", + "Chiayi": "嘉義市", + "PingtungCounty": "屏東縣", + "YilanCounty": "宜蘭縣", + "HualienCounty": "花蓮縣", + "TaitungCounty": "臺東縣", + "KinmenCounty": "金門縣", + "PenghuCounty": "澎湖縣", + "LienchiangCounty": "連江縣" + } + }, { "in": "path", "name": "RouteName", @@ -3093,24 +3093,24 @@ "PenghuCounty" ], "x-enum": { + "Taipei": "臺北市", + "NewTaipei": "新北市", + "Tainan": "臺南市", + "Hsinchu": "新竹市", + "HsinchuCounty": "新竹縣", + "MiaoliCounty": "苗栗縣", "ChanghuaCounty": "彰化縣", - "KinmenCounty": "金門縣", - "YunlinCounty": "雲林縣", "NantouCounty": "南投縣", - "Taipei": "臺北市", - "PenghuCounty": "澎湖縣", + "YunlinCounty": "雲林縣", "ChiayiCounty": "嘉義縣", "Chiayi": "嘉義市", - "Tainan": "臺南市", - "MiaoliCounty": "苗栗縣", - "Keelung": "基隆市", - "NewTaipei": "新北市", "PingtungCounty": "屏東縣", - "TaitungCounty": "臺東縣", - "Hsinchu": "新竹市", - "HsinchuCounty": "新竹縣", + "YilanCounty": "宜蘭縣", "HualienCounty": "花蓮縣", - "YilanCounty": "宜蘭縣" + "TaitungCounty": "臺東縣", + "KinmenCounty": "金門縣", + "PenghuCounty": "澎湖縣", + "Keelung": "基隆市" } }, { @@ -3229,24 +3229,24 @@ "PenghuCounty" ], "x-enum": { + "Taipei": "臺北市", + "NewTaipei": "新北市", + "Tainan": "臺南市", + "Hsinchu": "新竹市", + "HsinchuCounty": "新竹縣", + "MiaoliCounty": "苗栗縣", "ChanghuaCounty": "彰化縣", - "KinmenCounty": "金門縣", - "YunlinCounty": "雲林縣", "NantouCounty": "南投縣", - "Taipei": "臺北市", - "PenghuCounty": "澎湖縣", + "YunlinCounty": "雲林縣", "ChiayiCounty": "嘉義縣", "Chiayi": "嘉義市", - "Tainan": "臺南市", - "MiaoliCounty": "苗栗縣", - "Keelung": "基隆市", - "NewTaipei": "新北市", "PingtungCounty": "屏東縣", - "TaitungCounty": "臺東縣", - "Hsinchu": "新竹市", - "HsinchuCounty": "新竹縣", + "YilanCounty": "宜蘭縣", "HualienCounty": "花蓮縣", - "YilanCounty": "宜蘭縣" + "TaitungCounty": "臺東縣", + "KinmenCounty": "金門縣", + "PenghuCounty": "澎湖縣", + "Keelung": "基隆市" } }, { @@ -3375,28 +3375,28 @@ "LienchiangCounty" ], "x-enum": { + "Taipei": "臺北市", + "NewTaipei": "新北市", + "Taoyuan": "桃園市", "Taichung": "臺中市", + "Tainan": "臺南市", + "Kaohsiung": "高雄市", "Keelung": "基隆市", - "NantouCounty": "南投縣", - "LienchiangCounty": "連江縣", - "Taoyuan": "桃園市", "Hsinchu": "新竹市", - "YunlinCounty": "雲林縣", - "ChiayiCounty": "嘉義縣", - "KinmenCounty": "金門縣", - "Kaohsiung": "高雄市", - "YilanCounty": "宜蘭縣", "HsinchuCounty": "新竹縣", + "MiaoliCounty": "苗栗縣", "ChanghuaCounty": "彰化縣", - "Tainan": "臺南市", - "NewTaipei": "新北市", - "Taipei": "臺北市", + "NantouCounty": "南投縣", + "YunlinCounty": "雲林縣", + "ChiayiCounty": "嘉義縣", + "Chiayi": "嘉義市", "PingtungCounty": "屏東縣", - "MiaoliCounty": "苗栗縣", - "TaitungCounty": "臺東縣", + "YilanCounty": "宜蘭縣", "HualienCounty": "花蓮縣", + "TaitungCounty": "臺東縣", + "KinmenCounty": "金門縣", "PenghuCounty": "澎湖縣", - "Chiayi": "嘉義市" + "LienchiangCounty": "連江縣" } }, { @@ -3518,27 +3518,27 @@ "PenghuCounty" ], "x-enum": { - "Hsinchu": "新竹市", - "PenghuCounty": "澎湖縣", - "Keelung": "基隆市", + "NantouCounty": "南投縣", + "YunlinCounty": "雲林縣", "Taipei": "臺北市", - "KinmenCounty": "金門縣", - "PingtungCounty": "屏東縣", + "NewTaipei": "新北市", + "Taoyuan": "桃園市", "Taichung": "臺中市", + "Tainan": "臺南市", + "Kaohsiung": "高雄市", + "KinmenCounty": "金門縣", + "ChiayiCounty": "嘉義縣", + "Hsinchu": "新竹市", "ChanghuaCounty": "彰化縣", "Chiayi": "嘉義市", - "MiaoliCounty": "苗栗縣", - "NantouCounty": "南投縣", - "YilanCounty": "宜蘭縣", - "Kaohsiung": "高雄市", - "YunlinCounty": "雲林縣", "TaitungCounty": "臺東縣", - "Tainan": "臺南市", + "PingtungCounty": "屏東縣", + "PenghuCounty": "澎湖縣", + "YilanCounty": "宜蘭縣", "HsinchuCounty": "新竹縣", - "NewTaipei": "新北市", - "ChiayiCounty": "嘉義縣", "HualienCounty": "花蓮縣", - "Taoyuan": "桃園市" + "MiaoliCounty": "苗栗縣", + "Keelung": "基隆市" } }, { @@ -3660,27 +3660,27 @@ "PenghuCounty" ], "x-enum": { - "Hsinchu": "新竹市", - "PenghuCounty": "澎湖縣", - "Keelung": "基隆市", + "NantouCounty": "南投縣", + "YunlinCounty": "雲林縣", "Taipei": "臺北市", - "KinmenCounty": "金門縣", - "PingtungCounty": "屏東縣", + "NewTaipei": "新北市", + "Taoyuan": "桃園市", "Taichung": "臺中市", + "Tainan": "臺南市", + "Kaohsiung": "高雄市", + "KinmenCounty": "金門縣", + "ChiayiCounty": "嘉義縣", + "Hsinchu": "新竹市", "ChanghuaCounty": "彰化縣", "Chiayi": "嘉義市", - "MiaoliCounty": "苗栗縣", - "NantouCounty": "南投縣", - "YilanCounty": "宜蘭縣", - "Kaohsiung": "高雄市", - "YunlinCounty": "雲林縣", "TaitungCounty": "臺東縣", - "Tainan": "臺南市", + "PingtungCounty": "屏東縣", + "PenghuCounty": "澎湖縣", + "YilanCounty": "宜蘭縣", "HsinchuCounty": "新竹縣", - "NewTaipei": "新北市", - "ChiayiCounty": "嘉義縣", "HualienCounty": "花蓮縣", - "Taoyuan": "桃園市" + "MiaoliCounty": "苗栗縣", + "Keelung": "基隆市" } }, { @@ -3801,28 +3801,28 @@ "KinmenCounty" ], "x-enum": { + "Taipei": "臺北市", "NewTaipei": "新北市", - "Hsinchu": "新竹市", - "ChiayiCounty": "嘉義縣", - "Chiayi": "嘉義市", "Taoyuan": "桃園市", - "Keelung": "基隆市", - "LienchiangCounty": "連江縣", + "Taichung": "臺中市", + "Tainan": "臺南市", "Kaohsiung": "高雄市", + "Keelung": "基隆市", + "Hsinchu": "新竹市", "HsinchuCounty": "新竹縣", - "Taichung": "臺中市", - "PenghuCounty": "澎湖縣", - "TaitungCounty": "臺東縣", - "YilanCounty": "宜蘭縣", - "Taipei": "臺北市", - "PingtungCounty": "屏東縣", - "KinmenCounty": "金門縣", - "HualienCounty": "花蓮縣", - "YunlinCounty": "雲林縣", "MiaoliCounty": "苗栗縣", - "Tainan": "臺南市", "ChanghuaCounty": "彰化縣", - "NantouCounty": "南投縣" + "NantouCounty": "南投縣", + "YunlinCounty": "雲林縣", + "ChiayiCounty": "嘉義縣", + "Chiayi": "嘉義市", + "PingtungCounty": "屏東縣", + "YilanCounty": "宜蘭縣", + "HualienCounty": "花蓮縣", + "TaitungCounty": "臺東縣", + "KinmenCounty": "金門縣", + "PenghuCounty": "澎湖縣", + "LienchiangCounty": "連江縣" } }, { @@ -3936,28 +3936,28 @@ "KinmenCounty" ], "x-enum": { + "Taipei": "臺北市", "NewTaipei": "新北市", - "Hsinchu": "新竹市", - "ChiayiCounty": "嘉義縣", - "Chiayi": "嘉義市", "Taoyuan": "桃園市", - "Keelung": "基隆市", - "LienchiangCounty": "連江縣", + "Taichung": "臺中市", + "Tainan": "臺南市", "Kaohsiung": "高雄市", + "Keelung": "基隆市", + "Hsinchu": "新竹市", "HsinchuCounty": "新竹縣", - "Taichung": "臺中市", - "PenghuCounty": "澎湖縣", - "TaitungCounty": "臺東縣", - "YilanCounty": "宜蘭縣", - "Taipei": "臺北市", - "PingtungCounty": "屏東縣", - "KinmenCounty": "金門縣", - "HualienCounty": "花蓮縣", - "YunlinCounty": "雲林縣", "MiaoliCounty": "苗栗縣", - "Tainan": "臺南市", "ChanghuaCounty": "彰化縣", - "NantouCounty": "南投縣" + "NantouCounty": "南投縣", + "YunlinCounty": "雲林縣", + "ChiayiCounty": "嘉義縣", + "Chiayi": "嘉義市", + "PingtungCounty": "屏東縣", + "YilanCounty": "宜蘭縣", + "HualienCounty": "花蓮縣", + "TaitungCounty": "臺東縣", + "KinmenCounty": "金門縣", + "PenghuCounty": "澎湖縣", + "LienchiangCounty": "連江縣" } }, { @@ -4027,7 +4027,139 @@ "title": "Array", "type": "array", "items": { - "$ref": "#/definitions/PTX.Service.DTO.Bus.Specification.V2.BusRouteFare" + "$ref": "#/definitions/PTX.Service.DTO.Bus.Specification.V2.BusRouteFare" + } + } + }, + "304": { + "description": "服務端會在Response加上Last-Modified header,表示最近的更新時間。客戶端能利用此時間,於Request加上If-Modified-Since header,若沒有更新,服務端會回應304 StatusCode且空值Content" + }, + "299": { + "description": "加入參數'?health=true'即可查詢此API服務的健康狀態", + "schema": { + "$ref": "#/definitions/PTX.Service.DTO.Shared.Specification.V3.Base.DisplayHealth" + } + } + } + } + }, + "/v2/Bus/News/City/{City}": { + "get": { + "tags": [ + "CityBus" + ], + "summary": "取得指定[縣市]的市區公車最新消息資料", + "description": "市區公車最新消息資料", + "operationId": "CityBusApi_News", + "produces": [ + "application/json", + "application/xml" + ], + "parameters": [ + { + "in": "path", + "name": "City", + "description": "欲查詢縣市", + "required": true, + "type": "string", + "enum": [ + "Keelung", + "Tainan", + "KinmenCounty", + "Hsinchu", + "HsinchuCounty", + "MiaoliCounty", + "ChanghuaCounty", + "NantouCounty", + "YunlinCounty", + "ChiayiCounty", + "Chiayi", + "PingtungCounty", + "YilanCounty", + "HualienCounty", + "TaitungCounty", + "PenghuCounty" + ], + "x-enum": { + "Keelung": "基隆市", + "Hsinchu": "新竹市", + "Tainan": "臺南市", + "HsinchuCounty": "新竹縣", + "MiaoliCounty": "苗栗縣", + "ChanghuaCounty": "彰化縣", + "NantouCounty": "南投縣", + "YunlinCounty": "雲林縣", + "ChiayiCounty": "嘉義縣", + "Chiayi": "嘉義市", + "PingtungCounty": "屏東縣", + "YilanCounty": "宜蘭縣", + "HualienCounty": "花蓮縣", + "TaitungCounty": "臺東縣", + "PenghuCounty": "澎湖縣", + "KinmenCounty": "金門縣" + } + }, + { + "in": "query", + "name": "$select", + "description": "挑選", + "type": "string" + }, + { + "in": "query", + "name": "$filter", + "description": "過濾", + "type": "string" + }, + { + "in": "query", + "name": "$orderby", + "description": "排序", + "type": "string" + }, + { + "in": "query", + "name": "$top", + "description": "取前幾筆", + "type": "integer", + "default": 30 + }, + { + "in": "query", + "name": "$skip", + "description": "跳過前幾筆", + "type": "string" + }, + { + "in": "query", + "name": "health", + "description": "加入參數'?health=true'即可查詢此API服務的健康狀態", + "type": "string", + "enum": [ + "true", + "false" + ] + }, + { + "in": "query", + "name": "$format", + "description": "指定來源格式", + "required": true, + "type": "string", + "enum": [ + "JSON", + "XML" + ] + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "title": "Array", + "type": "array", + "items": { + "$ref": "#/definitions/PTX.Service.DTO.Bus.Specification.V2.BusNews" } } }, @@ -4043,14 +4175,14 @@ } } }, - "/v2/Bus/News/City/{City}": { + "/v2/Bus/StationGroup/City/{City}": { "get": { "tags": [ "CityBus" ], - "summary": "取得指定[縣市]的市區公車最新消息資料", - "description": "市區公車最新消息資料", - "operationId": "CityBusApi_News", + "summary": "取得指定[縣市]的市區公車組站位資料", + "description": "市區公車之各站牌所屬的組站位資料", + "operationId": "CityBusApi_StationGroup", "produces": [ "application/json", "application/xml" @@ -4063,14 +4195,34 @@ "required": true, "type": "string", "enum": [ - "Keelung", - "Tainan", - "KinmenCounty" + "Hsinchu", + "HsinchuCounty", + "MiaoliCounty", + "ChanghuaCounty", + "NantouCounty", + "YunlinCounty", + "ChiayiCounty", + "Chiayi", + "PingtungCounty", + "YilanCounty", + "HualienCounty", + "TaitungCounty", + "PenghuCounty" ], "x-enum": { - "KinmenCounty": "金門縣", - "Tainan": "臺南市", - "Keelung": "基隆市" + "Hsinchu": "新竹市", + "HsinchuCounty": "新竹縣", + "MiaoliCounty": "苗栗縣", + "ChanghuaCounty": "彰化縣", + "NantouCounty": "南投縣", + "YunlinCounty": "雲林縣", + "ChiayiCounty": "嘉義縣", + "Chiayi": "嘉義市", + "PingtungCounty": "屏東縣", + "YilanCounty": "宜蘭縣", + "HualienCounty": "花蓮縣", + "TaitungCounty": "臺東縣", + "PenghuCounty": "澎湖縣" } }, { @@ -4104,6 +4256,12 @@ "description": "跳過前幾筆", "type": "string" }, + { + "in": "query", + "name": "$spatialFilter", + "description": "空間過濾", + "type": "string" + }, { "in": "query", "name": "health", @@ -4133,7 +4291,7 @@ "title": "Array", "type": "array", "items": { - "$ref": "#/definitions/PTX.Service.DTO.Bus.Specification.V2.BusNews" + "$ref": "#/definitions/PTX.Service.DTO.Bus.Specification.V2.BusStationGroup" } } }, @@ -4149,14 +4307,14 @@ } } }, - "/v2/Bus/StationGroup/City/{City}": { + "/v2/Bus/FirstLastTripInfo/City/{City}": { "get": { "tags": [ "CityBus" ], - "summary": "取得指定[縣市]的市區公車組站位資料", - "description": "市區公車之各站牌所屬的組站位資料", - "operationId": "CityBusApi_StationGroup", + "summary": "取得指定[縣市]的市區公車路線首末班車資料", + "description": "市區公車之路線首末班車資料", + "operationId": "CityBusApi_FirstLastTripInfo", "produces": [ "application/json", "application/xml" @@ -4169,34 +4327,10 @@ "required": true, "type": "string", "enum": [ - "Hsinchu", - "HsinchuCounty", - "MiaoliCounty", - "ChanghuaCounty", - "NantouCounty", - "YunlinCounty", - "ChiayiCounty", - "Chiayi", - "PingtungCounty", - "YilanCounty", - "HualienCounty", - "TaitungCounty", - "PenghuCounty" + "KinmenCounty" ], "x-enum": { - "PingtungCounty": "屏東縣", - "ChiayiCounty": "嘉義縣", - "HualienCounty": "花蓮縣", - "ChanghuaCounty": "彰化縣", - "Chiayi": "嘉義市", - "NantouCounty": "南投縣", - "YunlinCounty": "雲林縣", - "YilanCounty": "宜蘭縣", - "TaitungCounty": "臺東縣", - "Hsinchu": "新竹市", - "PenghuCounty": "澎湖縣", - "HsinchuCounty": "新竹縣", - "MiaoliCounty": "苗栗縣" + "KinmenCounty": "金門縣" } }, { @@ -4230,12 +4364,6 @@ "description": "跳過前幾筆", "type": "string" }, - { - "in": "query", - "name": "$spatialFilter", - "description": "空間過濾", - "type": "string" - }, { "in": "query", "name": "health", @@ -4265,7 +4393,7 @@ "title": "Array", "type": "array", "items": { - "$ref": "#/definitions/PTX.Service.DTO.Bus.Specification.V2.BusStationGroup" + "$ref": "#/definitions/PTX.Service.DTO.Bus.Specification.V2.BusFirstLastTripInfo" } } }, @@ -4281,14 +4409,14 @@ } } }, - "/v2/Bus/FirstLastTripInfo/City/{City}": { + "/v2/Bus/FirstLastTripInfo/City/{City}/{RouteName}": { "get": { "tags": [ "CityBus" ], - "summary": "取得指定[縣市]的市區公車路線首末班車資料", + "summary": "取得指定[縣市],[路線名稱]的路線首末班車資料", "description": "市區公車之路線首末班車資料", - "operationId": "CityBusApi_FirstLastTripInfo", + "operationId": "CityBusApi_FirstLastTripInfo_1", "produces": [ "application/json", "application/xml" @@ -4307,6 +4435,13 @@ "KinmenCounty": "金門縣" } }, + { + "in": "path", + "name": "RouteName", + "description": "繁體中文路線名稱,如'307'", + "required": true, + "type": "string" + }, { "in": "query", "name": "$select", @@ -4383,14 +4518,14 @@ } } }, - "/v2/Bus/FirstLastTripInfo/City/{City}/{RouteName}": { + "/v2/Bus/Alert/City/{City}": { "get": { "tags": [ "CityBus" ], - "summary": "取得指定[縣市],[路線名稱]的路線首末班車資料", - "description": "市區公車之路線首末班車資料", - "operationId": "CityBusApi_FirstLastTripInfo_1", + "summary": "取得指定[縣市]的市區公車營運通阻資料", + "description": "市區公車營運通阻資料", + "operationId": "CityBusApi_Alert", "produces": [ "application/json", "application/xml" @@ -4403,19 +4538,36 @@ "required": true, "type": "string", "enum": [ - "KinmenCounty" + "Hsinchu", + "HsinchuCounty", + "MiaoliCounty", + "ChanghuaCounty", + "NantouCounty", + "YunlinCounty", + "ChiayiCounty", + "Chiayi", + "PingtungCounty", + "YilanCounty", + "HualienCounty", + "TaitungCounty", + "PenghuCounty" ], "x-enum": { - "KinmenCounty": "金門縣" + "Hsinchu": "新竹市", + "HsinchuCounty": "新竹縣", + "MiaoliCounty": "苗栗縣", + "ChanghuaCounty": "彰化縣", + "NantouCounty": "南投縣", + "YunlinCounty": "雲林縣", + "ChiayiCounty": "嘉義縣", + "Chiayi": "嘉義市", + "PingtungCounty": "屏東縣", + "YilanCounty": "宜蘭縣", + "HualienCounty": "花蓮縣", + "TaitungCounty": "臺東縣", + "PenghuCounty": "澎湖縣" } }, - { - "in": "path", - "name": "RouteName", - "description": "繁體中文路線名稱,如'307'", - "required": true, - "type": "string" - }, { "in": "query", "name": "$select", @@ -4476,7 +4628,7 @@ "title": "Array", "type": "array", "items": { - "$ref": "#/definitions/PTX.Service.DTO.Bus.Specification.V2.BusFirstLastTripInfo" + "$ref": "#/definitions/PTX.Service.DTO.Bus.Specification.V2.BusAlert" } } }, @@ -4528,27 +4680,27 @@ ], "x-enum": { "KinmenCounty": "金門縣", + "LienchiangCounty": "連江縣", + "PenghuCounty": "澎湖縣", + "HsinchuCounty": "新竹縣", + "MiaoliCounty": "苗栗縣", + "ChanghuaCounty": "彰化縣", + "Hsinchu": "新竹市", "NantouCounty": "南投縣", + "YunlinCounty": "雲林縣", "ChiayiCounty": "嘉義縣", - "Keelung": "基隆市", - "TaitungCounty": "臺東縣", - "Kaohsiung": "高雄市", + "Chiayi": "嘉義市", + "PingtungCounty": "屏東縣", "YilanCounty": "宜蘭縣", - "Hsinchu": "新竹市", "HualienCounty": "花蓮縣", - "PingtungCounty": "屏東縣", - "Taoyuan": "桃園市", - "Taichung": "臺中市", + "TaitungCounty": "臺東縣", "Taipei": "臺北市", - "PenghuCounty": "澎湖縣", - "ChanghuaCounty": "彰化縣", - "HsinchuCounty": "新竹縣", - "LienchiangCounty": "連江縣", - "Chiayi": "嘉義市", "NewTaipei": "新北市", - "MiaoliCounty": "苗栗縣", - "YunlinCounty": "雲林縣", - "Tainan": "臺南市" + "Taoyuan": "桃園市", + "Taichung": "臺中市", + "Tainan": "臺南市", + "Kaohsiung": "高雄市", + "Keelung": "基隆市" } }, { @@ -7381,7 +7533,96 @@ "title": "Array", "type": "array", "items": { - "$ref": "#/definitions/PTX.Service.DTO.Bus.Specification.V2.BusS2STravelTime" + "$ref": "#/definitions/PTX.Service.DTO.Bus.Specification.V2.BusS2STravelTime" + } + } + }, + "304": { + "description": "服務端會在Response加上Last-Modified header,表示最近的更新時間。客戶端能利用此時間,於Request加上If-Modified-Since header,若沒有更新,服務端會回應304 StatusCode且空值Content" + }, + "299": { + "description": "加入參數'?health=true'即可查詢此API服務的健康狀態", + "schema": { + "$ref": "#/definitions/PTX.Service.DTO.Shared.Specification.V3.Base.DisplayHealth" + } + } + } + } + }, + "/v2/Bus/Alert/InterCity": { + "get": { + "tags": [ + "InterCityBus" + ], + "summary": "取得公路客運之營運通阻資料", + "description": "公路客運之營運通阻資料", + "operationId": "InterCityBusApi_Alert", + "produces": [ + "application/json", + "application/xml" + ], + "parameters": [ + { + "in": "query", + "name": "$select", + "description": "挑選", + "type": "string" + }, + { + "in": "query", + "name": "$filter", + "description": "過濾", + "type": "string" + }, + { + "in": "query", + "name": "$orderby", + "description": "排序", + "type": "string" + }, + { + "in": "query", + "name": "$top", + "description": "取前幾筆", + "type": "integer", + "default": 30 + }, + { + "in": "query", + "name": "$skip", + "description": "跳過前幾筆", + "type": "string" + }, + { + "in": "query", + "name": "health", + "description": "加入參數'?health=true'即可查詢此API服務的健康狀態", + "type": "string", + "enum": [ + "true", + "false" + ] + }, + { + "in": "query", + "name": "$format", + "description": "指定來源格式", + "required": true, + "type": "string", + "enum": [ + "JSON", + "XML" + ] + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "title": "Array", + "type": "array", + "items": { + "$ref": "#/definitions/PTX.Service.DTO.Bus.Specification.V2.BusAlert" } } }, @@ -8386,6 +8627,306 @@ } } }, + "PTX.Service.DTO.Bus.Specification.V2.Scope+Operator": { + "title": "Operator", + "description": "營運業者資料", + "type": "object", + "properties": { + "OperatorID": { + "title": "String", + "description": "營運業者代碼 ,", + "type": "string" + }, + "OperatorName": { + "title": "NameType", + "description": "營運業者名稱", + "allOf": [ + { + "$ref": "#/definitions/PTX.Service.DTO.Shared.Specification.V2.Base.NameType" + } + ] + } + } + }, + "PTX.Service.DTO.Bus.Specification.V2.Scope+Stop": { + "title": "Stop", + "description": "站牌資料", + "type": "object", + "properties": { + "StopID": { + "title": "String", + "description": "地區既用中之站牌代碼(為原資料內碼)", + "type": "string" + }, + "StopName": { + "title": "NameType", + "description": "站牌名稱", + "allOf": [ + { + "$ref": "#/definitions/PTX.Service.DTO.Shared.Specification.V2.Base.NameType" + } + ] + }, + "StationID": { + "title": "String", + "description": "站位代碼", + "type": "string" + } + } + }, + "PTX.Service.DTO.Bus.Specification.V2.Scope+Station": { + "title": "Station", + "description": "站位資料", + "type": "object", + "properties": { + "StationID": { + "title": "String", + "description": "站位代碼", + "type": "string" + }, + "StationName": { + "title": "NameType", + "description": "站位名稱", + "allOf": [ + { + "$ref": "#/definitions/PTX.Service.DTO.Shared.Specification.V2.Base.NameType" + } + ] + } + } + }, + "PTX.Service.DTO.Bus.Specification.V2.Scope+Route": { + "title": "Route", + "description": "路線資料", + "type": "object", + "properties": { + "RouteID": { + "title": "String", + "description": "地區既用中之班次代碼(為原資料內碼)", + "type": "string" + }, + "RouteName": { + "title": "NameType", + "description": "路線名稱", + "allOf": [ + { + "$ref": "#/definitions/PTX.Service.DTO.Shared.Specification.V2.Base.NameType" + } + ] + }, + "Direction": { + "format": "int32", + "title": "integer", + "description": "影響方向 : [0:'去程',1:'返程',2:'迴圈',255:'未知']", + "type": "integer" + } + } + }, + "PTX.Service.DTO.Bus.Specification.V2.Scope+SubRoute": { + "title": "SubRoute", + "description": "附屬路線資料", + "type": "object", + "properties": { + "SubRouteID": { + "title": "String", + "description": "地區既用中之附屬班次代碼(為原資料內碼)", + "type": "string" + }, + "SubRouteName": { + "title": "NameType", + "description": "附屬路線名稱", + "allOf": [ + { + "$ref": "#/definitions/PTX.Service.DTO.Shared.Specification.V2.Base.NameType" + } + ] + }, + "Direction": { + "format": "int32", + "title": "integer", + "description": "影響方向 : [0:'去程',1:'返程',2:'迴圈',255:'未知']", + "type": "integer" + } + } + }, + "PTX.Service.DTO.Bus.Specification.V2.Scope+Trip": { + "title": "Trip", + "description": "班次代碼資料", + "type": "object", + "properties": { + "TripID": { + "title": "String", + "description": "地區既用中之班次代碼(為原資料內碼)", + "type": "string" + }, + "RouteID": { + "title": "String", + "description": "地區既用中之班次代碼(為原資料內碼)", + "type": "string" + }, + "SubRouteID": { + "title": "String", + "description": "地區既用中之附屬班次代碼(為原資料內碼)", + "type": "string" + }, + "Direction": { + "format": "int32", + "title": "integer", + "description": "影響方向 : [0:'去程',1:'返程',2:'迴圈',255:'未知']", + "type": "integer" + }, + "TripDepTime": { + "title": "String", + "description": "首站發車時間(HH:mm)", + "type": "string" + } + } + }, + "PTX.Service.DTO.Bus.Specification.V2.Scope": { + "title": "Scope", + "description": "通阻影響範圍", + "type": "object", + "properties": { + "Operators": { + "title": "Array", + "description": "營運業者資料", + "type": "array", + "items": { + "$ref": "#/definitions/PTX.Service.DTO.Bus.Specification.V2.Scope+Operator" + } + }, + "Stops": { + "title": "Array", + "description": "站牌資料", + "type": "array", + "items": { + "$ref": "#/definitions/PTX.Service.DTO.Bus.Specification.V2.Scope+Stop" + } + }, + "Stations": { + "title": "Array", + "description": "站位資料", + "type": "array", + "items": { + "$ref": "#/definitions/PTX.Service.DTO.Bus.Specification.V2.Scope+Station" + } + }, + "Routes": { + "title": "Array", + "description": "路線資料", + "type": "array", + "items": { + "$ref": "#/definitions/PTX.Service.DTO.Bus.Specification.V2.Scope+Route" + } + }, + "SubRoutes": { + "title": "Array", + "description": "附屬路線資料", + "type": "array", + "items": { + "$ref": "#/definitions/PTX.Service.DTO.Bus.Specification.V2.Scope+SubRoute" + } + }, + "Trips": { + "title": "Array", + "description": "班次資料", + "type": "array", + "items": { + "$ref": "#/definitions/PTX.Service.DTO.Bus.Specification.V2.Scope+Trip" + } + } + } + }, + "PTX.Service.DTO.Bus.Specification.V2.BusAlert": { + "title": "BusAlert", + "required": [ + "AlertID", + "Department", + "Description", + "Scope", + "Title" + ], + "type": "object", + "properties": { + "AlertID": { + "title": "String", + "description": "通阻事件原單位發布代碼", + "type": "string" + }, + "Title": { + "title": "String", + "description": "通阻標題", + "type": "string" + }, + "Description": { + "title": "String", + "description": "事件描述", + "type": "string" + }, + "Department": { + "title": "String", + "description": "發布單位", + "type": "string" + }, + "Status": { + "format": "int32", + "title": "integer", + "description": "營運狀況 : [0:'全部營運停止',1:'全部營運正常',2:'有異常狀況']", + "type": "integer" + }, + "Cause": { + "format": "int32", + "title": "integer", + "description": "原因 : [1:'事故',2:'維護',3:'技術問題',4:'施工',5:'急救',6:'天災',7:'示威遊行',8:'維安',9:'假日',10:'罷工',254:'其他',255:'未知原因']", + "type": "integer" + }, + "Effect": { + "format": "int32", + "title": "integer", + "description": "影響 : [1:'車輛改道',2:'服務班次增加',3:'服務班次減少',4:'服務班次取消',5:'服務班次改變',6:'站牌不停靠',7:'重大延遲',254:'其他影響',255:'未知影響']", + "type": "integer" + }, + "Scope": { + "title": "Scope", + "description": "通阻影響範圍", + "allOf": [ + { + "$ref": "#/definitions/PTX.Service.DTO.Bus.Specification.V2.Scope" + } + ] + }, + "AlertURL": { + "title": "String", + "description": "詳細描述網站連結", + "type": "string" + }, + "PublishTime": { + "title": "DateTime", + "description": "消息公告日期時間", + "type": "string" + }, + "StartTime": { + "title": "DateTime", + "description": "開始日期時間", + "type": "string" + }, + "EndTime": { + "title": "DateTime", + "description": "結束日期時間", + "type": "string" + }, + "SrcUpdateTime": { + "title": "DateTime", + "description": "[來源端平臺]此筆資料最後更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", + "type": "string" + }, + "UpdateTime": { + "title": "DateTime", + "description": "本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", + "type": "string" + } + } + }, "PTX.Service.DTO.Bus.Specification.V2.Embedded.Stop": { "title": "Stop", "description": "站牌代碼資料", @@ -8926,9 +9467,9 @@ "description": "語系", "type": "string" }, - "NewsCategory": { + "Department": { "title": "String", - "description": "消息類別", + "description": "發布單位", "type": "string" }, "Title": { @@ -8936,11 +9477,27 @@ "description": "消息標題", "type": "string" }, + "NewsCategory": { + "format": "int32", + "title": "integer", + "description": "消息類別 : [1:'最新消息',2:'新聞稿',3:'營運資訊',4:'轉乘資訊',5:'活動訊息',6:'系統公告',7:'通阻資訊',99:'其他']", + "type": "integer" + }, "Description": { "title": "String", "description": "內容描述", "type": "string" }, + "ContactName": { + "title": "String", + "description": "聯絡人/單位", + "type": "string" + }, + "ContactPhone": { + "title": "String", + "description": "聯絡電話", + "type": "string" + }, "NewsURL": { "title": "String", "description": "報導網站連結", @@ -8966,6 +9523,11 @@ "description": "結束時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" }, + "SrcUpdateTime": { + "title": "DateTime", + "description": "來源端平台資料更新時間", + "type": "string" + }, "UpdateTime": { "title": "DateTime", "description": "本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", @@ -10345,6 +10907,11 @@ "$ref": "#/definitions/PTX.Service.DTO.Bus.Specification.V2.StationStop" } }, + "Bearing": { + "title": "String", + "description": "方位角,E:東行;W:西行;S:南行;N:北行;SE:東南行;NE:東北行;SW:西南行;NW:西北行", + "type": "string" + }, "UpdateTime": { "title": "DateTime", "description": "資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", diff --git a/oas.bus.v3.json b/oas.bus.v3.json index 562057c7..302c874d 100644 --- a/oas.bus.v3.json +++ b/oas.bus.v3.json @@ -2004,7 +2004,7 @@ ], "summary": "取得指定[縣市]的公車通阻資料", "description": "市區公車之公車通阻資料", - "operationId": "CityBusApi_Alert", + "operationId": "CityBusApi_Alert_1", "produces": [ "application/json", "application/xml" diff --git a/oas.rail.v2.json b/oas.rail.v2.json index 0179d061..566c6ecd 100644 --- a/oas.rail.v2.json +++ b/oas.rail.v2.json @@ -110,11 +110,11 @@ "TMRT" ], "x-enum": { - "TRTC": "臺北捷運", "KRTC": "高雄捷運", + "TYMC": "桃園捷運", "TRTCMG": "貓空纜車", "TMRT": "臺中捷運", - "TYMC": "桃園捷運" + "TRTC": "臺北捷運" } }, { @@ -207,11 +207,11 @@ ], "x-enum": { "KRTC": "高雄捷運", + "TMRT": "臺中捷運", + "TYMC": "桃園捷運", "TRTC": "臺北捷運", "KLRT": "高雄輕軌", - "TYMC": "桃園捷運", "NTDLRT": "淡海輕軌", - "TMRT": "臺中捷運", "TRTCMG": "貓空纜車" } }, @@ -304,13 +304,13 @@ "TMRT" ], "x-enum": { - "TMRT": "臺中捷運", "TRTCMG": "貓空纜車", "TRTC": "臺北捷運", "NTDLRT": "淡海輕軌", - "TYMC": "桃園捷運", + "KLRT": "高雄輕軌", "KRTC": "高雄捷運", - "KLRT": "高雄輕軌" + "TMRT": "臺中捷運", + "TYMC": "桃園捷運" } }, { @@ -402,13 +402,13 @@ "TMRT" ], "x-enum": { - "KLRT": "高雄輕軌", + "NTDLRT": "淡海輕軌", + "TMRT": "臺中捷運", "TRTCMG": "貓空纜車", - "KRTC": "高雄捷運", + "TYMC": "桃園捷運", + "KLRT": "高雄輕軌", "TRTC": "臺北捷運", - "TMRT": "臺中捷運", - "NTDLRT": "淡海輕軌", - "TYMC": "桃園捷運" + "KRTC": "高雄捷運" } }, { @@ -496,8 +496,8 @@ ], "x-enum": { "TYMC": "桃園捷運", - "KRTC": "高雄捷運", - "TRTC": "臺北捷運" + "TRTC": "臺北捷運", + "KRTC": "高雄捷運" } }, { @@ -583,9 +583,9 @@ "TYMC" ], "x-enum": { - "TYMC": "桃園捷運", + "TRTC": "臺北捷運", "KRTC": "高雄捷運", - "TRTC": "臺北捷運" + "TYMC": "桃園捷運" } }, { @@ -675,12 +675,12 @@ "TMRT" ], "x-enum": { + "TRTCMG": "貓空纜車", + "KRTC": "高雄捷運", "TMRT": "臺中捷運", "TYMC": "桃園捷運", - "KLRT": "高雄輕軌", "TRTC": "臺北捷運", - "KRTC": "高雄捷運", - "TRTCMG": "貓空纜車" + "KLRT": "高雄輕軌" } }, { @@ -777,9 +777,9 @@ ], "x-enum": { "TYMC": "桃園捷運", - "TMRT": "臺中捷運", "NTDLRT": "淡海輕軌", "TRTC": "臺北捷運", + "TMRT": "臺中捷運", "KRTC": "高雄捷運" } }, @@ -872,9 +872,9 @@ "x-enum": { "TMRT": "臺中捷運", "TRTC": "臺北捷運", - "NTDLRT": "淡海輕軌", "TYMC": "桃園捷運", - "KRTC": "高雄捷運" + "KRTC": "高雄捷運", + "NTDLRT": "淡海輕軌" } }, { @@ -964,11 +964,11 @@ "TMRT" ], "x-enum": { - "KLRT": "高雄輕軌", "TYMC": "桃園捷運", - "TMRT": "臺中捷運", "KRTC": "高雄捷運", - "TRTC": "臺北捷運" + "TRTC": "臺北捷運", + "KLRT": "高雄輕軌", + "TMRT": "臺中捷運" } }, { @@ -1056,10 +1056,10 @@ "TMRT" ], "x-enum": { - "TYMC": "桃園捷運", "TRTC": "臺北捷運", + "KRTC": "高雄捷運", "TMRT": "臺中捷運", - "KRTC": "高雄捷運" + "TYMC": "桃園捷運" } }, { @@ -1149,9 +1149,9 @@ ], "x-enum": { "TRTC": "臺北捷運", + "KLRT": "高雄輕軌", "TYMC": "桃園捷運", - "KRTC": "高雄捷運", - "KLRT": "高雄輕軌" + "KRTC": "高雄捷運" } }, { @@ -1243,13 +1243,13 @@ "TMRT" ], "x-enum": { + "TRTC": "臺北捷運", "NTDLRT": "淡海輕軌", - "KLRT": "高雄輕軌", "TRTCMG": "貓空纜車", - "TRTC": "臺北捷運", + "KLRT": "高雄輕軌", "TMRT": "臺中捷運", - "KRTC": "高雄捷運", - "TYMC": "桃園捷運" + "TYMC": "桃園捷運", + "KRTC": "高雄捷運" } }, { @@ -1335,9 +1335,9 @@ "KRTC" ], "x-enum": { - "TYMC": "桃園捷運", "KRTC": "高雄捷運", - "TRTC": "臺北捷運" + "TRTC": "臺北捷運", + "TYMC": "桃園捷運" } }, { @@ -1427,8 +1427,8 @@ ], "x-enum": { "KRTC": "高雄捷運", - "KLRT": "高雄輕軌", "TYMC": "桃園捷運", + "KLRT": "高雄輕軌", "TRTC": "臺北捷運" } }, @@ -1518,9 +1518,9 @@ "NTDLRT" ], "x-enum": { - "TYMC": "桃園捷運", - "NTDLRT": "淡海輕軌", "TRTC": "臺北捷運", + "NTDLRT": "淡海輕軌", + "TYMC": "桃園捷運", "KRTC": "高雄捷運" } }, @@ -1609,9 +1609,9 @@ "KLRT" ], "x-enum": { - "KLRT": "高雄輕軌", "TYMC": "桃園捷運", - "KRTC": "高雄捷運" + "KRTC": "高雄捷運", + "KLRT": "高雄輕軌" } }, { @@ -1705,9 +1705,9 @@ "KLRT" ], "x-enum": { - "KRTC": "高雄捷運", + "TYMC": "桃園捷運", "KLRT": "高雄輕軌", - "TYMC": "桃園捷運" + "KRTC": "高雄捷運" } }, { diff --git a/oas.tourism.v2.json b/oas.tourism.v2.json index a9339b0d..966bb13d 100644 --- a/oas.tourism.v2.json +++ b/oas.tourism.v2.json @@ -133,28 +133,28 @@ "LienchiangCounty" ], "x-enum": { - "Taipei": "臺北市", - "YunlinCounty": "雲林縣", - "ChiayiCounty": "嘉義縣", + "NantouCounty": "南投縣", + "Kaohsiung": "高雄市", "PenghuCounty": "澎湖縣", - "MiaoliCounty": "苗栗縣", + "KinmenCounty": "金門縣", "HsinchuCounty": "新竹縣", - "Taoyuan": "桃園市", "NewTaipei": "新北市", - "Keelung": "基隆市", - "Hsinchu": "新竹市", - "Kaohsiung": "高雄市", - "NantouCounty": "南投縣", - "KinmenCounty": "金門縣", - "Tainan": "臺南市", - "Taichung": "臺中市", - "TaitungCounty": "臺東縣", - "Chiayi": "嘉義市", - "HualienCounty": "花蓮縣", + "PingtungCounty": "屏東縣", "ChanghuaCounty": "彰化縣", "YilanCounty": "宜蘭縣", + "HualienCounty": "花蓮縣", + "Taoyuan": "桃園市", "LienchiangCounty": "連江縣", - "PingtungCounty": "屏東縣" + "Hsinchu": "新竹市", + "Chiayi": "嘉義市", + "MiaoliCounty": "苗栗縣", + "YunlinCounty": "雲林縣", + "Keelung": "基隆市", + "Taipei": "臺北市", + "Tainan": "臺南市", + "TaitungCounty": "臺東縣", + "ChiayiCounty": "嘉義縣", + "Taichung": "臺中市" } }, { @@ -346,28 +346,28 @@ "LienchiangCounty" ], "x-enum": { + "HualienCounty": "花蓮縣", + "Kaohsiung": "高雄市", + "LienchiangCounty": "連江縣", "KinmenCounty": "金門縣", - "Hsinchu": "新竹市", - "MiaoliCounty": "苗栗縣", - "Keelung": "基隆市", - "NewTaipei": "新北市", - "Taichung": "臺中市", "ChanghuaCounty": "彰化縣", - "TaitungCounty": "臺東縣", - "Taoyuan": "桃園市", - "HualienCounty": "花蓮縣", + "Taichung": "臺中市", + "PingtungCounty": "屏東縣", "HsinchuCounty": "新竹縣", + "YunlinCounty": "雲林縣", "YilanCounty": "宜蘭縣", - "PingtungCounty": "屏東縣", + "Keelung": "基隆市", + "MiaoliCounty": "苗栗縣", + "Hsinchu": "新竹市", + "PenghuCounty": "澎湖縣", + "Taoyuan": "桃園市", + "NantouCounty": "南投縣", + "Chiayi": "嘉義市", + "TaitungCounty": "臺東縣", "ChiayiCounty": "嘉義縣", + "NewTaipei": "新北市", "Tainan": "臺南市", - "YunlinCounty": "雲林縣", - "Chiayi": "嘉義市", - "Kaohsiung": "高雄市", - "NantouCounty": "南投縣", - "Taipei": "臺北市", - "LienchiangCounty": "連江縣", - "PenghuCounty": "澎湖縣" + "Taipei": "臺北市" } }, { @@ -559,28 +559,28 @@ "LienchiangCounty" ], "x-enum": { + "LienchiangCounty": "連江縣", + "PenghuCounty": "澎湖縣", + "TaitungCounty": "臺東縣", + "YunlinCounty": "雲林縣", "PingtungCounty": "屏東縣", - "ChanghuaCounty": "彰化縣", - "MiaoliCounty": "苗栗縣", - "Tainan": "臺南市", "KinmenCounty": "金門縣", - "PenghuCounty": "澎湖縣", + "Chiayi": "嘉義市", + "ChiayiCounty": "嘉義縣", + "YilanCounty": "宜蘭縣", + "HsinchuCounty": "新竹縣", + "HualienCounty": "花蓮縣", + "NewTaipei": "新北市", + "Taichung": "臺中市", + "Tainan": "臺南市", "Keelung": "基隆市", "Taipei": "臺北市", - "Taichung": "臺中市", - "NewTaipei": "新北市", - "HualienCounty": "花蓮縣", + "ChanghuaCounty": "彰化縣", + "MiaoliCounty": "苗栗縣", "Kaohsiung": "高雄市", - "NantouCounty": "南投縣", - "HsinchuCounty": "新竹縣", - "YilanCounty": "宜蘭縣", "Taoyuan": "桃園市", - "LienchiangCounty": "連江縣", - "TaitungCounty": "臺東縣", - "Hsinchu": "新竹市", - "Chiayi": "嘉義市", - "YunlinCounty": "雲林縣", - "ChiayiCounty": "嘉義縣" + "NantouCounty": "南投縣", + "Hsinchu": "新竹市" } }, { @@ -772,28 +772,28 @@ "LienchiangCounty" ], "x-enum": { + "LienchiangCounty": "連江縣", + "PenghuCounty": "澎湖縣", + "TaitungCounty": "臺東縣", + "YunlinCounty": "雲林縣", "PingtungCounty": "屏東縣", - "ChanghuaCounty": "彰化縣", - "MiaoliCounty": "苗栗縣", - "Tainan": "臺南市", "KinmenCounty": "金門縣", - "PenghuCounty": "澎湖縣", + "Chiayi": "嘉義市", + "ChiayiCounty": "嘉義縣", + "YilanCounty": "宜蘭縣", + "HsinchuCounty": "新竹縣", + "HualienCounty": "花蓮縣", + "NewTaipei": "新北市", + "Taichung": "臺中市", + "Tainan": "臺南市", "Keelung": "基隆市", "Taipei": "臺北市", - "Taichung": "臺中市", - "NewTaipei": "新北市", - "HualienCounty": "花蓮縣", + "ChanghuaCounty": "彰化縣", + "MiaoliCounty": "苗栗縣", "Kaohsiung": "高雄市", - "NantouCounty": "南投縣", - "HsinchuCounty": "新竹縣", - "YilanCounty": "宜蘭縣", "Taoyuan": "桃園市", - "LienchiangCounty": "連江縣", - "TaitungCounty": "臺東縣", - "Hsinchu": "新竹市", - "Chiayi": "嘉義市", - "YunlinCounty": "雲林縣", - "ChiayiCounty": "嘉義縣" + "NantouCounty": "南投縣", + "Hsinchu": "新竹市" } }, {