Tribe__Tickets__REST__V1__Endpoints__Ticket_Archive::get_documentation()

Returns an array in the format used by Swagger 2.0.

Contents

While the structure must conform to that used by v2.0 of Swagger the structure can be that of a full document or that of a document part. The intelligence lies in the "gatherer" of informations rather than in the single "providers" implementing this interface.


Return

(array) An array description of a Swagger supported component.


Top ↑

Source

File: src/Tribe/REST/V1/Endpoints/Ticket_Archive.php

	public function get_documentation() {
		return array(
			'get' => array(
				'parameters' => $this->swaggerize_args( $this->READ_args(), array( 'in' => 'query', 'default' => '' ) ),
				'responses'  => array(
					'200' => array(
						'description' => __( 'Returns all the tickets matching the search criteria', 'event-tickets' ),
						'content' => array(
							'application/json' => array(
								'schema'      => array(
									'type'       => 'object',
									'properties' => array(
										'rest_url'    => array(
											'type'        => 'string',
											'format'      => 'uri',
											'description' => __( 'This results page REST URL', 'event-tickets' ),
										),
										'total'       => array(
											'type'       => 'integer',
											'description' => __( 'The total number of results across all pages', 'event-tickets' ),
										),
										'total_pages' => array(
											'type'       => 'integer',
											'description' => __( 'The total number of result pages matching the search criteria', 'event-tickets' ),
										),
										'tickets'   => array(
											'type'  => 'array',
											'items' => array( '$ref' => '#/components/schemas/Ticket' ),
										),
									),
								),
							),
						),
					),
					'400' => array(
						'description' => __( 'One or more of the specified query variables has a bad format', 'event-tickets' ),
						'content'     => array(
							'application/json' => array(
								'schema' => array(
									'type' => 'object',
								),
							),
						),
					),
					'404' => array(
						'description' => __( 'The requested page was not found.', 'event-tickets' ),
						'content'     => array(
							'application/json' => array(
								'schema' => array(
									'type' => 'object',
								),
							),
						),
					),
				),
			),
		);
	}