μ€λͺ μμ μνμ λ°λΌ λ΄ msonμμ nullable νμ μ μ¬μ©νλ €κ³ νμ§λ§ μλ―Έ μ€λ₯λ‘ μ€ν¨ν©λλ€.
λ΄ msonμ λ¬Έμ μ μ¬μ© μ¬λ‘μ λν μ¬λ°λ₯Έ λ¬Έμλ₯Ό λ§λλ λ°©λ²μ μμλΌ μ μλλ‘ λμμ£ΌμΈμ.
κ°μ¬ ν΄μ!
@danilvalovλ , Apiaryλ null νμ© μ¬λΆμ λν μ§μμ μΆκ°νλ μ΅μ λ²μ μ API Blueprint Parserλ₯Ό μ¬μ©νμ§ μμ΅λλ€.
Apiaryμλ null νμ© μ¬λΆμ λν μ§μμ ν¬ν¨νμ¬ μμ± λ λλ§μ κ°μ νκΈ° μν λ² νκ° μμ΅λλ€. λ² νμ λν μμΈν λ΄μ©μ https://github.com/apiaryio/api-blueprint/issues/191#issuecomment -178044764μμ μ°Έμ¬ λ°©λ²κ³Ό ν¨κ» νμΈν μ μμ΅λλ€.
λ¬Έμ μΈμ¬,
μΉ΄μΌ
μ λ μ΄κ²μ΄ μ΄μ Apiary(λ² ν μμ΄)μ λ°°ν¬λμμμ μ§μ νκ³ μΆμ΅λλ€.
μλ₯Ό λ€μ΄ λ€μκ³Ό κ°μ΄ nullableμ μ¬μ©ν μ μμ΅λλ€.
+ Response 200 (application/json)
+ Attributes
+ example1 (string, optional, nullable) - An example optional nullable string
+ example2: value (string, optional, nullable) - An example optional nullable string with a sample value
κ·Έλ¬λ©΄ λ€μκ³Ό κ°μ νμ΄λ‘λμ μκ° λ©λλ€.
{
"example1": null,
"example2": "value"
}
λ€μ JSON μ€ν€λ§μ ν¨κ»:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"example1": {
"type": [
"string",
"null"
],
"description": "An example optional nullable string"
},
"example2": {
"type": [
"string",
"null"
],
"description": "An example optional nullable string with a sample value"
}
}
}
Apiary μ μμ± ν μ΄λΈ
μ΄μ ApiaryUI μμ λ³Ό μ μμ΅λλ€.
κ°μ₯ μ μ©ν λκΈ
μ λ μ΄κ²μ΄ μ΄μ Apiary(λ² ν μμ΄)μ λ°°ν¬λμμμ μ§μ νκ³ μΆμ΅λλ€.
μλ₯Ό λ€μ΄ λ€μκ³Ό κ°μ΄ nullableμ μ¬μ©ν μ μμ΅λλ€.
κ·Έλ¬λ©΄ λ€μκ³Ό κ°μ νμ΄λ‘λμ μκ° λ©λλ€.
λ€μ JSON μ€ν€λ§μ ν¨κ»:
Apiary μ μμ± ν μ΄λΈ