Skip to main content

Version: 24.04

svc-typecheck

The svc-typecheck task will perform script type checking for the given service project.

If the service definition has the attribute"legacyGroovy": true, then the Groovy script will be validated using the legacy Groovy API script validator. The TM server must be configured to allow use of legacy Groovy services.

Task Attributes

All attributes are optional unless otherwise indicated.

AttributeDescription
srcString

Required. The service definition file.

failonerrorBoolean

Fail on error build flag for type check. The default value is true.

Example

The example Ant task below performs type checking of the specified service.

<svc-typecheck src="src/trackme-dd/service-def.json"/>

Example Ant log output:

type-check:
[svc-typecheck] type check errors in 'TrackMeDDTest.groovy':
[svc-typecheck] 32: [Static type checking] - Cannot find matching method com.avoka.tm.util.Path#value(java.lang.String). Please check if the declared type is right and if the method exists.
[svc-typecheck] @ line 32, column 37.
[svc-typecheck] assert "123 Wall Street" == path.value("address.firstLine")
[svc-typecheck] ^
[svc-typecheck] Completed Type Check