Skip to content

Commit

Permalink
Add swagger docs at /api/docs, standardize on /api instead of some /API
Browse files Browse the repository at this point in the history
  • Loading branch information
tariqksoliman committed Feb 28, 2025
1 parent 1eabcf0 commit dccca79
Show file tree
Hide file tree
Showing 30 changed files with 4,436 additions and 6,306 deletions.
1,067 changes: 0 additions & 1,067 deletions API/Backend/APIs/routes/apis.js

This file was deleted.

10 changes: 0 additions & 10 deletions API/Backend/APIs/setup.js

This file was deleted.

4 changes: 2 additions & 2 deletions config/login/adminlogin.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ function login() {

$.ajax({
type: "POST",
url: "API/users/login",
url: "api/users/login",
data: {
username: document.getElementById("username").value,
password: document.getElementById("pwd").value,
Expand Down Expand Up @@ -72,7 +72,7 @@ function setupLogin() {

$.ajax({
type: "POST",
url: "API/users/first_signup",
url: "api/users/first_signup",
data: {
username: document.getElementById("username").value,
password: document.getElementById("pwd").value,
Expand Down
28 changes: 8 additions & 20 deletions configure/src/pages/APIs/APIs.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,14 @@ import ApiIcon from "@mui/icons-material/Api";
import OpenInNewIcon from "@mui/icons-material/OpenInNew";

const apiCards = {
"MMGIS Backend API": {
title: "MMGIS Backend API",
subtitle: "An incomplete list of supported backend endpoints.",
"MMGIS API": {
title: "MMGIS API",
subtitle:
"The Core MMGIS API provides a series of robust endpoints for managing mission configurations, datasets, geodatasets, drawing functionalities, file operations, user management and geospatial operations.",
description: "",
link: `https://nasa-ammos.github.io/MMGIS/apis/backend`,
link: `${window.location.pathname
.replace(`/configure-beta`, "")
.replace(/^\//g, "")}/api/docs`,
active: true,
},
"MMGIS JavaScript API": {
Expand All @@ -26,21 +29,6 @@ const apiCards = {
link: `https://nasa-ammos.github.io/MMGIS/apis/javascript`,
active: true,
},
"MMGIS Configure API": {
title: "MMGIS Configure API",
subtitle: "Enables programmatic control over configuration endpoints.",
description: "",
link: `https://nasa-ammos.github.io/MMGIS/apis/configure`,
active: true,
},
"MMGIS GeoDatasets API": {
title: "MMGIS GeoDatasets API",
subtitle:
"Enables programmatic control over GeoDataset layers. GeoDatasets are GeoJSON files uploaded and managed by MMGIS and stored in MMGIS’ Postgres/PostGIS database.",
description: "",
link: `https://nasa-ammos.github.io/MMGIS/apis/geodatasets`,
active: true,
},
STAC: {
title: "STAC",
subtitle: "FastAPI implementation of the STAC API spec.",
Expand Down Expand Up @@ -118,7 +106,7 @@ const useStyles = makeStyles((theme) => ({
"rgba(0, 0, 0, 0.2) 0px 2px 1px -1px, rgba(0, 0, 0, 0.14) 0px 1px 1px 0px, rgba(0, 0, 0, 0.12) 0px 1px 3px 0px",
transition: "background 0.2s ease-in-out",
"&:hover": {
background: theme.palette.swatches.grey[850],
background: theme.palette.swatches.grey[800],
cursor: "pointer",
},
},
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.sample.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ services:
"curl",
"-XGET",
"-k",
"http://mmgis:8888/API/utils/healthcheck",
"http://mmgis:8888/api/utils/healthcheck",
]
interval: 20s
retries: 5
Expand Down
Loading

0 comments on commit dccca79

Please sign in to comment.