1. A method for validating documentation of a representational state transfer (REST) service, the method comprising: detecting, by a validator, one or more messages for a REST service; translating, by the validator, documentation of the REST service into a representation of an automaton, wherein the automaton is a state machine that transitions from an initial start state to other states based on one or more current inputs; validating, based on the automaton, the one or more messages wherein validation of the one or more messages determines conformance of the REST service to the documentation of the REST service; after validating the one or more messages, categorizing, by the validator, a message that is not valid in accordance with a first error code that is expected to be generated by the REST service; receiving a response from the REST service, the response including a second error code produced by the REST service in response to processing the message; and verifying whether the first error code matches the second error code.