Giter VIP home page Giter VIP logo

Comments (4)

gregsdennis avatar gregsdennis commented on May 27, 2024 1

@RPS044 I don't think you read my response. This isn't something we can help with here. You need to open an issue with the OpenAPI library you're using.

from json-schema-spec.

gregsdennis avatar gregsdennis commented on May 27, 2024

I think you're going to need to go to the particular OAS implementation you're using and ask them. This repo (and organization) manages the JSON Schema spec itself, not any particular library.

Some other things to note:

  • OAS 3.0 uses its own flavor of JSON Schema that's based on but isn't exactly draft 4.
  • discriminator is an OAS-only thing.

When you file an issue with them, see if you can replicate the problem with a small example, and provide that to them. Just posting the error without context isn't helpful.

Sorry we can't be of more help.

from json-schema-spec.

RPS044 avatar RPS044 commented on May 27, 2024

@gregsdennis could you please check now

components:
  schemas:
    BillableItemsPost:
      title: Billable Items Post Request
      description: Object defines JSON schema of SAP OTC Billable Items post request
      type: object
      discriminator:
        propertyName: product
        mapping:
          Generic: '#/components/schemas/BillableItemsPost'
      properties:
        billableHeader:
          description: Billable Item request header
          type: object
          additionalProperties: false
          properties:
            product:
              description: A discriminator property to identify the schema specifics
              type: string
              enum:
                - Generic
                - Airlcl
              example: Generic
              discriminator:
                propertyName: product
                mapping:
                  Generic: '#/components/schemas/BillableItemsPost'
            sourceSystem:
              description: Upstream System Name **Required for CW1**
              type: string
              minLength: 1
              maxLength: 6
              example: GCSS
            sourceTransactionType:
              description: >-
                Source Transaction Type(O- Booking Confirmed, L- Issue Verify
                Copy or Pre- Invoice Event, I- Invoice) **Required for CW1**
              type: string
              enum:
                - BOOKING_CONFIRMED
                - ISSUE_VERIFY_COPY
                - INVOICE
                - CREDIT
                - CREATE_REV
                - UPDATE_REV
                - CANCEL_REV
                - UPDATE_COST
                - CANCEL_COST
                - CANCEL_INVOICE
              example: INVOICE
            eventType:
              description: Event Type (Ad-hoc, Batch)
              type: string
              enum:
                - AD-HOC
                - BATCH
              example: BATCH
            messageCreationDatetime:
              description: >-
                Message Creation Timstamp, used for the message synchronizing to
                ensure message is picked in correct sequence **Required for
                CW1**
              type: string
              format: timestamp
              example: '20220811140203'
            timeZoneCode:
              description: >-
                Time Zone, Will be used if needed along-with TimeStamp
                **Required for CW1**
              type: string
              minLength: 1
              maxLength: 4
              example: GMT
            isBulkProcessing:
paths:
  /billable-items:
    post:
      summary: Create Billable Item
      description: Creates a new Billable Item in S/4 HANA
      tags:
        - Billable Item
      operationId: billable-item-post
      requestBody:
        content:
          application/json:
            schema:
              x-field-extra-annotation: '@com.fasterxml.jackson.annotation.JsonTypeInfo(
                use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME,
                include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY,
                property = "product")'
              x-class-extra-annotation: '@com.fasterxml.jackson.annotation.@JsonSubTypes({
                @JsonSubTypes.Type(value = BillableItemsPost.class, name = "Generic"),
                @JsonSubTypes.Type(value = BillableItemsPostAirlcl.class, name = "Airlcl")})'
              oneOf:
                - $ref: '#/components/schemas/BillableItemsPost'
                - $ref: '#/components/schemas/BillableItemsPostAirlcl'
              discriminator:
                propertyName: product
                mapping:
                  Generic: '#/components/schemas/BillableItemsPost'
                  Airlcl: '#/components/schemas/BillableItemsPostAirlcl'

from json-schema-spec.

LasneF avatar LasneF commented on May 27, 2024

@gregsdennis you should close this one

from json-schema-spec.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.