Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DataAccess Module for OpenAPI Specification #791

Closed
sterapps opened this issue Nov 9, 2021 · 4 comments
Closed

DataAccess Module for OpenAPI Specification #791

sterapps opened this issue Nov 9, 2021 · 4 comments
Assignees
Milestone

Comments

@sterapps
Copy link
Member

sterapps commented Nov 9, 2021

Specification URL: https://api.snypy.com/api/v1/schema/swagger-ui/

@nezhar nezhar added this to the 1.1 milestone Apr 9, 2022
@nezhar nezhar self-assigned this Apr 9, 2022
@nezhar
Copy link
Collaborator

nezhar commented May 7, 2022

Cleint is currently generated manually:

docker run -u $(id -u ${USER}):$(id -g ${USER}) --rm -v "${PWD}:/local" openapitools/openapi-generator-cli generate \
    -i https:/snypy/snypy-backend/releases/download/1.0.0/openapi.yml \
    -g typescript-angular \
    -o /local/client \
    --additional-properties=npmName=@snypy/rest-client,supportsES6=true,withInterfaces=true,npmVersion=1.0.0

An published to https://www.npmjs.com/package/@snypy/rest-client

It requires some manual steps for now:

@nezhar nezhar closed this as completed May 7, 2022
@nezhar
Copy link
Collaborator

nezhar commented May 7, 2022

It seems that the installation of the module still has some issues.

@nezhar
Copy link
Collaborator

nezhar commented May 7, 2022

Fixed by splitting request and response components in openapi.

Also the created package needs to be build before published to npm.

docker run -u $(id -u ${USER}):$(id -g ${USER}) --rm -v "${PWD}:/local" openapitools/openapi-generator-cli generate \
    -i https:/snypy/snypy-backend/releases/download/1.0.1/openapi.yml \
    -g typescript-angular \
    -o /local/client \
    --additional-properties=npmName=@snypy/rest-client,npmVersion=1.0.1

cd client
npm install --force
npm run build

cd dist
npm publish --access public

@nezhar nezhar closed this as completed May 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

2 participants