Summary: code snippets and explanation of how to validate HTTP-response using openapi-core package If you deal with some service based on OpenAPI Specification you might want to perform validation of HTTP responses returned by it. One of the ways to do this an internet search provides for Python is to use openapi-core package. If you look at their documentation ( here or here ) you will find it very stingy: couple of short code snippets and couple of sentences just stating what is done. In particular for response validation we have exactly the following: You can also validate against responses from openapi_core . validation . response . validators import ResponseValidator validator = ResponseValidator (spec) result = validator . validate (request, response) # raise errors if response invalid result .raise_for_errors() # get list of errors errors = result .errors ... Here we see some confusing things: why do we need a request objec...
At the edge of the Universe, located in its center, there is an amazing Machine: with an unimaginable speed it repeats again and again some very simple operations. At first it extracts Something from All Things That Already Exist, then from the same source — from the All Things That Already Exist — it takes Some Set. Having these two, it proceeds to the third operation — the Union — and gets as a result a New Set. The fourth operation is combining items of the New Set in all possible ways. It worth to mention here that the Machine is able to extract items without corruption of their source. So, after the fourth step the Machine has a Set Of Subsets of the New Set. At the fifth operation it creates One More Set, but… its content is undefined. Yes, it is undefined because at this stage the Machine doesn’t know it. At the sixth step it resorts to the Union again — now it applies it to the One More Set and the New Set mentioned above. On the seventh step our mechanism behaves ...
In short: (just as a hypothesis) • meaning of message (word/sentence/text) for human = sustainable/reproducible and predictable mental representations caused by the message in the brain of message receiver • mental representations consist of some very basic perceptions intrinsic for human individuals • being able to enumerate that basic perceptions we can “encode” any complex representation — that is it is like a machine code of brain-computer • and as well it makes possible to specify semantics of natural language formally Details I’m not an expert in the theory of meaning, just curious about it so I don’t pretend that the statements above are true and bring any new knowledge to the field. But when you are going to study something it is normal to have in mind some preliminary picture consisting of what there can be and expectations about the results of study. So my expectation here is to confirm or refute the “hypothesis” by finding more adequate disco...
Comments
Post a Comment