
Research
/Security News
11 Malicious Go Packages Distribute Obfuscated Remote Payloads
Socket uncovered 11 malicious Go packages using obfuscated loaders to fetch and execute second-stage payloads via C2 domains.
@sparing-software/sparing-open-api
Advanced tools
Generate http service based on open api schema
npm i @sparing-software/sparing-open-api
Create a sparing-open-api.config.js file at the root of the project
/** @type {import('@sparing-software/sparing-open-api').Config} */
export default {
url: 'https://example.com/schema/'
}
To comfortly use generated service in futher application consider creating another file in service
folder:
service/http.service.ts
import { Api } from './$OPEN_API_OUT_FILENAME'
export const httpService = new Api({
baseURL: process.env.VUE_APP_API_URL
})
httpService.instance.interceptors.request.use(config => {
config.headers.Authorization = localStorage.getItem('token')
return config
})
Which can be later easily used as follows:
import { httpService } from '@/service/http.service'
const issues = await httpService.projects.getIssues(project.id)
It is also recommended to add prebuild
and preserve
/predev
scripts to your package.json
file in order to get the newest api on each start:
{
"scripts": {
"prebuild": "sparing-open-api",
"preserve": "sparing-open-api",
...
}
}
Or you can always do it manually by running sparing-open-api
from terminal opened inside your project.
Want to help improve this plugin? Great!
Project is open-source so fork repo and join us!
Use Conventional Commits to automatically bump major, minor and patch versions. Read more about semantic releasing in this docs.
MIT License © Sparing Interactive
FAQs
Generate http service based on open api schema
The npm package @sparing-software/sparing-open-api receives a total of 724 weekly downloads. As such, @sparing-software/sparing-open-api popularity was classified as not popular.
We found that @sparing-software/sparing-open-api demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
/Security News
Socket uncovered 11 malicious Go packages using obfuscated loaders to fetch and execute second-stage payloads via C2 domains.
Security News
TC39 advances 11 JavaScript proposals, with two moving to Stage 4, bringing better math, binary APIs, and more features one step closer to the ECMAScript spec.
Research
/Security News
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).