Tribe__Tickets__REST__V1__Endpoints__QR::get_documentation()

Returns an array in the format used by Swagger 2.0.

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 information 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/QR.php

	public function get_documentation() {
		$POST_defaults = [
			'in'      => 'formData',
			'default' => '',
			'type'    => 'string',
		];
		$post_args     = array_merge( $this->READ_args(), $this->CHECK_IN_args() );

		return [
			'post' => [
				'consumes'   => [ 'application/x-www-form-urlencoded' ],
				'parameters' => $this->swaggerize_args( $post_args, $POST_defaults ),
				'responses'  => [
					'201' => [
						'description' => __( 'Returns successful check in', 'event-tickets' ),
						'schema'      => [
							'$ref' => '#/definitions/Ticket',
						],
					],
					'400' => [
						'description' => __( 'A required parameter is missing or an input parameter is in the wrong format', 'event-tickets' ),
					],
					'403' => [
						'description' => esc_html(
							sprintf(
								// Translators: %s is the 'ticket' label (singular, lowercase).
								__( 'The %s is already checked in', 'event-tickets' ),
								tribe_get_ticket_label_singular_lowercase( 'rest_qr' )
							)
						),
					],
				],
			],
		];
	}

Top ↑

Changelog

Changelog
Version Description
5.7.0 Introduced.