Skip to content

Commit 27d0bb2

Browse files
authored
Merge pull request #3293 from masatake/openapi-minor-changes-2
OpenAPI: minor changes
2 parents d00442e + ab87135 commit 27d0bb2

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

parsers/openapi.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ static const enum openapiKeys host2Keys[] = {
224224
KEY_HOST,
225225
};
226226

227-
const struct tagSource tagSources[] = {
227+
static const struct tagSource tagSources[] = {
228228
{
229229
KIND_PATH,
230230
pathKeys,
@@ -262,7 +262,7 @@ const struct tagSource tagSources[] = {
262262
},
263263
};
264264

265-
const struct tagSource tagValueSources[] = {
265+
static const struct tagSource tagValueSources[] = {
266266
{
267267
KIND_TITLE,
268268
title3Keys,
@@ -383,14 +383,14 @@ static void inputEnd(subparser *s)
383383
Assert (((struct sOpenAPISubparser*)s)->type_stack == NULL);
384384
}
385385

386-
static void
387-
findOpenAPITags (void)
386+
static void findOpenAPITags (void)
388387
{
389388
scheduleRunningBaseparser (0);
390389
}
391390

392391
extern parserDefinition* OpenAPIParser (void)
393392
{
393+
static const char *const patterns [] = { "openapi.yaml", NULL };
394394
static struct sOpenAPISubparser openapiSubparser = {
395395
.yaml = {
396396
.subparser = {
@@ -407,6 +407,8 @@ extern parserDefinition* OpenAPIParser (void)
407407

408408
parserDefinition* const def = parserNew ("OpenAPI");
409409

410+
def->patterns = patterns;
411+
410412
def->dependencies = dependencies;
411413
def->dependencyCount = ARRAY_SIZE (dependencies);
412414

0 commit comments

Comments
 (0)