Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Different artifact's content after registering an OpenAPI definition #2508

Closed
arindamdas25 opened this issue May 18, 2022 · 3 comments
Closed
Assignees
Labels
type/bug Something isn't working

Comments

@arindamdas25
Copy link

arindamdas25 commented May 18, 2022

I've attached a sample API definition in yaml which I'll paste here. If I upload the file from UI and create Open API artifact it works absolutely fine and I can see Open API documentation etc. But if I create same artifact using Java client I get Artifact isn't a valid OpenAPI structure and Unexpected token o in JSON at position 0.
I will paste first my Java client code:

try (RegistryClient client = RegistryClientFactory.create(registryUrl);
				InputStream aPIInputStream = Files.newInputStream(Paths.get("src/main/resources/public/swagger/api-docs.yaml"), StandardOpenOption.SYNC))
{
	client.createArtifact("apicuriodemo", "apicuriodemo.OpenAPI", "v1", ArtifactType.OPENAPI, IfExists.RETURN_OR_UPDATE, false,
					"API Definition for apicuriodemo", "API Definition for apicuriodemo", aPIInputStream);
}
catch (IOException e)
{
	e.printStackTrace();
}
@arindamdas25
Copy link
Author

api-docs.yaml.zip

@arindamdas25
Copy link
Author

I've attached yaml file hope that helps.

@EricWittmann EricWittmann added the type/bug Something isn't working label May 31, 2022
@EricWittmann
Copy link
Member

Already closed but pinging @carlesarnal anyway. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants