User Schema

Last modified 04 Jul 2025 10:59 +02:00

Write a Groovy script describing the model in JSON using Groovy builder like following:

objectClass("User") {
     attribute("created") {
         description "Time when user was created.";
         json {
            type  "string";
            openApiFormat "date-time";
         }
     }
    attribute("id") {
        description "ID of user";
        json {
            type "number";
            openApiFormat "int64";
        }

    }
}

The available attributes properties are:

  • json.type - JSON Type which is used to represent data in JSON

  • openApiFormat - OpenAPI Format (from https://spec.openapis.org/registry/format/), which describes formatting of data, allowed values

  • description - Description of attribute as obtained from documentation

  • required

    • Is attribute required?

  • creatable - Can attribute be used during create operation, default is true, can be omitted. * readable - Can attribute be read, default is true, can be omitted.

  • updatable - Can attribute be modified default is true, can be omitted.

  • returnedByDefault - Is attribute returned by default

Was this page helpful?
YES NO
Thanks for your feedback