Open Lighting Architecture: common/web/SchemaKeywords.h Source File

| Open Lighting Architecture 0.10.9

Loading...
Searching...
No Matches
SchemaKeywords.h
1/*
2 * This library is free software; you can redistribute it and/or
3 * modify it under the terms of the GNU Lesser General Public
4 * License as published by the Free Software Foundation; either
5 * version 2.1 of the License, or (at your option) any later version.
6 *
7 * This library is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
10 * Lesser General Public License for more details.
11 *
12 * You should have received a copy of the GNU Lesser General Public
13 * License along with this library; if not, write to the Free Software
14 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 *
16 * SchemaKeywords.h
17 * The keywords used in JSON Schema.
18 * Copyright (C) 2014 Simon Newton
19 */
20
21#ifndef COMMON_WEB_SCHEMAKEYWORDS_H_
22#define COMMON_WEB_SCHEMAKEYWORDS_H_
23
24#include <string>
25
26namespace ola {
27namespace web {
28
32 enum SchemaKeyword {
33 SCHEMA_UNKNOWN,
34 SCHEMA_ID,
35 SCHEMA_SCHEMA,
36 SCHEMA_REF,
37 SCHEMA_TITLE,
38 SCHEMA_DESCRIPTION,
39 SCHEMA_DEFAULT,
40 SCHEMA_FORMAT,
41 SCHEMA_MULTIPLEOF,
42 SCHEMA_MAXIMUM,
43 SCHEMA_EXCLUSIVE_MAXIMUM,
44 SCHEMA_MINIMUM,
45 SCHEMA_EXCLUSIVE_MINIMUM,
46 SCHEMA_MAX_LENGTH,
47 SCHEMA_MIN_LENGTH,
48 SCHEMA_PATTERN,
49 SCHEMA_ADDITIONAL_ITEMS,
50 SCHEMA_ITEMS,
51 SCHEMA_MAX_ITEMS,
52 SCHEMA_MIN_ITEMS,
53 SCHEMA_UNIQUE_ITEMS,
54 SCHEMA_MAX_PROPERTIES,
55 SCHEMA_MIN_PROPERTIES,
56 SCHEMA_REQUIRED,
57 SCHEMA_ADDITIONAL_PROPERTIES,
58 SCHEMA_DEFINITIONS,
59 SCHEMA_PROPERTIES,
60 SCHEMA_PATTERN_PROPERTIES,
61 SCHEMA_DEPENDENCIES,
62 SCHEMA_ENUM,
63 SCHEMA_TYPE,
64 SCHEMA_ALL_OF,
65 SCHEMA_ANY_OF,
66 SCHEMA_ONE_OF,
67 SCHEMA_NOT,
68};
69
73std::string KeywordToString(SchemaKeyword keyword);
74
79 SchemaKeyword LookupKeyword(const std::string& keyword);
80
81} // namespace web
82} // namespace ola
83#endif // COMMON_WEB_SCHEMAKEYWORDS_H_
ola::web
Classes to deal with web services.
Definition Json.cpp:29
ola::web::SchemaKeyword
SchemaKeyword
The list of valid JSon Schema keywords.
Definition SchemaKeywords.h:32
ola::web::SCHEMA_UNKNOWN
@ SCHEMA_UNKNOWN
Definition SchemaKeywords.h:33
ola::web::LookupKeyword
SchemaKeyword LookupKeyword(const string &keyword)
Map a string to a SchemaKeyword.
Definition SchemaKeywords.cpp:106
ola::web::KeywordToString
string KeywordToString(SchemaKeyword keyword)
Definition SchemaKeywords.cpp:30
ola
The namespace containing all OLA symbols.
Definition Credentials.cpp:44