-
Notifications
You must be signed in to change notification settings - Fork 1
Alex/check post #11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Alex/check post #11
Conversation
5b91f56
to
fe070ef
Compare
Thanks for this. The extension of sample matching to not only response but also request is a welcome one, that was missing from this implementation. Re: the reinterpretation of the ABE format, I'd say:
Grouping together endpoints that "belong together" for whatever reason (e.g. because they represent the same resource [collection] in ReST) is something we certainly didn't cover when defining the spec. There is a case for defining a mechanism for that (for example if you want to write a tool to generate documentation out of ABE files), although the way I always thought of it was not within an ABE file, but as additional information either in extra files, naming conventions on your files, or a directory structure. We have no defined proposal for this. (1) There is a difference between To be fair to you, there is some looseness in the definition of the ABE format that could do with some tightening (cc/ @nwhite89 in case we want to take some action there). |
README.md
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be honest, these two are inherited from the top level endpoint definition and don't need to be duplicated here, since the URL is already a valid one and not a pattern (e.g. '/accounts/{someone}/'
).
@txels Are you saying that the ABE format already supports overriding of both METHOD and URL within each request example? I didn't see that in the spec readme. Is there a more full definition? If overriding these properties is already part of the spec then I'm not actually proposing any changes here. |
No. I meant to say that ABE-python already prefills method in your sample from the one in the main description. I probably misunderstood that you were after having the request section in the example fully populated before comparing to actual request. |
To be fair to you, the spec doesn't mandate either, as it's not that tightly defined. But I would argue against using a single file for multiple methods for the reasons detailed above. |
:) maybe calling it a spec at this point is a bit pretentious - we should definitely be more formal about it cc/ @nwhite89 . |
I would like this to be kept as un-bias to any type of API, I suggest moving this discussion out as you said @txels into perhaps an issue within |
92b4b69
to
72684a4
Compare
I have amended the commit to work with the current format. |
b9c433a
to
e657e8f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm I realise now that the signature of this method has changed in a backwards-incompatible way, thus breaking all my ABE-python tests in another project...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that was one of the controversial things about this PR that was up for discussion (see the PR description).
Should be relatively painless to fix - and I think you'll agree (assuming your other project is a django project) is less error prone. Before this change you could have posted anywhere you wanted, and just passed in a url that worked to the assertion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TBF I missed that bit during review. I think this works better. We'll add some release notes to the next release when this comes out.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
0.3.0
release I presume?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will be released together with #14
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sounds good
This solves #10
However, it also does one other things that maybe the
abe-python
project doesn't want:assert_matches_sample
to remove data that is derivable (ie ''url").