Difference between revisions of "YAML"

From rbachwiki
Jump to navigation Jump to search
Line 21: Line 21:
     port: 9002
     port: 9002
     version:
     version:
    - 1.9
      - 1.9
    - 2.0
      - 2.0
    - 2.1
      - 2.1
#can be written as
      version: [1.9, 2.0, 2.1]

Revision as of 14:49, 9 August 2022

YAML

Serialization Language

Syntax

  • Key value pair
  • "microservice" becomes an object with directives under it.
microservice:
  app: user-auth
  port: 9000
  #comment
  version: 1.7
  • Create a list
 microservice: #list name
  - app: user-auth #items of the list
    port: 9000
    #comment
    version: 1.7
    deployed: true #boolean value
  - app: shopping-cart
    port: 9002
    version:
      - 1.9
      - 2.0
      - 2.1
#can be written as 
     version: [1.9, 2.0, 2.1]