Skip to content
This repository was archived by the owner on Feb 12, 2022. It is now read-only.

Conversation

@giordanolucas
Copy link
Contributor

Also replaced the logic used to get the schemaPath on ExternalSchemaTypeExpressionNode.java <-- Please review this

@giordanolucas giordanolucas requested review from dfmacias and svacas July 3, 2018 20:35
ResolvedType resolvedType = getResolvedType();
if (resolvedType instanceof AbstractExternalType)
{
if (!((AbstractExternalType) resolvedType).getSchemaPath().equalsIgnoreCase(ARTIFICIAL_NODE))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you add this check?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No reason, I can remove it if you want.
I thought it was not right to expose that string to the user

import javax.annotation.Nullable;
import javax.json.JsonObject;

import org.apache.commons.lang.StringUtils;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unused import

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, removed


import static org.hamcrest.CoreMatchers.instanceOf;
import static org.hamcrest.core.Is.is;
import static org.junit.Assert.*;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't use import * and remove unused ones, please

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, removed.


Api apiV10 = ramlModelResult.getApiV10();

Assert.assertTrue(((XMLTypeDeclaration) apiV10.resources().get(0).methods().get(0).body().get(0)).schemaPath().endsWith("person-schema.xsd"));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A better approach would be checking if schema path is right compared with raml path src/test/resources/org/raml/v2/api/v10/xml-external/input.raml

@pacafuentes pacafuentes merged commit fc30e04 into master Jul 6, 2018
@jstoiko jstoiko deleted the feature/schema-path branch June 13, 2019 16:55
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants