Skip to content

Commit

Permalink
Merge pull request #2 from AnimeshKumar923/spec-examples-fix
Browse files Browse the repository at this point in the history
This PR contains spec example fixes identified during the validation script's testing.
  • Loading branch information
AnimeshKumar923 authored Jul 4, 2024
2 parents 91e8478 + e1b0e65 commit 9347567
Showing 1 changed file with 18 additions and 19 deletions.
37 changes: 18 additions & 19 deletions spec/asyncapi.md
Original file line number Diff line number Diff line change
Expand Up @@ -2401,81 +2401,81 @@ This object MAY be extended with [Specification Extensions](#specificationExtens

###### User/Password Authentication Sample

<!-- asyncapi-example-tester:{"name":"Security Scheme Object - user-pass","json_pointer":"#/components/securitySchemes/oauth"} -->
<!-- asyncapi-example-tester:{"name":"Security Scheme Object - user-pass","json_pointer":"#/components/securitySchemes/userPasswordAuth"} -->
```json
{
"type": "userPassword"
}
```

<!-- asyncapi-example-tester:{"name":"Security Scheme Object - user-pass","json_pointer":"#/components/securitySchemes/oauth"} -->
<!-- asyncapi-example-tester:{"name":"Security Scheme Object - user-pass","json_pointer":"#/components/securitySchemes/userPasswordAuth"} -->
```yaml
type: userPassword
```

###### API Key Authentication Sample

<!-- asyncapi-example-tester:{"name":"Security Scheme Object - API key auth","json_pointer":"#/components/securitySchemes/oauth"} -->
<!-- asyncapi-example-tester:{"name":"Security Scheme Object - API key auth","json_pointer":"#/components/securitySchemes/apiKeyAuth"} -->
```json
{
"type": "apiKey",
"in": "user"
}
```

<!-- asyncapi-example-tester:{"name":"Security Scheme Object - API key auth","json_pointer":"#/components/securitySchemes/oauth"} -->
<!-- asyncapi-example-tester:{"name":"Security Scheme Object - API key auth","json_pointer":"#/components/securitySchemes/apiKeyAuth"} -->
```yaml
type: apiKey
in: user
```

###### X.509 Authentication Sample

<!-- asyncapi-example-tester:{"name":"Security Scheme Object - X.509","json_pointer":"#/components/securitySchemes/oauth"} -->
<!-- asyncapi-example-tester:{"name":"Security Scheme Object - X.509","json_pointer":"#/components/securitySchemes/X509Auth"} -->
```json
{
"type": "X509"
}
```

<!-- asyncapi-example-tester:{"name":"Security Scheme Object - X.509","json_pointer":"#/components/securitySchemes/oauth"} -->
<!-- asyncapi-example-tester:{"name":"Security Scheme Object - X.509","json_pointer":"#/components/securitySchemes/X509Auth"} -->
```yaml
type: X509
```

###### End-to-end Encryption Authentication Sample

<!-- asyncapi-example-tester:{"name":"Security Scheme Object - end to end encryption","json_pointer":"#/components/securitySchemes/oauth"} -->
<!-- asyncapi-example-tester:{"name":"Security Scheme Object - end to end encryption","json_pointer":"#/components/securitySchemes/symmetricEncryptionAuth"} -->
```json
{
"type": "symmetricEncryption"
}
```

<!-- asyncapi-example-tester:{"name":"Security Scheme Object - end to end encryption","json_pointer":"#/components/securitySchemes/oauth"} -->
<!-- asyncapi-example-tester:{"name":"Security Scheme Object - end to end encryption","json_pointer":"#/components/securitySchemes/symmetricEncryptionAuth"} -->
```yaml
type: symmetricEncryption
```

###### Basic Authentication Sample

<!-- asyncapi-example-tester:{"name":"Security Scheme Object - basic","json_pointer":"#/components/securitySchemes/oauth"} -->
<!-- asyncapi-example-tester:{"name":"Security Scheme Object - basic","json_pointer":"#/components/securitySchemes/basicAuth"} -->
```json
{
"type": "http",
"scheme": "basic"
}
```

<!-- asyncapi-example-tester:{"name":"Security Scheme Object - basic","json_pointer":"#/components/securitySchemes/oauth"} -->
<!-- asyncapi-example-tester:{"name":"Security Scheme Object - basic","json_pointer":"#/components/securitySchemes/basicAuth"} -->
```yaml
type: http
scheme: basic
```

###### API Key Sample

<!-- asyncapi-example-tester:{"name":"Security Scheme Object - API key","json_pointer":"#/components/securitySchemes/oauth"} -->
<!-- asyncapi-example-tester:{"name":"Security Scheme Object - API key","json_pointer":"#/components/securitySchemes/httpApiAuth"} -->
```json
{
"type": "httpApiKey",
Expand All @@ -2484,7 +2484,7 @@ scheme: basic
}
```

<!-- asyncapi-example-tester:{"name":"Security Scheme Object - API key","json_pointer":"#/components/securitySchemes/oauth"} -->
<!-- asyncapi-example-tester:{"name":"Security Scheme Object - API key","json_pointer":"#/components/securitySchemes/httpApiAuth"} -->
```yaml
type: httpApiKey
name: api_key
Expand All @@ -2493,7 +2493,7 @@ in: header

###### JWT Bearer Sample

<!-- asyncapi-example-tester:{"name":"Security Scheme Object - JWT","json_pointer":"#/components/securitySchemes/oauth"} -->
<!-- asyncapi-example-tester:{"name":"Security Scheme Object - JWT","json_pointer":"#/components/securitySchemes/JWTAuth"} -->
```json
{
"type": "http",
Expand All @@ -2502,7 +2502,7 @@ in: header
}
```

<!-- asyncapi-example-tester:{"name":"Security Scheme Object - JWT","json_pointer":"#/components/securitySchemes/oauth"} -->
<!-- asyncapi-example-tester:{"name":"Security Scheme Object - JWT","json_pointer":"#/components/securitySchemes/JWTAuth"} -->
```yaml
type: http
scheme: bearer
Expand Down Expand Up @@ -2545,14 +2545,14 @@ scopes:

###### SASL Sample

<!-- asyncapi-example-tester:{"name":"Security Scheme Object - SASL","json_pointer":"#/components/securitySchemes/oauth"} -->
<!-- asyncapi-example-tester:{"name":"Security Scheme Object - SASL","json_pointer":"#/components/securitySchemes/saslAuth"} -->
```json
{
"type": "scramSha512"
}
```

<!-- asyncapi-example-tester:{"name":"Security Scheme Object - SASL","json_pointer":"#/components/securitySchemes/oauth"} -->
<!-- asyncapi-example-tester:{"name":"Security Scheme Object - SASL","json_pointer":"#/components/securitySchemes/saslAuth"} -->
```yaml
type: scramSha512
```
Expand Down Expand Up @@ -2589,21 +2589,20 @@ This object MAY be extended with [Specification Extensions](#specificationExtens

##### OAuth Flow Object Examples

###### clientCredentials Oauth Flow Object Example

<!-- asyncapi-example-tester:{"name":"Security Scheme OAuth Flow Object","json_pointer":"#/components/securitySchemes/oauth/flows/clientCredentials"} -->
```json
{
"authorizationUrl": "https://example.com/api/oauth/dialog",
"tokenUrl": "https://example.com/api/oauth/token",
"availableScopes": {
"write:pets": "modify pets in your account",
"read:pets": "read your pets"
}
}
```

<!-- asyncapi-example-tester:{"name":"Security Scheme OAuth Flow Object","json_pointer":"#/components/securitySchemes/oauth/flows/clientCredentials"} -->
```yaml
authorizationUrl: https://example.com/api/oauth/dialog
tokenUrl: https://example.com/api/oauth/token
availableScopes:
write:pets: modify pets in your account
Expand Down

0 comments on commit 9347567

Please sign in to comment.