Skip to content
This repository has been archived by the owner on Jan 21, 2024. It is now read-only.

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

Open
namitrk97 opened this issue Nov 12, 2020 · 0 comments
Open

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

namitrk97 opened this issue Nov 12, 2020 · 0 comments

Comments

@namitrk97
Copy link

namitrk97 commented Nov 12, 2020

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!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant