apigee / apigeelint

Static code analysis for Apigee proxy bundles to encourage API developers to use best practices and avoid anti-patterns.
Apache License 2.0
92 stars 71 forks source link

No error for incorred XML #357

Closed hpatoio closed 11 months ago

hpatoio commented 1 year ago

I've this XML. Please note the double </Request>

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ProxyEndpoint name="default">
    <PreFlow name="PreFlow">
        <Request>
            <Step>
                <Name>oas-validation</Name>
            </Step>
        </Request>
        </Request>
        <Response/>
    </PreFlow>
    <Flows/>
    <PostFlow name="PostFlow">
        <Request/>
        <Response/>
    </PostFlow>
    <HTTPProxyConnection>
        <BasePath>/foo-1</BasePath>
        <VirtualHost>fpp-app</VirtualHost>
    </HTTPProxyConnection>
    <RouteRule name="default">
        <TargetEndpoint>default</TargetEndpoint>
    </RouteRule>
</ProxyEndpoint>

No errors or warning are reported by apigeelint but when I run apigeetool (https://github.com/apigee/apigeetool-node) I get this error

Deployment result: "JAXBException occurred : Unexpected close tag </Request>; expected </PreFlow>.\n at [row,col {unknown-source}]: [12,17]. Unexpected close tag </Request>; expected </PreFlow>.\n at [row,col {unknown-source}]: [12,17]. "

Is there a way to report error/warning when the XML is not correct ?

DinoChiesa commented 11 months ago

This is now fixed via #389.
Thanks for reporting it.