i would like to conditionally hide an endpoint i put in just for dev and test environments but i am having trouble...
@Value("${spring.profiles.active}")
String deployEnv;
@Profile("!prod")
@io.swagger.v3.oas.annotations.Operation(summary="this is just used in dev and test", hidden=#{deployEnv.toLowerCase().indexOf('prod')>=0})
...
public String generateToken() {
...
}
i've tried different variations of spel to make the hidden field work but to no avail. of course, if i just use true or false hard coded then it works fine but that's not what i want.