Skip to content

Commit

Permalink
Make swagger endpoint unauthenticated; fix host
Browse files Browse the repository at this point in the history
  • Loading branch information
jpahm committed Oct 28, 2024
1 parent cddbc5f commit daf6f64
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
3 changes: 2 additions & 1 deletion api/docs/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -595,6 +595,7 @@ const docTemplate = `{
},
"/swagger/index.html": {
"get": {
"security": [],
"description": "Returns the OpenAPI/swagger spec for the API",
"produces": [
"text/html"
Expand Down Expand Up @@ -938,7 +939,7 @@ const docTemplate = `{
// SwaggerInfo holds exported Swagger Info so clients can modify it
var SwaggerInfo = &swag.Spec{
Version: "0.1.0",
Host: "nebula-api-2lntm5dxoflqn.apigateway.nebula-api-368223.cloud.goog",
Host: "",
BasePath: "",
Schemes: []string{"http", "https"},
Title: "nebula-api",
Expand Down
2 changes: 1 addition & 1 deletion api/docs/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
"contact": {},
"version": "0.1.0"
},
"host": "nebula-api-2lntm5dxoflqn.apigateway.nebula-api-368223.cloud.goog",
"paths": {
"/course": {
"get": {
Expand Down Expand Up @@ -592,6 +591,7 @@
},
"/swagger/index.html": {
"get": {
"security": [],
"description": "Returns the OpenAPI/swagger spec for the API",
"produces": [
"text/html"
Expand Down
2 changes: 1 addition & 1 deletion api/docs/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,6 @@ definitions:
$ref: '#/definitions/schema.Assistant'
type: array
type: object
host: nebula-api-2lntm5dxoflqn.apigateway.nebula-api-368223.cloud.goog
info:
contact: {}
description: The public Nebula Labs API for access to pertinent UT Dallas data
Expand Down Expand Up @@ -589,6 +588,7 @@ paths:
responses:
"200":
description: OK
security: []
schemes:
- http
- https
Expand Down
3 changes: 2 additions & 1 deletion api/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,18 @@ import (
ginSwagger "github.com/swaggo/gin-swagger"
)

// Unauthenticated placeholder endpoint for the built-in ginSwagger swagger documentation endpoint
// @Id swagger
// @Router /swagger/index.html [get]
// @Description Returns the OpenAPI/swagger spec for the API
// @Produce text/html
// @Security
// @Success 200
func swagger_controller_placeholder() {}

// @title nebula-api
// @description The public Nebula Labs API for access to pertinent UT Dallas data
// @version 0.1.0
// @host nebula-api-2lntm5dxoflqn.apigateway.nebula-api-368223.cloud.goog
// @schemes http https
// @x-google-backend {"address": "REDACTED"}
// @x-google-endpoints [{"name": "nebula-api-2lntm5dxoflqn.apigateway.nebula-api-368223.cloud.goog", "allowCors": true}]
Expand Down

0 comments on commit daf6f64

Please sign in to comment.