/echonext:echonext-openapi-securityfrom echonext
Configures EchoNext's auto-generated OpenAPI spec and authentication. Sets API metadata, serves OpenAPI JSON or Swagger UI, and adds security schemes (bearer, API key, OAuth2, OpenID) with global or per-route requirements.
Ships in echonext. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
EchoNext generates an OpenAPI 3.0 spec from your type-safe routes and structs automatically. You only add metadata (info, servers, security) and choose how to serve it. Security schemes are declared once, then referenced by name on routes or globally.
app := echonext.New()
app.SetInfo("Todo API", "1.0.0", "Manage todos")
app.SetContact("API Team", "https://example.com", "[email protected]")
app.SetLicense("MIT", "https://opensource.org/licenses/MIT")
app.SetServers([]echonext.Server{
{URL: "https://api.example.com", Description: "production"},
{URL: "http://localhost:8080", Description: "local"},
})
app.ServeOpenAPISpec("/api/openapi.json") // raw OpenAPI JSON
app.ServeSwaggerUI("/api/docs", "/api/openapi.json") // Swagger UI at /api/docs
If you need the spec object directly (e.g. to write it to a file in a build
step): spec := app.GenerateOpenAPISpec().
The Route{} options on any route feed the spec:
app.POST("/todos", createTodo, echonext.Route{
Summary: "Create a todo",
Description: "Creates a todo and returns it.",
Tags: []string{"Todos"},
SuccessStatus: http.StatusCreated,
})
Request/response schemas and parameters are derived from your handler's typed
req/return structs and their json:/query:/param:/validate: tags — you
do not hand-write schemas.
// Bearer / JWT
app.AddSecurityScheme("bearerAuth", echonext.Security{
Type: "bearer",
Scheme: "JWT",
})
// API key in a header
app.AddSecurityScheme("apiKey", echonext.Security{
Type: "apiKey",
In: "header",
Name: "X-API-Key",
})
// Global default for every route:
app.SetGlobalSecurity(echonext.SecurityRequirement{SchemeName: "bearerAuth"})
// Per route (and opt a route OUT of the global default):
app.GET("/public/health", health, echonext.Route{
DisableGlobalSecurity: true,
})
// Per route requirement with OAuth2 scopes:
app.GET("/admin", adminHandler, echonext.Route{
Security: []echonext.SecurityRequirement{
{SchemeName: "oauth2", Scopes: []string{"admin"}},
},
})
Security schemes document the API and drive Swagger UI's "Authorize" button. They do not enforce auth by themselves — enforce it with middleware (e.g. an Echo JWT middleware) on the routes/groups that need it.
See references/security-schemes.md for the
full Security field reference and OAuth2 / OpenID Connect setups.
SetInfo + SetServers early in setup.AddSecurityScheme(name, …) before referencing it.SetGlobalSecurity for the common case; DisableGlobalSecurity /
Route.Security for exceptions.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
echonext, openapi, swagger-ui, security-schemes, api-authentication
npx claudepluginhub abdussamadbello/echonext --plugin echonext9 skills in this plugin
/echonext-cliUse the EchoNext CLI to scaffold projects and code, run the dev loop, build, test, and manage the database. Use when creating a new echonext project, generating code (domain/handler/service/model/dto/middleware/openapi/graphql/ websocket/upload), or running dev/build/test/db commands./echonext-databaseWork with EchoNext's database layer: GORM models, the generic Repository[T] pattern from pkg/contrib/database, and Atlas migrations/seeds via the CLI. Use when defining models, querying/persisting data, or creating and applying migrations in an echonext project./echonext-domainScaffold and wire up a complete EchoNext domain (model + service + handler + DTO) following the framework's conventional layout. Use when adding a new resource, feature, or entity to an echonext project (e.g. "add a users endpoint", "create a products domain")./echonext-handlersWrite and register type-safe EchoNext HTTP handlers, request structs, and routes. Use when adding, editing, or debugging an echonext handler function, a request/response struct, validation tags, or a route registration (GET/POST/PUT/PATCH/DELETE)./echonext-integrationsAdd WebSocket, GraphQL, or file-upload endpoints to an EchoNext app. Use when building real-time/WebSocket handlers (Hub pattern), wiring a gqlgen GraphQL schema, or accepting multipart file uploads with validation./echonext-middleware-configRegister, order and write EchoNext middleware, and load application configuration. Use when adding middleware (auth, CORS, logging, request IDs, metrics, tracing) to an echonext app or group, writing a custom echo.MiddlewareFunc, or loading config from YAML/env with the contrib config package.Other plugins' skills for the same job