Comments (6)
@MikeRalphson The python template you made is working for GET requests, but the parameters aren't making it to any other requests.
from widdershins.
@bc-AlyssNoland the fix passed the test suite, so can you try it out from the repository version, or would you need a new version published to npm? With your example Python code template you are probably better off using the parameter.safeType
pseudo-property as this normalises a few quirks.
from widdershins.
Hi @bc-AlyssNoland from that screenshot I can't quite see which post request is missing parameters. Could you let me have the /path ?
Edit: Is this because the template is using queryParameters, and the post
requests only have body
and path
parameters? Does the python requests
module know about replaceable path parameters, or is params only for queryString parameters?
I'm thinking about making the default code templates only list parameters which are in:query
and required:true
(using requiredParameters[]
) to keep the size down. The option would still be there for all parameters to be listed in user templates by iterating through one of the other arrays.
from widdershins.
https://gist.github.com/bc-AlyssNoland/2f64aa9041a794f93712d8b4a6a4649a
https://gist.github.com/preciselyAlyss/2f64aa9041a794f93712d8b4a6a4649a
I posted the output of the file in the gist above. It seems some GET and DELETE requests are getting the parameters. I agree with only listing things that are required. We (my company) actually use an extension to indicate which fields are required by operation, but I can work on modifying a fork to accommodate that.
amount:
type: number
format: double
description: |
The value of the adjustment by the bulk pricing rule.
x-required:
- post
- put
minimum: 0
from widdershins.
@bc-AlyssNoland Thanks, will take a look at the gist.
You should be able to use the new template callback feature to flip the parameter.required
value based on your vendor extension if you want to avoid forking in this case.
from widdershins.
@PreciselyAlyss I believe the underlying bug has been fixed and is in v1.1.0 - please feel free to re-open this issue if there is still something outstanding, or to raise a new one. Thanks.
from widdershins.
Related Issues (20)
- Support custom media type HOT 6
- Add option "--header-offset"
- Add support for OpenRPC
- Support for AsyncAPI version 2.2
- headingLevel is getting overriden to default value i.e 2.
- Vulnerability for package [email protected] in widdershins
- Upgrade to [email protected] to fix yargs-parser vulnerability
- CODE SAMPLES ERROR WIDDERSHINS + SLATE
- node can't find widdershins module after npm install is run HOT 2
- Any programmable API? HOT 1
- shins dependency is including vulnerable jquery version 3.2.1
- Missing body parameter code for API languages other than JavaScript HOT 2
- User defined data fields to be used in templates
- user_template is not well defined HOT 1
- Could not get ToC to generate
- Generate Markdown with no html headers
- Bump version of httpsnippet
- Error picking up user templates HOT 1
- Multiline markdown in response examples breaks table in Markdown
- Resolving external refs and showing as links
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from widdershins.