rest_get_allowed_schema_keywords

函式
rest_get_allowed_schema_keywords ( No parameters )
返回值
  • (string[]) All valid JSON schema properties.
定義位置
相關方法
get_allowed_themesrest_send_allow_headerget_site_allowed_themesget_allowed_http_originsget_allowed_mime_types
引入
5.6.0
棄用
-

rest_get_allowed_schema_keywords: 這個函式用來獲取一個模式的允許的關鍵字。它接收一個模式物件並返回一個允許的關鍵字陣列。

獲取所有有效的JSON模式屬性。

function rest_get_allowed_schema_keywords() {
	return array(
		'title',
		'description',
		'default',
		'type',
		'format',
		'enum',
		'items',
		'properties',
		'additionalProperties',
		'patternProperties',
		'minProperties',
		'maxProperties',
		'minimum',
		'maximum',
		'exclusiveMinimum',
		'exclusiveMaximum',
		'multipleOf',
		'minLength',
		'maxLength',
		'pattern',
		'minItems',
		'maxItems',
		'uniqueItems',
		'anyOf',
		'oneOf',
	);
}

常見問題

FAQs
檢視更多 >