Comments (7)
OK I found I can use 'Header' to map the APIKey payload, but it seems that it should not have been necessary.
from goa.
Some APIs use query string parameters for API keys so Goa can't assume it is a header.
from goa.
OK, but if I don't specify anything, it does automatically use a header. However the check in SkipRequestBodyEncodeDecode does not consider it was mapped in this case.
from goa.
Ah sorry I had missed the point about the default behavior. That is indeed inconsistent - reopening :)
from goa.
I tried to reproduce this issue but wasn't able to, the following works as expected:
package design
import . "goa.design/goa/v3/dsl"
// APIKeyAuth defines a security scheme that uses API keys.
var APIKeyAuth = APIKeySecurity("api_key", func() {
Description("Secures endpoint by requiring an API key.")
})
var _ = Service("foo", func() {
Method("bar", func() {
Security(APIKeyAuth)
Payload(func() {
APIKey("api_key", "key")
})
HTTP(func() {
POST("/")
SkipRequestBodyEncodeDecode()
})
})
})
If you are still seeing the issue can you please provide a design that reproduces it?
from goa.
Related Issues (20)
- Slack join link doesn't work. HOT 4
- HTTP cache - RFC compliant with many other features HOT 7
- Something strange happens when using ArrayOf(Int32) with MultipartRequest() in a Method()! HOT 2
- Optional Boolean attributes with defaults don't distinguish between unset and false HOT 4
- `Maximum()`; `validation_error` points to variable name instead of attribute in response
- generated service code is incorrect when using `Meta` for shared types HOT 2
- Request - additional command line parameters for generation HOT 4
- OpenAPI response may be declared even though Result is empty HOT 1
- Duplicate function definitions to implement the OneOf in generated code when using Meta("struct:pkg:path", "types")
- Is there a nice way to integrate AsyncAPI into goa? HOT 1
- Make endpointsData public HOT 1
- goa gen only generating structs for types contained in service definitions HOT 1
- Upstream indirect dependency change HOT 6
- Meta openapi:example still generates example if put at API level HOT 1
- Goa not enforcing required attribute HOT 6
- grpc stream.Recv doesn't decode errors HOT 1
- Shouldn't body be closed by decoder ? HOT 12
- proto file(s) should be named with package name not service name (if package name defined)
- goa gen results in "package src/goa-test/calc is not in std" HOT 1
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 goa.