I’d rather have documentation than tests. Here’s a concrete example of a horrible documentation fail. Take a look at the configuration example:
... cross-origin org.eclipse.jetty.servlets.CrossOriginFilter ... cross-origin /cometd/*
Are you kidding me? Dot Dot Dot?? What other configuration options are there? Using googlefu you come across questions like this. The poster in this case has no idea that for example allowedMethods and allowedHeaders cannot have * as a value… Because the documentation said so? No, because as we see the documentation doesn’t even include these options as configuration value … Unless you know what the prior punctuation somehow magically means.
So after looking up the code. I know what a valid configuration document should look like. What’s wrong with that picture, SOLID people?
For a cross origin pre-flight request in jetty, you have to specify the headers to include … And … Then … You also have … to … specify … the … actual … HTTP … Verbs … That … You’ll … Apply …
cross-origin org.eclipse.jetty.servlets.CrossOriginFilter allowedOrigins * allowedMethods GET,POST,HEAD,PUT,DELETE allowedHeaders X-Requested-With,Content-Type,Accept,Origin,x-custom-header
Give me documentation, or give me death. – Patrick Henry