Spring-boot: Provide a default value for enums in the metadata

Created on 5 Jan 2017  路  8Comments  路  Source: spring-projects/spring-boot

We aren't able to detect default values for enums (#7562) so we should write them manually.

Also we should make it clearer that it isn't supported in the reference doc.

documentation enhancement

All 8 comments

Shame we can't detect them.

I agree. Maybe you can give that a try? I honestly see no way to detect it. Maybe we can get the raw value and then check if it's legit ? I don't think we can get the full type from there.

I am a bit nervous to change this now as it may break tooling support. I've pushed a basic change on this branch. Basically, if you rebuild spring-boot-actuatorand try to get some documentation on management.info.git.mode you should now see that simple is the default value. I've tested this on IJ and it works just fine but I'd need some feedback on STS and Netbeans before going any further.

Works in NetBeans 8.2 with NB-Spring Boot 1.3.1:

defaultvalueforenum

Thanks for considering NB :)

I'll try with STS when I can.

Seems to work with STS

Spring Tool Suite 

Version: 3.8.3.RELEASE
Build Id: 201612191457
Platform: Eclipse Mars.2 (4.5.2)

sts

Oops, I tried with STS earlier today and then forgot to comment. Sorry. It worked for me too.

I've added an extra tool to check for enums without a default value in the metadata. For the time being, I'll run it prior to the release.

Was this page helpful?
0 / 5 - 0 ratings