{"action":"opened","issue":{"url":"https://api.github.com/repos/swagger-api/swagger-core/issues/982","labels_url":"https://api.github.com/repos/swagger-api/swagger-core/issues/982/labels{/name}","comments_url":"https://api.github.com/repos/swagger-api/swagger-core/issues/982/comments","events_url":"https://api.github.com/repos/swagger-api/swagger-core/issues/982/events","html_url":"https://github.com/swagger-api/swagger-core/issues/982","id":68659778,"number":982,"title":"Custom ","user":{"login":"bertramn","id":3828133,"avatar_url":"https://avatars.githubusercontent.com/u/3828133?v=3","gravatar_id":"","url":"https://api.github.com/users/bertramn","html_url":"https://github.com/bertramn","followers_url":"https://api.github.com/users/bertramn/followers","following_url":"https://api.github.com/users/bertramn/following{/other_user}","gists_url":"https://api.github.com/users/bertramn/gists{/gist_id}","starred_url":"https://api.github.com/users/bertramn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bertramn/subscriptions","organizations_url":"https://api.github.com/users/bertramn/orgs","repos_url":"https://api.github.com/users/bertramn/repos","events_url":"https://api.github.com/users/bertramn/events{/privacy}","received_events_url":"https://api.github.com/users/bertramn/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-04-15T11:50:55Z","updated_at":"2015-04-15T11:50:55Z","closed_at":null,"body":"Hi there,\r\n\r\nis it possible to add a feature to register a custom `JacksonAnnotationIntrospector` or provide some Jackson Modules to the `com.wordnik.swagger.jaxrs.listing.SwaggerSerializers` class? I have a use case where the POJO is annotated with an annotation that mixes in `@JsonProperty` and I use a custom annotation introspector to disable this mixin when the POJO is returned via the REST API. Unfortunately swagger does not know about this and renders the name as specified by the normally disabled mixin annotation.\r\n\r\nWhat swagger says about the model:\r\n```json\r\n{\r\n  \"_id\": \"string\"\r\n}\r\n```\r\nWhat is actually returned by the REST API\r\n```json\r\n{\r\n  \"id\": \"5524d711d2b2694b8ee0a5fe\"\r\n}\r\n```\r\n\r\nThis is the POJO:\r\n```java\r\n@XmlRootElement(name = \"Bla\")\r\npublic class Bla implements Serializable\r\n{\r\n\r\n    @XmlAttribute(name = \"id\")\r\n    @Id\r\n    @ObjectId\r\n    protected String id;\r\n\r\n    ...\r\n\r\n}\r\n```\r\n\r\n`@Id` looks like this\r\n\r\n```java\r\n@Retention(RUNTIME)\r\n@JacksonAnnotationsInside\r\n\r\n@JsonProperty(\"_id\")\r\npublic @interface Id {\r\n}\r\n```\r\n\r\nand I use a `JacksonAnnotationIntrospector` like below with success only catch is, I can't add the introspector to the swagger renderer :(\r\n\r\n```java\r\n...\r\n/**\r\n * \r\n * A {@link JacksonAnnotationIntrospector} that will ensure any jongo specific\r\n * annotations are removed from the mapper context. This will ensure that a\r\n * jongo annotated object can be marshaled properly.\r\n * <p/>\r\n * \r\n * Please note that if any field in the class is of type\r\n * {@link org.bson.types.ObjectId}, a set of serializers/deserializers must also\r\n * be added to the mapper context.\r\n *\r\n */\r\npublic class JongoDisablingAnnotationIntrospector extends JacksonAnnotationIntrospector {\r\n\r\n\t/**\r\n\t * Ignore both serialisation\r\n\t */\r\n\t@Override\r\n\tpublic boolean isAnnotationBundle(Annotation ann) {\r\n\t\tif (ann.annotationType().equals(Id.class)) {\r\n\t\t\treturn false;\r\n\t\t} else if (ann.annotationType().equals(ObjectId.class)) {\r\n\t\t\treturn false;\r\n\t\t} else {\r\n\t\t\treturn super.isAnnotationBundle(ann);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Remove the jongo {@link ObjectIdSerializer} if placed in the code by any\r\n\t * other means than the {@link ObjectId} annotation.\r\n\t */\r\n\t@Override\r\n\tpublic Object findSerializer(Annotated am) {\r\n\t\tObject serializer = super.findSerializer(am);\r\n\t\tif (ObjectIdSerializer.class.equals(serializer)) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\treturn serializer;\r\n\t}\r\n\r\n\t/**\r\n\t * Remove the jongo {@link ObjectIdDeserializer} if placed in the code by\r\n\t * any other means than the {@link ObjectId} annotation. directly.\r\n\t */\r\n\t@Override\r\n\tpublic Class<? extends JsonDeserializer<?>> findDeserializer(Annotated a) {\r\n\t\tClass<? extends JsonDeserializer<?>> deserializer = super.findDeserializer(a);\r\n\t\tif (ObjectIdDeserializer.class.equals(deserializer)) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\treturn deserializer;\r\n\t}\r\n}\r\n```\r\n\r\n\r\n\r\n\r\n"}}