WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content
This repository was archived by the owner on Jan 21, 2024. It is now read-only.
This repository was archived by the owner on Jan 21, 2024. It is now read-only.

Bug: Servers are lost when resolving an OAS30 yaml file #88

@namitrk97

Description

@namitrk97

Library version used
0.5.0

Language library used with
Java

Describe the bug
After resolving an OAS3 YAML file using OAS30.resolve(), the "servers" seem to get lost. However it does not happen with OAS2/RAML

Code that causes a bug

URL url = TestData.class.getResource("//file");
WebApiDocument webApiDocument = (WebApiDocument) Oas30.parseYaml(String.valueOf(url)).get();
WebApiDocument resolved = (WebApiDocument) Oas30.resolve(webApiDocument).get();
WebApi webApi = (WebApi) resolved.encodes();

Actual behaviour/output/error
webApi.servers() is empty.

Expected behaviour/output
webApi.servers() should contain a list of servers as specified in the file.

Additional context
It does not happen when you don't resolve. Getting the webApi object from webApiDocument.encodes() works as expected. webApi.servers() gives the expected output.

Any OAS3 yaml file, with servers defined can be used to test this.
Will appreciate the help!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions