snowplow / iglu

Iglu is a machine-readable, open-source schema repository for JSON Schema from the team at Snowplow
http://www.snowplow.io
Apache License 2.0
208 stars 45 forks source link

Scala Core: fix repeated .. in canonical iglu regex #443

Closed chuwy closed 5 years ago

chuwy commented 6 years ago

Placeholder ticket to test: https://github.com/snowplow/iglu/blob/master/0-common/scala-core/src/main/scala/com.snowplowanalytics.iglu/core/SchemaKey.scala#L52-L56

chuwy commented 6 years ago

Indeed, it passes the validation. Thanks @mhadam. I need someone more experienced with regexes to fix it however, leaving until next release.

mhadam commented 6 years ago

This is what I came up with for global contexts: https://github.com/snowplow/snowplow-javascript-tracker/blob/issue/405/core/lib/contexts.ts#L61

but that's for validating "schema rules", I think this will validate vendors correctly for you: ((?:[a-zA-Z0-9-_]+\.)+(?:[a-zA-Z0-9-_]+))

Simple test cases: https://regex101.com/r/2Cxcu5/1

aldemirenes commented 5 years ago

Migrated to https://github.com/snowplow-incubator/iglu-scala-core/issues/20