nsip / specgen_input_au

Capture of specgen input files
2 stars 0 forks source link

Codeset + Attribute not resulting in legitimate JSON Schema #52

Closed opoudjis closed 1 year ago

opoudjis commented 1 year ago

ScheduledActivityOverrideType is defined as a codeset + an XML attribute.

But the result is

  # ////////////////////////////// default sequence ///////////////////////////////
  ScheduledActivityOverride:
    description: >-
      <p>This flag should be used to indicate whether or not this ScheduledActivity overrides a previous ScheduledActivity. In any initial provisioning this element should NOT be provided.</p>
    $ref: '#/definitions/AUCodeSetsYesOrNoCategory'
    type: object
    properties:
      DateOfOverride:
        type: string
        format: date
        description: >-
          <p>The date needs to be provided if Override=Yes.</p>
        xml:
          attribute: true

Whereas we expect a value: property, as with MonetaryAmount:

  # //////////////////////// xs:* with attrs /////////////////////////////////////
  MonetaryAmount:
    type: object
    properties:
      value:
      - description: >-
          <p>A monetary amount.</p>
        type: number
      Currency:
        type: object
        description: >-
          Currency code. Where omitted, defaults to implementation-defined local currency, typically <code>USD</code> in the United States.
        $ref: '#/definitions/ISO4217CurrencyNamesAndCodeElements'
        xml:
          attribute: true
opoudjis commented 1 year ago

Same is happening with HomeRoomType. That's IdRef + Attribute.

XSLT is very ill equipped in working out in advance whether a random type is a string or an object.

opoudjis commented 1 year ago

Eliminating inexplicable markup of "value" attributes as array.