@Test(description = "Shows how to restrict a particular schema") public void testExcludeSchema() { String yaml = "type: object\n" + "description: We don't store social security numbers here!\n" + "not:\n" + " $ref: \"#/components/schemas/AuthorizedUser\""; String yamlUser = "type: object\n" + "properties:\n" + " id:\n" + " type: string\n" + " description: 'A valid user social security'\n" + " pattern: '^\\d{3}-?\\d{2}-?\\d{4}$'"; Map<String, io.swagger.v3.oas.models.media.Schema> map = readAll(ArbitraryDataReceiver.class); Yaml.prettyPrint(map); SerializationMatchers.assertEqualsToYaml(map.get("ArbitraryDataReceiver"), yaml); SerializationMatchers.assertEqualsToYaml(map.get("AuthorizedUser"), yamlUser); }
Yaml.prettyPrint(values); for (Map.Entry<String, Schema> entry : values.entrySet()) { String name = entry.getKey();