Skip to content

Commit

Permalink
Openapiclient (#3)
Browse files Browse the repository at this point in the history
* GeoNetwork openapi client.

* GeoNetwork openapi client in lib folder.
  • Loading branch information
fxprunayre authored Nov 22, 2021
1 parent 5c6b3bb commit 83a0cdc
Show file tree
Hide file tree
Showing 19 changed files with 62,768 additions and 4,176 deletions.
7 changes: 7 additions & 0 deletions openapitools.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"$schema": "node_modules/@openapitools/openapi-generator-cli/config.schema.json",
"spaces": 2,
"generator-cli": {
"version": "5.3.0"
}
}
10,081 changes: 5,909 additions & 4,172 deletions package-lock.json

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,23 @@
"@types/node": "^12.20.37",
"@types/react": "^17.0.34",
"@types/react-dom": "^17.0.11",
"axios": "^0.24.0",
"react": "^16.14.0",
"react-dom": "^16.14.0",
"react-scripts": "4.0.3",
"semantic-ui-css": "^2.4.1",
"semantic-ui-react": "^2.0.4",
"typescript": "^4.4.4",
"url": "^0.11.0",
"web-vitals": "^1.1.2"
},
"scripts": {
"start": "react-scripts start",
"start-es": "set REACT_APP_ENV=ES && react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
"eject": "react-scripts eject",
"generate-api:geonetwork": "tools/generate-api.sh geonetwork-openapi"
},
"eslintConfig": {
"extends": [
Expand All @@ -45,6 +48,7 @@
]
},
"devDependencies": {
"@openapitools/openapi-generator-cli": "^2.4.16",
"prettier": "2.4.1"
}
}
11 changes: 11 additions & 0 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,19 @@ import AggCardComponent from "./components/organisms/AggCardComponent";
import { DefaultQuery } from "./models/DefaultQuery";
import { DefaultSource } from "./models/DefaultSource";
import AggListItemComponent from "./components/organisms/AggListItemComponent";
import axios from "axios";
import {GroupsApi} from "./libs/geonetwork-openapi/src";

export const axiosInstance = axios.create();
const commonParams = [undefined, undefined, axiosInstance];



function App() {
new GroupsApi().getGroups(true).then((r) => {
console.log(r.data);
})

return (
<ReactiveBase
app="gn-records"
Expand Down
4 changes: 4 additions & 0 deletions src/libs/geonetwork-openapi/src/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
wwwroot/*.js
node_modules
typings
dist
1 change: 1 addition & 0 deletions src/libs/geonetwork-openapi/src/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# empty npmignore to ensure all required files (e.g., in the dist folder) are published by npm
23 changes: 23 additions & 0 deletions src/libs/geonetwork-openapi/src/.openapi-generator-ignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# OpenAPI Generator Ignore
# Generated by openapi-generator https://github.com/openapitools/openapi-generator

# Use this file to prevent files from being overwritten by the generator.
# The patterns follow closely to .gitignore or .dockerignore.

# As an example, the C# client generator defines ApiClient.cs.
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
#ApiClient.cs

# You can match any string of characters against a directory, file or extension with a single asterisk (*):
#foo/*/qux
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux

# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
#foo/**/qux
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux

# You can also negate patterns with an exclamation (!).
# For example, you can ignore all files in a docs folder with the file extension .md:
#docs/*.md
# Then explicitly reverse the ignore rule for a single file:
#!docs/README.md
9 changes: 9 additions & 0 deletions src/libs/geonetwork-openapi/src/.openapi-generator/FILES
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.gitignore
.npmignore
.openapi-generator-ignore
api.ts
base.ts
common.ts
configuration.ts
git_push.sh
index.ts
1 change: 1 addition & 0 deletions src/libs/geonetwork-openapi/src/.openapi-generator/VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
5.3.0
Loading

0 comments on commit 83a0cdc

Please sign in to comment.