Skip to content

Commit

Permalink
OpenAPI: remove 'info' header parsing
Browse files Browse the repository at this point in the history
It is non-informative and rarely used.
  • Loading branch information
segoon committed Jan 7, 2022
1 parent a53d1d1 commit 9470b79
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 21 deletions.
3 changes: 0 additions & 3 deletions Units/parser-openapi.r/openapi.d/expected.tags
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
title input.yaml /^ title: test$/;" I
description input.yaml /^ description: test$/;" I
version input.yaml /^ version: '1.0'$/;" I
http://example.com input.yaml /^ - url: http:\/\/example.com$/;" S
http://example2.com input.yaml /^ - url: http:\/\/example2.com$/;" S
/sample/path input.yaml /^ \/sample\/path:$/;" p
Expand Down
3 changes: 0 additions & 3 deletions Units/parser-openapi.r/swagger.d/expected.tags
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
description input.yaml /^ description: test$/;" I
title input.yaml /^ title: test$/;" I
version input.yaml /^ version: '1.0'$/;" I
/sample/path input.yaml /^ \/sample\/path:$/;" p
/sample/other/path input.yaml /^ \/sample\/other\/path:$/;" p
PolymorphicString input.yaml /^ PolymorphicString:$/;" d
Expand Down
15 changes: 0 additions & 15 deletions parsers/openapi.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ typedef enum {
KIND_PATH,
KIND_RESPONSE,
KIND_PARAMETER,
KIND_INFO,
KIND_SERVER,
KIND_SECURITY,
KIND_TAG,
Expand All @@ -47,7 +46,6 @@ static kindDefinition OpenAPIKinds [] = {
{ true, 'p', "path", "paths" },
{ true, 'R', "response", "responses" },
{ true, 'P', "parameter", "parameters" },
{ true, 'I', "info", "info"},
{ true, 'S', "server", "servers"},
{ true, 's', "security", "security"},
{ true, 't', "tag", "tags"},
Expand All @@ -69,7 +67,6 @@ enum openapiKeys {
KEY_PARAMETERS,
KEY_RESPONSES,
KEY_DEFINITIONS,
KEY_INFO,
KEY_SERVERS,
KEY_SECURITY,
KEY_TAG,
Expand All @@ -94,7 +91,6 @@ static const keywordTable OpenAPIKeywordTable[] = {
{ "parameters", KEY_PARAMETERS },
{ "responses", KEY_RESPONSES },
{ "definitions", KEY_DEFINITIONS },
{ "info", KEY_INFO },
{ "servers", KEY_SERVERS },
{ "security", KEY_SECURITY },
{ "tags", KEY_TAG },
Expand Down Expand Up @@ -293,11 +289,6 @@ static const enum openapiKeys examples3Keys[] = {
KEY_COMPONENTS,
};

static const enum openapiKeys info3Keys[] = {
KEY_UNKNOWN,
KEY_INFO,
};

static const enum openapiKeys server3Keys[] = {
KEY_URL,
KEY_UNKNOWN,
Expand All @@ -324,13 +315,7 @@ static const enum openapiKeys externalDocs3Keys[] = {
};



const struct tagSource tagSources[] = {
{
KIND_INFO,
info3Keys,
ARRAY_SIZE (info3Keys),
},
{
KIND_EXAMPLE,
examples3Keys,
Expand Down

0 comments on commit 9470b79

Please sign in to comment.