harp icon indicating copy to clipboard operation
harp copied to clipboard

Fix yaml serialization from pb

Open Zenithar opened this issue 1 year ago • 0 comments

Context

  • Make owner not mandatory in RuleSetJSON Schema
  • Add a Protobuf to YAML conversion helper who uses protojson as an intermediary encoder to get the right protobuf object annotations
  • Apply fix to RuleSetand Patch tasks which were producing an api_version property instead of the expected apiVersion format
$ harp from object --in ~/demo/219/input.json --out - | harp to ruleset --in -
apiVersion: harp.elastic.co/v1
kind: RuleSet
meta:
  description: Generated from bundle content
  name: qBiWpFkYKhkuBUXyIxxA1fSWCDXV8jHBJkgArt7D2dwqZ4mn_k7s2JbomfjzB_tNEI9CJXJ1n5cflhb96ao3lA
spec:
  rules:
  - constraints:
    - p.has_secret("bar")
    name: LINT-qBiWpF-1
    path: secrets/foo/test

Reference(s)

fix https://github.com/elastic/harp/issues/219

Zenithar avatar Sep 16 '22 08:09 Zenithar