mirror of
https://github.com/LibreSign/libresign.git
synced 2025-12-18 05:20:45 +01:00
Merge branch 'main' of github.com:LibreSign/libresign into endpoint-to-list-libresign-docs
This commit is contained in:
commit
4304a75c1e
19 changed files with 21 additions and 10248 deletions
23
.github/workflows/deploy-docs.yml
vendored
23
.github/workflows/deploy-docs.yml
vendored
|
|
@ -1,23 +0,0 @@
|
|||
name: Build and deploy documentation
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
jobs:
|
||||
build-and-deploy:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout 🛎️
|
||||
uses: actions/checkout@v2.3.1
|
||||
|
||||
- name: Install and Build 🔧
|
||||
run: |
|
||||
cd docs
|
||||
npm install
|
||||
./node_modules/.bin/vuepress build
|
||||
|
||||
- name: Deploy 🚀
|
||||
uses: JamesIves/github-pages-deploy-action@4.0.0
|
||||
with:
|
||||
branch: gh-pages
|
||||
folder: docs/.vuepress/dist
|
||||
6
.github/workflows/phpunit.yml
vendored
6
.github/workflows/phpunit.yml
vendored
|
|
@ -50,6 +50,12 @@ jobs:
|
|||
with:
|
||||
path: apps/${{ env.APP_NAME }}
|
||||
|
||||
- name: Checkout site
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: libresign/libresign.github.io
|
||||
path: 'apps/${{ env.APP_NAME }}/build/site'
|
||||
|
||||
- name: Set up php ${{ matrix.php-versions }}
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ Types of changes:
|
|||
|
||||
# Removed
|
||||
- Removed dsv folder
|
||||
- Removed docs folder
|
||||
|
||||
# Fixed
|
||||
- Rendering files tab in Nextcloud 20 and 21
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ Fork and pull request! 😃
|
|||
|
||||
NOTE: If the project does not have an issue for what you want to do, create an issue first.
|
||||
|
||||
Feel free to submit [Github Issues](https://github.com/lyseontech/libresign/issues) or pull requests.
|
||||
Feel free to submit [Github Issues](https://github.com/libresign/libresign/issues) or pull requests.
|
||||
|
||||
The documentation website is build from the docs folder with vuepress.
|
||||
|
||||
|
|
@ -14,11 +14,9 @@ The documentation website is build from the docs folder with vuepress.
|
|||
make serve
|
||||
```
|
||||
|
||||
## To build documentation
|
||||
## To update API documentation
|
||||
|
||||
```bash
|
||||
make docs
|
||||
```
|
||||
[Repository of site and API documentation](https://github.com/libresign/libresign.github.io)
|
||||
|
||||
## To run PHPUnit
|
||||
|
||||
|
|
|
|||
10
Makefile
10
Makefile
|
|
@ -10,6 +10,7 @@
|
|||
app_name=$(notdir $(CURDIR))
|
||||
project_directory=$(CURDIR)/../$(app_name)
|
||||
build_tools_directory=$(CURDIR)/build/tools
|
||||
site_build_directory=$(CURDIR)/build/site
|
||||
appstore_build_directory=$(CURDIR)/build/artifacts/appstore
|
||||
appstore_package_name=$(appstore_build_directory)/$(app_name)
|
||||
appstore_sign_dir=$(appstore_build_directory)/sign
|
||||
|
|
@ -65,9 +66,12 @@ lint-fix:
|
|||
stylelint:
|
||||
yarn stylelint
|
||||
|
||||
.PHONY: docs
|
||||
docs:
|
||||
cd docs; yarn dev
|
||||
site:
|
||||
@if [ ! -d $(site_build_directory) ]; then \
|
||||
mkdir -p $(site_build_directory) ; \
|
||||
git clone https://github.com/LibreSign/site $(site_build_directory) ; \
|
||||
fi
|
||||
$(MAKE) watch-js -C $(site_build_directory)
|
||||
|
||||
# Cleaning
|
||||
.PHONY: clean
|
||||
|
|
|
|||
|
|
@ -99,7 +99,7 @@ With this configuration when accessing `validate.yourdomain.coop/b9809a7e-ab6e-1
|
|||
|
||||
## Full documentation
|
||||
|
||||
[here](https://libresign.github.io/libresign/)
|
||||
[here](https://libresign.github.io/)
|
||||
|
||||
## Contributing
|
||||
|
||||
|
|
|
|||
|
|
@ -1,56 +0,0 @@
|
|||
module.exports = {
|
||||
title: 'LibreSign',
|
||||
base: '/libresign/',
|
||||
description: 'Libre digital signature app for Nextcloud.',
|
||||
theme: 'openapi',
|
||||
themeConfig: {
|
||||
servers: ['/api/0.1/'],
|
||||
locales: {
|
||||
'/': {
|
||||
sidebar: 'auto',
|
||||
nav: [
|
||||
{
|
||||
text: 'Guide',
|
||||
link: '/Getting-started' },
|
||||
{
|
||||
text: 'LibreCode',
|
||||
link: 'https://librecode.coop/'
|
||||
},
|
||||
{
|
||||
text: 'Github',
|
||||
link: 'https://github.com/libresign/libresign'
|
||||
}
|
||||
]
|
||||
},
|
||||
'/pt/': {
|
||||
sidebar: 'auto',
|
||||
nav: [
|
||||
{
|
||||
text: 'Guia',
|
||||
link: '/Getting-started' },
|
||||
{
|
||||
text: 'LibreCode',
|
||||
link: 'https://librecode.coop/'
|
||||
},
|
||||
{
|
||||
text: 'Github',
|
||||
link: 'https://github.com/libresign/libresign'
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
locales: {
|
||||
'/': {
|
||||
lang: 'en-US'
|
||||
},
|
||||
'/pt/': {
|
||||
lang: 'pt-BR',
|
||||
description: 'App de assinatura digital livre para Nextcloud.'
|
||||
}
|
||||
},
|
||||
plugins: [
|
||||
'@vuepress/plugin-back-to-top',
|
||||
'@vuepress/plugin-medium-zoom',
|
||||
]
|
||||
};
|
||||
File diff suppressed because it is too large
Load diff
|
|
@ -1,37 +0,0 @@
|
|||
# Prequisited
|
||||
|
||||
- All requests require a `Content-Type` of `application/json`.
|
||||
- The API is located at https://nextcloud.local/index.php/apps/libresign/api/v1.0
|
||||
- All request parameters are required, unless otherwise specified
|
||||
|
||||
# Headers
|
||||
|
||||
Read https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Authorization
|
||||
|
||||
Example:
|
||||
|
||||
```bash
|
||||
curl -X POST \
|
||||
http://localhost/index.php/apps/libresign/api/0.1/webhook/register \
|
||||
-H 'Accept: application/json' \
|
||||
-H 'Authorization: Basic YWRtaW46YWRtaW4=' \
|
||||
-H 'Content-Type: application/json'
|
||||
-d '{
|
||||
"file": {
|
||||
"url": "https://test.coop/test.pdf"
|
||||
},
|
||||
"name": "test",
|
||||
"callback": "https://test.coop/callbackWebhook",
|
||||
"users": [
|
||||
{
|
||||
"display_name": "Jhon Doe",
|
||||
"email": "jhondoe@test.coop",
|
||||
"description": "Lorem ipsum"
|
||||
}
|
||||
]
|
||||
}'
|
||||
```
|
||||
|
||||
# Endpoints
|
||||
|
||||
[Api Documentation](api)
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
---
|
||||
home: true
|
||||
actionText: To be libre →
|
||||
actionLink: /Getting-started
|
||||
features:
|
||||
- title: Digital Sign
|
||||
details: Sign documents using a digital certificate
|
||||
- title: Open Source
|
||||
details: All parts of this software are and will always stay open
|
||||
- title: OpenAPI specification
|
||||
details: The API is compatible with the OpenAPI Specification.
|
||||
---
|
||||
|
||||
## Links
|
||||
|
||||
- [Getting started guide](Getting-started.md)
|
||||
- [Api Documentation](api)
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
{
|
||||
"name": "libresign-docs",
|
||||
"version": "1.0.0",
|
||||
"description": "Documentation of LibreSign",
|
||||
"main": "index.js",
|
||||
"license": "AGPL",
|
||||
"scripts": {
|
||||
"dev": "vuepress dev .",
|
||||
"docs:build": "vuepress build ."
|
||||
},
|
||||
"devDependencies": {
|
||||
"vuepress": "^1.8.2",
|
||||
"vuepress-theme-openapi": "^1.6.0"
|
||||
},
|
||||
"browserslist": [
|
||||
"defaults"
|
||||
],
|
||||
"dependencies": {}
|
||||
}
|
||||
|
|
@ -1,36 +0,0 @@
|
|||
# Pré-requisitos
|
||||
|
||||
- Todas as requisições precisam ter `Content-Type` com `application/json`.
|
||||
- A API é acesívem em https://nextcloud.local/index.php/apps/libresign/api/v1.0
|
||||
- Todos os parâmetros são necesários exceto se for especificado que não são.
|
||||
|
||||
# Cabeçalhos
|
||||
|
||||
Leia https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Authorization
|
||||
|
||||
Exemplo:
|
||||
|
||||
```bash
|
||||
curl -X POST \
|
||||
http://localhost/index.php/apps/libresign/api/0.1/webhook/register \
|
||||
-H 'Accept: application/json' \
|
||||
-H 'Authorization: Basic YWRtaW46YWRtaW4=' \
|
||||
-H 'Content-Type: application/json'
|
||||
-d '{
|
||||
"file": {
|
||||
"url": "https://test.coop/test.pdf"
|
||||
},
|
||||
"name": "test",
|
||||
"users": [
|
||||
{
|
||||
"display_name": "Jhon Doe",
|
||||
"email": "jhondoe@test.coop",
|
||||
"description": "Lorem ipsum"
|
||||
}
|
||||
]
|
||||
}'
|
||||
```
|
||||
|
||||
# Endpoints
|
||||
|
||||
[Documetnação da Api](api)
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
---
|
||||
home: true
|
||||
actionText: Seja Libre →
|
||||
actionLink: /Getting-started
|
||||
features:
|
||||
- title: Assinatura digital
|
||||
details: Assine documentos usando um certificado digital
|
||||
- title: Software Livre
|
||||
details: Todas as partes deste software são e continuarão livres
|
||||
- title: Especificação OpenAPI
|
||||
details: A API é compatível com especificação OpenAPI.
|
||||
---
|
||||
|
||||
## Links
|
||||
|
||||
- [Guia para iniciantes](Getting-started.md)
|
||||
- [Documetnação da Api](api)
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
# API
|
||||
|
||||
Documentation of API
|
||||
8813
docs/yarn.lock
8813
docs/yarn.lock
File diff suppressed because it is too large
Load diff
|
|
@ -58,7 +58,7 @@ export default {
|
|||
await axios.post(generateUrl('/apps/libresign/api/0.1/account/signature'), {
|
||||
signPassword: this.password,
|
||||
})
|
||||
showSuccess(t('libresign', 'New password for sign document created'))
|
||||
showSuccess(t('libresign', 'New password to sign documents has been created'))
|
||||
this.hasLoading = false
|
||||
this.$store.commit('setHasPfx', true)
|
||||
this.$router.push({ name: 'Home' })
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ export default {
|
|||
await axios.post(generateUrl('/apps/libresign/api/0.1/account/signature'), {
|
||||
signPassword: this.password,
|
||||
})
|
||||
showSuccess(t('libresign', 'New password for sign document created'))
|
||||
showSuccess(t('libresign', 'New password to sign documents has been created'))
|
||||
this.hasLoading = false
|
||||
this.$router.push({ name: 'Home' })
|
||||
} catch (err) {
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ class ApiTestCase extends TestCase {
|
|||
|
||||
public function setUp(): void {
|
||||
parent::setUp();
|
||||
$data = Yaml::parse(file_get_contents('docs/.vuepress/public/specs/api.yaml'));
|
||||
$data = Yaml::parse(file_get_contents('build/site/site/.vuepress/public/specs/api.yaml'));
|
||||
$data['servers'][] = ['url' => 'http://localhost/apps/libresign/api/0.1'];
|
||||
/** @var OpenApiSchema */
|
||||
$schema = \ByJG\ApiTools\Base\Schema::getInstance($data);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue