001package io.avaje.http.api; 002 003import java.lang.annotation.Retention; 004import java.lang.annotation.Target; 005 006import static java.lang.annotation.ElementType.METHOD; 007import static java.lang.annotation.ElementType.TYPE; 008import static java.lang.annotation.RetentionPolicy.RUNTIME; 009 010/** 011 * Specify endpoint response media type. 012 * 013 * When not specified the default MediaType is APPLICATION_JSON 014 * so we specify this on controllers or methods where the responses 015 * return a different media type. 016 * 017 * <pre>{@code 018 * 019 * @Produces(MediaType.TEXT_PLAIN) 020 * @Path("/customers") 021 * class CustomerController { 022 * ... 023 * } 024 * 025 * }</pre> 026 */ 027@Target(value={TYPE, METHOD}) 028@Retention(value=RUNTIME) 029public @interface Produces { 030 031 String value(); 032}