![]() Println(ulid) // 01F3J0G1M4WQRBHGZ6HCF6JA0K ![]() ![]() ULID.toString produces the String representation of ULID ULID // Generate a new ULID val ulid: ULID = ULID.newULID ULID can be generated with ULID.newULID method: import. LibraryDependencies ++= "" %%% "airframe-ulid" % "(version)" Usageīuild.sbt libraryDependencies += "" %% "airframe-ulid" % "(version)" // For Scala.js Technically, 26 characters of Crockford's Base32 can represent 130-bit values, but ULID strictly uses 128 bits, so the largest ULID string is 7ZZZZZZZZZZZZZZZZZZZZZZZZZ, the unix time of which is 281474976710655. In JVM, it can be two 64-bit Long values, or a byte array of size 16. ULIDs can be encoded as 128-bit values, using network-byte order (big-endian, MSB first). Won't run out of space until the year 10889 AD.The ULID is a 26-character string encoded with Crockford's Base32, which excludes letters like I, L, O, and U to avoid confusion. Source code of airframe-ulid at GitHub ULID Format Monotonic sort order (correctly detects and handles the same millisecond).Uses Crockford's base32 for better efficiency and readability (5 bits per character) Canonically encoded as a 26 character string, as opposed to the 36 character UUID.ULID (Universally Unique Lexicographically Sortable Identifier) has the following good characteristics: Sort method arguments to place required parameters before optional parameters.Airframe-ulid is an ULID generator for Scala and Scala.js. Sort model properties to place required parameters before optional parameters. Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original nameĪdd form or body parameters to the beginning of the parameter list. Top-level package name, which defines 'apiPackage', 'modelPackage', 'invokerPackage' false The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing. True The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document. (Python, Java, Go, PowerShell, C#have this enabled by default). Set to false for generators with better support for discriminators. true With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the enum case sent by the server is not known by the client/spec, can safely be decoded to this case. If the server adds new enum cases, that are unknown by an old spec/client, the client will fail to parse the network response.With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the server sends an enum case that is not known by the client/spec, they can safely fallback to this case.įalse No changes to the enum's are made, this is the default option. Whether to ensure parameter names are unique in an operation (rename parameters that are not). ![]() true Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default. If true (default), keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.įalse The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If false, the 'additionalProperties' implementation (set to true by default) is compliant with the OAS and JSON schema specifications. Joda Joda (for legacy app) java8 Java 8 native JSR310 (preferred for JDK 1.8+) Optionīoolean, toggles whether unicode identifiers are allowed in names or not, default is false ![]() Refer to configuration docs for more details. These options may be applied as additional-properties (cli) or configOptions (plugins). Generates a Scala client library (beta) base on Akka/Spray. Pass this to the generate command after -g ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |