public OpenAPI read(Class<?> cls) {
        return read(cls, resolveApplicationPath(), null, false, null, null, new LinkedHashSet<String>(), new ArrayList<Parameter>(), new HashSet<Class<?>>());
    }
@Test
    public void testMisc31() {
        Reader reader = new Reader(new SwaggerConfiguration().openAPI(new OpenAPI()).openAPI31(true));
        Set<Class<?>> classes = new HashSet<>(Arrays.asList(Misc31Resource.class));
        OpenAPI openAPI = reader.read(classes);
        String yaml = "openapi: 3.1.0\n" +
                "paths:\n" +
                "  /pet:\n" +
                "    put:\n" +
                "      operationId: updatePet\n" +
                "      responses:\n" +
                "        default:\n" +
                "          description: default response\n" +
                "          content:\n" +
                "            application/json:\n" +
                "              schema:\n" +
                "                $ref: '#/components/schemas/ModelWithOAS31Stuff'\n" +
                "            application/xml:\n" +
                "              schema:\n" +
                "                $ref: '#/components/schemas/ModelWithOAS31Stuff'\n" +
                "components:\n" +
                "  schemas:\n" +
                "    ModelWithOAS31Stuff:\n" +
                "      type: object\n" +
                "      $comment: Random comment at schema level\n" +
                "      $id: http://yourdomain.com/schemas/myschema.json\n" +
                "      description: this is model for testing OAS 3.1 resolving\n" +
                "      properties:\n" +
                "        randomList:\n" +
                "          type: array\n" +
                "          contains:\n" +
                "            type: string\n" +
                "          items:\n" +
                "            type: string\n" +
                "          maxContains: 10\n" +
                "          minContains: 1\n" +
                "          prefixItems:\n" +
                "          - type: string\n" +
                "          unevaluatedItems:\n" +
                "            type: number\n" +
                "        status:\n" +
                "          type:\n" +
                "          - string\n" +
                "          - number\n" +
                "        intValue:\n" +
                "          type: integer\n" +
                "          format: int32\n" +
                "          $anchor: intValue\n" +
                "          $comment: comment at schema property level\n" +
                "          exclusiveMaximum: 100\n" +
                "          exclusiveMinimum: 1\n" +
                "        text:\n" +
                "          type: string\n" +
                "          contentEncoding: plan/text\n" +
                "          contentMediaType: base64\n" +
                "        encodedString:\n" +
                "          type: string\n" +
                "          contentMediaType: application/jwt\n" +
                "          contentSchema:\n" +
                "            $ref: '#/components/schemas/MultipleBaseBean'\n" +
                "        address:\n" +
                "          $ref: '#/components/schemas/Address'\n" +
                "        client:\n" +
                "          type: string\n" +
                "          dependentSchemas:\n" +
                "            creditCard:\n" +
                "              $ref: '#/components/schemas/CreditCard'\n" +
                "    MultipleBaseBean:\n" +
                "      description: MultipleBaseBean\n" +
                "      properties:\n" +
                "        beanType:\n" +
                "          type: string\n" +
                "        a:\n" +
                "          type: integer\n" +
                "          format: int32\n" +
                "        b:\n" +
                "          type: string\n" +
                "    MultipleSub1Bean:\n" +
                "      allOf:\n" +
                "      - $ref: '#/components/schemas/MultipleBaseBean'\n" +
                "      - type: object\n" +
                "        properties:\n" +
                "          c:\n" +
                "            type: integer\n" +
                "            format: int32\n" +
                "      description: MultipleSub1Bean\n" +
                "    MultipleSub2Bean:\n" +
                "      allOf:\n" +
                "      - $ref: '#/components/schemas/MultipleBaseBean'\n" +
                "      - type: object\n" +
                "        properties:\n" +
                "          d:\n" +
                "            type: integer\n" +
                "            format: int32\n" +
                "      description: MultipleSub2Bean\n" +
                "    Address:\n" +
                "      if:\n" +
                "        $ref: '#/components/schemas/AnnotatedCountry'\n" +
                "      then:\n" +
                "        $ref: '#/components/schemas/PostalCodeNumberPattern'\n" +
                "      else:\n" +
                "        $ref: '#/components/schemas/PostalCodePattern'\n" +
                "      dependentRequired:\n" +
                "        street:\n" +
                "        - country\n" +
                "      properties:\n" +
                "        street:\n" +
                "          type: string\n" +
                "        country:\n" +
                "          type: string\n" +
                "          enum:\n" +
                "          - United States of America\n" +
                "          - Canada\n" +
                "      propertyNames:\n" +
                "        $ref: '#/components/schemas/PropertyNamesPattern'\n" +
                "    AnnotatedCountry:\n" +
                "      properties:\n" +
                "        country:\n" +
                "          const: United States\n" +
                "    CreditCard:\n" +
                "      properties:\n" +
                "        billingAddress:\n" +
                "          type: string\n" +
                "    PostalCodeNumberPattern:\n" +
                "      properties:\n" +
                "        postalCode:\n" +
                "          pattern: \"[0-9]{5}(-[0-9]{4})?\"\n" +
                "    PostalCodePattern:\n" +
                "      properties:\n" +
                "        postalCode:\n" +
                "          pattern: \"[A-Z][0-9][A-Z] [0-9][A-Z][0-9]\"\n" +
                "    PropertyNamesPattern:\n" +
                "      pattern: \"^[A-Za-z_][A-Za-z0-9_]*$\"\n";
        SerializationMatchers.assertEqualsToYaml31(openAPI, yaml);
    }