Uploaded image for project: 'Talend API Design and Testing'
  1. Talend API Design and Testing
  2. ADT-35

OAS 3 import: references to types with escaped characters are not imported

Apply templateInsert Lucidchart Diagram
    XMLWordPrintable

Details

    • Hide

      Import the attached file

      => The reference to the "Foo/Bar" type is considered as broken while it is not

      Show
      Import the attached file => The reference to the "Foo/Bar" type is considered as broken while it is not
    • All
    • Small

    Description

      The issue

      References to components which contain escaped characters (e.g. #/components/schemas/Foo~1Bar) are not properly resolved and are considered as broken references.

      They are replaced by an inline object type, which alters the API definition.

      Note that the issue can be reproduced in production.

      Long description

      Some characters are reserved in JSON references, so when using a token which contains these characters they are escaped in a special way.

      For example a type named "Foo/Bar" should be encoded as "Foo~1Bar" when put in a JSON reference:

      #/components/schemas/Foo~1Bar 

      and not (which would be an invalid reference):

      #/components/schemas/Foo/Bar 

      We should properly unescape those reserved characters when trying to resolve those OAS 3 references.

      Attachments

        Activity

          People

            antoinenicolas Antoine Nicolas
            antoinenicolas Antoine Nicolas
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: