The Common Query Model is metadata information that describes what type of data is in the message (usually the body part).

Additionally, the model created here can be imported and used in the Spec Design Editor.

Creating a Common Data Model

A new Data Model can be created by clicking the Create button at the top right of the list interface.


The picture below shows the Common Data Model creating settings:


The fields used for the common query model creation configuration are shown in the table below.

FieldDescription

Name

The name information of the query model.

Description

Description of the query model. Entry is optional.

Schema

It is the field where the schema that specifies which type the data will be entered is entered.

Example

Can create an instance of the data type.


The picture below shows the schema creation settings:


The fields used for schema creation configuration are shown in the table below.

FieldDescription

Name

The name of the schema.

Description

The schema can be explained.

Type

Specifies the type of the schema.
Format

It is a field that is activated according to the selected type. For some types there are formats to choose from:

  • integer
    • int32: Signed 32-bit integers (commonly used integer type)
    • int64: Signed 64-bit integers (long type).
  • number
    • float: Floating-point numbers.
    • double: Floating-point numbers with double precision.
  • string
    • byte: Base64-encoded characters, for example, U3dhZ2dlciByb2Nrcw==
    • binary: Binary data, used to describe files.
    • date: Full-date notation, for example, 2017-07-21
    • date-time: The date-time notation, for example, 2017-07-21T17:32:28Z
    • password: A hint to UIs to mask the input.
$Ref Target

If $ref is selected from the type field, this field becomes active.

Another query model can be referenced.

Property is

Specifies whether the model is mandatory or not.

Behaviour

Only read/write information of the schema is determined.
Integer Properties

If Integer is selected as the type, these fields are active:

  • Minimum: To determine the smallest of the values that can be entered.
  • Maximum: To determine the largest of the values that can be entered.
  • MultipleOf: It is to determine if the values to be entered are desired to be a multiple of a number.
String Properties

If String is selected as the type, these fields are active:

  • Pattern: Allows you to define a regular expression pattern for the String value. Only values matching this template will be accepted.
  • Min Length: To determine the minimum length of values that can be entered.
  • Max Length: To determine the maximum length of the values that can be entered.
Enum Values

If Enum is selected as the type, this field becomes active.

This is the field where the possible values of the model are entered.

Example

An example can be given describing the schema.