Skip to content

Commit 9470b79

Browse files
committed
OpenAPI: remove 'info' header parsing
It is non-informative and rarely used.
1 parent a53d1d1 commit 9470b79

File tree

3 files changed

+0
-21
lines changed

3 files changed

+0
-21
lines changed

Units/parser-openapi.r/openapi.d/expected.tags

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
title input.yaml /^ title: test$/;" I
2-
description input.yaml /^ description: test$/;" I
3-
version input.yaml /^ version: '1.0'$/;" I
41
http://example.com input.yaml /^ - url: http:\/\/example.com$/;" S
52
http://example2.com input.yaml /^ - url: http:\/\/example2.com$/;" S
63
/sample/path input.yaml /^ \/sample\/path:$/;" p

Units/parser-openapi.r/swagger.d/expected.tags

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
description input.yaml /^ description: test$/;" I
2-
title input.yaml /^ title: test$/;" I
3-
version input.yaml /^ version: '1.0'$/;" I
41
/sample/path input.yaml /^ \/sample\/path:$/;" p
52
/sample/other/path input.yaml /^ \/sample\/other\/path:$/;" p
63
PolymorphicString input.yaml /^ PolymorphicString:$/;" d

parsers/openapi.c

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ typedef enum {
2828
KIND_PATH,
2929
KIND_RESPONSE,
3030
KIND_PARAMETER,
31-
KIND_INFO,
3231
KIND_SERVER,
3332
KIND_SECURITY,
3433
KIND_TAG,
@@ -47,7 +46,6 @@ static kindDefinition OpenAPIKinds [] = {
4746
{ true, 'p', "path", "paths" },
4847
{ true, 'R', "response", "responses" },
4948
{ true, 'P', "parameter", "parameters" },
50-
{ true, 'I', "info", "info"},
5149
{ true, 'S', "server", "servers"},
5250
{ true, 's', "security", "security"},
5351
{ true, 't', "tag", "tags"},
@@ -69,7 +67,6 @@ enum openapiKeys {
6967
KEY_PARAMETERS,
7068
KEY_RESPONSES,
7169
KEY_DEFINITIONS,
72-
KEY_INFO,
7370
KEY_SERVERS,
7471
KEY_SECURITY,
7572
KEY_TAG,
@@ -94,7 +91,6 @@ static const keywordTable OpenAPIKeywordTable[] = {
9491
{ "parameters", KEY_PARAMETERS },
9592
{ "responses", KEY_RESPONSES },
9693
{ "definitions", KEY_DEFINITIONS },
97-
{ "info", KEY_INFO },
9894
{ "servers", KEY_SERVERS },
9995
{ "security", KEY_SECURITY },
10096
{ "tags", KEY_TAG },
@@ -293,11 +289,6 @@ static const enum openapiKeys examples3Keys[] = {
293289
KEY_COMPONENTS,
294290
};
295291

296-
static const enum openapiKeys info3Keys[] = {
297-
KEY_UNKNOWN,
298-
KEY_INFO,
299-
};
300-
301292
static const enum openapiKeys server3Keys[] = {
302293
KEY_URL,
303294
KEY_UNKNOWN,
@@ -324,13 +315,7 @@ static const enum openapiKeys externalDocs3Keys[] = {
324315
};
325316

326317

327-
328318
const struct tagSource tagSources[] = {
329-
{
330-
KIND_INFO,
331-
info3Keys,
332-
ARRAY_SIZE (info3Keys),
333-
},
334319
{
335320
KIND_EXAMPLE,
336321
examples3Keys,

0 commit comments

Comments
 (0)