ParserSettings

data class ParserSettings(val yamlCodePointLimit: Int? = null, val yamlMaxAliasesForCollections: Int? = null, val yamlAllowRecursiveKeys: Boolean? = null, val yamlNestingDepthLimit: Int? = null)

Settings for configuring the SnakeYAML parser used by swagger-parser.

YAML settings default to null, which preserves SnakeYAML's built-in defaults:

  • yamlCodePointLimit: ~3MB (3,145,728 code points)

  • yamlMaxAliasesForCollections: 50

  • yamlAllowRecursiveKeys: false

  • yamlNestingDepthLimit: 50

Thread Safety: These settings configure DeserializationUtils.getOptions(), which is a global static in swagger-parser. Parsing calls are synchronized by art.galushko.openapi.testgen.openapi.OpenApiSpecParser to ensure each parse run applies settings atomically.

Constructors

Link copied to clipboard
constructor(yamlCodePointLimit: Int? = null, yamlMaxAliasesForCollections: Int? = null, yamlAllowRecursiveKeys: Boolean? = null, yamlNestingDepthLimit: Int? = null)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Whether to allow recursive keys. Keep false to prevent infinite loops.

Link copied to clipboard

Maximum code points to parse. Increase for large YAML specs (>3MB).

Link copied to clipboard

Maximum YAML aliases for collections (DoS protection).

Link copied to clipboard

Maximum nesting depth for YAML structures.