Skip to content
Merged
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
Expand Up @@ -48,7 +48,7 @@ public void testIssue146() {
" content:\n" +
" '*/*':\n" +
" schema:\n" +
" $ref: '#/components/schemas/OperationType'\n" +
" $ref: \"#/components/schemas/OperationType\"\n" +
"components:\n" +
" schemas:\n" +
" OperationType:\n" +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -608,8 +608,8 @@ public void testSiblingsReferenceJSONSchema5() {
" type: object\n" +
" PatientPerson:\n" +
" allOf:\n" +
" - $ref: '#/components/schemas/Person'\n" +
" - $ref: '#/components/schemas/Patient'\n" +
" - $ref: \"#/components/schemas/Person\"\n" +
" - $ref: \"#/components/schemas/Patient\"\n" +
" unevaluatedProperties: false\n" +
" $ref: ./ex.json#patient-person";
SwaggerParseResult result = new OpenAPIV3Parser().readContents( refSibling , null, options);
Expand Down Expand Up @@ -883,11 +883,11 @@ public void testNotDefaultSchemaType() {
" type: object\n" +
" properties:\n" +
" any_value:\n" +
" $ref: '#/components/schemas/AnyValue'\n" +
" $ref: \"#/components/schemas/AnyValue\"\n" +
" any_value_with_desc:\n" +
" $ref: '#/components/schemas/AnyValueWithDesc'\n" +
" $ref: \"#/components/schemas/AnyValueWithDesc\"\n" +
" any_value_nullable:\n" +
" $ref: '#/components/schemas/AnyValueNullable'\n" +
" $ref: \"#/components/schemas/AnyValueNullable\"\n" +
" AnyValueModelInline:\n" +
" description: test any value inline\n" +
" type: object\n" +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,10 @@ public void testDeserializeYamlDefinitionMissingSchema_Issue1951() throws Except
// content:
// application/json:
// schema:
// $ref: '#/components/schemas/ThingRequest'
// $ref: \"#/components/schemas/ThingRequest\"
// responses:
// "401":
// $ref: '#/components/responses/ErrorObj'
// $ref: \"#/components/responses/ErrorObj\"
// default:
// description: Default response is just a string
// content:
Expand All @@ -126,7 +126,7 @@ public void testDeserializeYamlDefinitionMissingSchema_Issue1951() throws Except
// content:
// application/json:
// schema:
// $ref: '#/components/schemas/NotAddedYet'
// $ref: \"#/components/schemas/NotAddedYet\"

ParseOptions options = new ParseOptions();
options.setResolve(true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -578,19 +578,19 @@ public void testSelfReferenceResolution()throws Exception {
" content:\n" +
" 'application/json':\n" +
" schema:\n" +
" $ref: '#/components/schemas/SchemaB'\n" +
" $ref: \"#/components/schemas/SchemaB\"\n" +
"components:\n" +
" schemas:\n" +
" SchemaA:\n" +
" properties:\n" +
" name:\n" +
" type: string\n" +
" modelB:\n" +
" $ref: '#/components/schemas/SchemaB'\n" +
" $ref: \"#/components/schemas/SchemaB\"\n" +
" SchemaB:\n" +
" properties:\n" +
" modelB:\n" +
" $ref: '#/components/schemas/SchemaB'";
" $ref: \"#/components/schemas/SchemaB\"";

ParseOptions options = new ParseOptions();
options.setResolve(true);
Expand Down Expand Up @@ -620,7 +620,7 @@ public void testIssue85() {
" name: \"body\"\n" +
" required: false\n" +
" schema: \n" +
" $ref: '#/components/Schemas/StructureA'\n" +
" $ref: \"#/components/Schemas/StructureA\"\n" +
"components: \n" +
" schemas:\n" +
" StructureA: \n" +
Expand All @@ -631,7 +631,7 @@ public void testIssue85() {
" arrayOfOtherType: \n" +
" type: array\n" +
" items: \n" +
" $ref: '#/definitions/StructureB'\n" +
" $ref: \"#/definitions/StructureB\"\n" +
" StructureB: \n" +
" type: object\n" +
" properties: \n" +
Expand Down Expand Up @@ -796,7 +796,7 @@ public void selfReferenceTest() {
" content:\n" +
" application/json:\n" +
" schema:\n" +
" $ref: '#/components/schemas/ModelA'\n" +
" $ref: \"#/components/schemas/ModelA\"\n" +
" responses:\n" +
" default:\n" +
" description: Default response\n" +
Expand All @@ -806,7 +806,7 @@ public void selfReferenceTest() {
" content:\n" +
" application/json:\n" +
" schema:\n" +
" $ref: '#/components/schemas/ModelB'\n" +
" $ref: \"#/components/schemas/ModelB\"\n" +
" responses:\n" +
" default:\n" +
" description: Default response\n" +
Expand All @@ -816,7 +816,7 @@ public void selfReferenceTest() {
" content:\n" +
" application/json:\n" +
" schema:\n" +
" $ref: '#/components/schemas/ModelC'\n" +
" $ref: \"#/components/schemas/ModelC\"\n" +
" responses:\n" +
" default:\n" +
" description: Default response\n" +
Expand All @@ -828,7 +828,7 @@ public void selfReferenceTest() {
" content:\n" +
" '*/*':\n" +
" schema:\n" +
" $ref: '#/components/schemas/ModelA'\n" +
" $ref: \"#/components/schemas/ModelA\"\n" +
" /selfRefE:\n" +
" get:\n" +
" responses:\n" +
Expand All @@ -839,7 +839,7 @@ public void selfReferenceTest() {
" schema:\n" +
" type: array\n" +
" items:\n" +
" $ref: '#/components/schemas/ModelA'\n" +
" $ref: \"#/components/schemas/ModelA\"\n" +
"info:\n" +
" version: ''\n" +
" title: ''\n" +
Expand All @@ -848,15 +848,15 @@ public void selfReferenceTest() {
" ModelA:\n" +
" properties:\n" +
" modelB:\n" +
" $ref: '#/components/schemas/ModelB'\n" +
" $ref: \"#/components/schemas/ModelB\"\n" +
" ModelB:\n" +
" properties:\n" +
" modelB:\n" +
" $ref: '#/components/schemas/ModelB'\n" +
" $ref: \"#/components/schemas/ModelB\"\n" +
" ModelC:\n" +
" properties:\n" +
" modelA:\n" +
" $ref: '#/components/schemas/ModelA'";
" $ref: \"#/components/schemas/ModelA\"";

ParseOptions options = new ParseOptions();
options.setResolve(true);
Expand Down Expand Up @@ -1315,7 +1315,7 @@ public void testIssue291() {
" get:\n" +
" description: test get\n" +
" parameters:\n" +
" - $ref: '#/components/parameters/testParam'\n" +
" - $ref: \"#/components/parameters/testParam\"\n" +
" responses:\n" +
" default:\n" +
" description: test response\n" +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -253,9 +253,9 @@ public void testPathItemBasicRef() throws Exception {
" \"200\":\n" +
" description: OK\n" +
" /internalref:\n" +
" $ref: '#/components/pathItems/InternalRef'\n" +
" $ref: \"#/components/pathItems/InternalRef\"\n" +
" /internalreftoexternal:\n" +
" $ref: '#/components/pathItems/InternalRefToExternal'\n" +
" $ref: \"#/components/pathItems/InternalRefToExternal\"\n" +
" /internal:\n" +
" get:\n" +
" description: Internal PathItem\n" +
Expand Down Expand Up @@ -314,7 +314,7 @@ public void testPathItemExternalInternalNestedRef() throws Exception {
" \"200\":\n" +
" description: OK\n" +
" /internalref:\n" +
" $ref: '#/components/pathItems/InternalRef'\n" +
" $ref: \"#/components/pathItems/InternalRef\"\n" +
" /internal:\n" +
" get:\n" +
" description: Internal PathItem\n" +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ public void testIssue1643_True() throws Exception{
" content:\n" +
" application/json:\n" +
" schema:\n" +
" $ref: '#/components/schemas/Person'\n" +
" $ref: \"#/components/schemas/Person\"\n" +
"components:\n" +
" schemas:\n" +
" Person:\n" +
Expand All @@ -336,7 +336,7 @@ public void testIssue1643_True() throws Exception{
" name:\n" +
" type: string\n" +
" employee:\n" +
" $ref: '#/components/schemas/Employee'";
" $ref: \"#/components/schemas/Employee\"";
SwaggerParseResult result = new OpenAPIV3Parser().readContents(issue1643, null, options);

Assert.assertNotNull(result);
Expand Down Expand Up @@ -369,7 +369,7 @@ public void testIssue1643_False() throws Exception{
" content:\n" +
" application/json:\n" +
" schema:\n" +
" $ref: '#/components/schemas/Person'\n" +
" $ref: \"#/components/schemas/Person\"\n" +
"components:\n" +
" schemas:\n" +
" Person:\n" +
Expand All @@ -380,7 +380,7 @@ public void testIssue1643_False() throws Exception{
" name:\n" +
" type: string\n" +
" employee:\n" +
" $ref: '#/components/schemas/Employee'";
" $ref: \"#/components/schemas/Employee\"";
SwaggerParseResult result = new OpenAPIV3Parser().readContents(issue1643, null, options);

Assert.assertNotNull(result);
Expand Down Expand Up @@ -1428,7 +1428,7 @@ public void testRefPaths() throws Exception {
" 200:\n" +
" description: OK\n" +
" /foo2:\n" +
" $ref: '#/paths/~1foo'";
" $ref: \"#/paths/~1foo\"";

OpenAPIV3Parser parser = new OpenAPIV3Parser();
OpenAPI openAPI = (parser.readContents(yaml,null,null)).getOpenAPI();
Expand Down Expand Up @@ -1515,14 +1515,14 @@ public void testParseRefPathParameters() throws Exception {
"paths:\n" +
" /reports/{id}:\n" +
" parameters:\n" +
" - $ref: '#/parameters/report-id'\n" +
" - $ref: \"#/parameters/report-id\"\n" +
" put:\n" +
" parameters:\n" +
" - name: id\n" +
" in: body\n" +
" required: true\n" +
" schema:\n" +
" $ref: '#/components/schemas/report'\n" +
" $ref: \"#/components/schemas/report\"\n" +
" responses:\n" +
" 200:\n" +
" description: ok\n" +
Expand Down Expand Up @@ -1552,28 +1552,28 @@ public void testUniqueParameters() throws Exception {
"paths:\n" +
" '/foos/{id}':\n" +
" parameters:\n" +
" - $ref: '#/components/parameters/foo-id'\n" +
" - $ref: \"#/components/parameters/foo-id\"\n" +
" get:\n" +
" responses:\n" +
" '200':\n" +
" description: OK\n" +
" content:\n" +
" '*/*':\n" +
" schema:\n" +
" $ref: '#/components/schemas/foo'\n" +
" $ref: \"#/components/schemas/foo\"\n" +
" put:\n" +
" responses:\n" +
" '200':\n" +
" description: OK\n" +
" content:\n" +
" '*/*':\n" +
" schema:\n" +
" $ref: '#/components/schemas/foo'\n" +
" $ref: \"#/components/schemas/foo\"\n" +
" requestBody:\n" +
" content:\n" +
" application/json:\n" +
" schema:\n" +
" $ref: '#/components/schemas/foo'\n" +
" $ref: \"#/components/schemas/foo\"\n" +
" required: true\n" +
"components:\n" +
" parameters:\n" +
Expand Down Expand Up @@ -2105,7 +2105,7 @@ public void testCodegenIssue4555() throws Exception {
" '200':\n" +
" description: OK\n" +
" schema: null\n" +
" $ref: '#/components/schemas/Content'\n" +
" $ref: \"#/components/schemas/Content\"\n" +
"components:\n" +
" schemas:\n" +
" Content:\n" +
Expand Down Expand Up @@ -2141,7 +2141,7 @@ public void testConverterIssue17() throws Exception {
" content:\n" +
" '*/*':\n" +
" schema:\n" +
" $ref: '#/components/schemas/Content'\n" +
" $ref: \"#/components/schemas/Content\"\n" +
"components:\n" +
" schemas:\n" +
" Content:\n" +
Expand Down Expand Up @@ -2174,8 +2174,8 @@ public void testIssue393() {
" The account could not be created because a credential didn't meet\n" +
" the complexity requirements.\n" +
" x-error-refs:\n" +
" - $ref: '#/x-error-defs/credentialTooShort'\n" +
" - $ref: '#/x-error-defs/credentialTooLong'\n" +
" - $ref: \"#/x-error-defs/credentialTooShort\"\n" +
" - $ref: \"#/x-error-defs/credentialTooLong\"\n" +
"x-error-defs:\n" +
" credentialTooShort:\n" +
" errorID: credentialTooShort";
Expand Down Expand Up @@ -2270,19 +2270,19 @@ public void testIncompatibleRefs() {
" post:\n" +
" responses:\n" +
" '200':\n" +
" $ref: '#/components/schemas/Schema'\n" +
" $ref: \"#/components/schemas/Schema\"\n" +
" '400':\n" +
" definitions: this is right\n" +
" description: Bad Request\n" +
" content:\n" +
" '*/*':\n" +
" schema:\n" +
" $ref: '#/components/schemas/Schema'\n" +
" $ref: \"#/components/schemas/Schema\"\n" +
" requestBody:\n" +
" content:\n" +
" application/json:\n" +
" schema:\n" +
" $ref: '#/components/schemas/Schema'\n" +
" $ref: \"#/components/schemas/Schema\"\n" +
" required: true\n" +
"info:\n" +
" version: ''\n" +
Expand Down Expand Up @@ -2311,7 +2311,7 @@ public void testIssue243() {
" content:\n" +
" '*/*':\n" +
" schema:\n" +
" $ref: '#/components/schemas/Simple'\n" +
" $ref: \"#/components/schemas/Simple\"\n" +
"components:\n" +
" schemas:\n" +
" Simple:\n" +
Expand Down Expand Up @@ -2373,7 +2373,7 @@ public void testIssue450() {
" PetArray:\n" +
" type: array\n" +
" items:\n" +
" $ref: '#/components/schemas/Pet'\n" +
" $ref: \"#/components/schemas/Pet\"\n" +
" description: An array of Pets\n" +
" x-my-tag: An extension tag\n" +
" Pet:\n" +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ public void testIssue409() {
" - emailAddress\n" +
" properties:\n" +
" id:\n" +
" $ref: '#/components/schemas/ID'\n" +
" $ref: \"#/components/schemas/ID\"\n" +
" emailAddress:\n" +
" type: string\n" +
" format: email\n" +
Expand Down
Loading
Loading