Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package org.openapitools.openapidiff.core;

import static org.openapitools.openapidiff.core.TestUtils.assertOpenApiAreEquals;

import org.junit.jupiter.api.Test;

public class NestedSchemaRefTest {

private final String OPENAPI_DOC1 = "nested_schema_ref_1.yaml";

@Test
public void shouldNotThrowErrorsForNestedRefs() {
assertOpenApiAreEquals(OPENAPI_DOC1, OPENAPI_DOC1);
}
}
44 changes: 44 additions & 0 deletions core/src/test/resources/nested_schema_ref_1.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
openapi: 3.0.1
info:
title: Service
description: test
version: test
contact:
name: test
url: 'test'
servers:
- url: 'localhost'
paths:
/feature:
get:
summary: Get feature state
operationId: feature
description: Gets feature
parameters:
- name: feature
in: query
schema:
$ref: '#/components/schemas/Feature/properties/feature'
required: true
responses:
'200':
description: Found feature
content:
application/json:
schema:
$ref: '#/components/schemas/Feature'
components:
schemas:
Feature:
type: object
properties:
feature:
type: string
enum:
- alpha
- beta
value:
type: boolean
required:
- feature
- value