public static String resolveSchema ( String schema , RamlRoot document ) { if ( document == null || schema == null || schema . indexOf ( "{" ) != - 1 ) { return null ; } if ( document . getSchemas ( ) != null && ! document . getSchemas ( ) . isEmpty ( ) ) { for ( Map < String , String > map : document . getSchemas ( ) ) { if ( map . containsKey ( schema ) ) { return map . get ( schema ) ; } } } return null ; }
Utility method that will return a schema if the identifier is valid and exists in the raml file definition .