@lunch-money/v2-api-spec 2.11.1-preview.3 → 2.11.1-preview.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -39,73 +39,11 @@ npx @openapitools/openapi-generator-cli generate \
39
39
  npx swagger-cli validate node_modules/@lunch-money/v2-api-spec/lunch-money-api-v2.yaml
40
40
  ```
41
41
 
42
- ### Updating URLs for Local Development
42
+ ### Spec URLs
43
43
 
44
- The package includes a script to help switch between local and production URLs in the OpenAPI specification. This is useful when developing against a local server.
45
-
46
- #### Using the Script
47
-
48
- The script is located at `node_modules/@lunch-money/v2-api-spec/update-urls.sh`.
49
-
50
- **Required flags:**
51
- - `--local` - Switch URLs to local development (default: `http://localhost:3000/v2`)
52
- - `--production` - Switch URLs to production deployment URLs
53
-
54
- **Switch to production URLs (using defaults):**
55
- ```bash
56
- cd node_modules/@lunch-money/v2-api-spec
57
- ./update-urls.sh --production
58
- ```
59
-
60
- **Switch to production URLs (with custom URLs):**
61
- ```bash
62
- cd node_modules/@lunch-money/v2-api-spec
63
- API_DEPLOY_URL=https://api.lunchmoney.app/v2 \
64
- DOCS_DEPLOY_URL=https://alpha.lunchmoney.app/v2 \
65
- ./update-urls.sh --production
66
- ```
67
-
68
- **Switch to local URLs:**
69
- ```bash
70
- cd node_modules/@lunch-money/v2-api-spec
71
- ./update-urls.sh --local
72
- ```
73
-
74
- **Switch to local URLs (with custom local URL):**
75
- ```bash
76
- cd node_modules/@lunch-money/v2-api-spec
77
- LOCAL_URL=http://localhost:4000/v2 ./update-urls.sh --local
78
- ```
79
-
80
- **Using environment variables:**
81
- Create a `.env` file in the package directory:
82
- ```bash
83
- LOCAL_URL=http://localhost:3000/v2
84
- API_DEPLOY_URL=https://api.lunchmoney.app/v2
85
- DOCS_DEPLOY_URL=https://alpha.lunchmoney.app/v2
86
- ```
87
-
88
- Then run:
89
- ```bash
90
- ./update-urls.sh --production
91
- # or
92
- ./update-urls.sh --local
93
- ```
94
-
95
- #### How It Works
96
-
97
- The script updates the `servers` section in the OpenAPI specification:
98
- - **Server 1**: Typically the production API server
99
- - **Server 2**: Typically a mock or staging server
100
-
101
- It also updates any references to these URLs throughout the specification file.
102
-
103
- #### Important Notes
104
-
105
- - The script modifies the spec file in place
106
- - Changes are not persisted across `npm install` - the package will be restored to its original state
107
- - For persistent changes, consider copying the spec to your project directory first
108
- - The script works in both the npm package and the git repository
44
+ The published YAML uses public production docs/API URLs. Do not rewrite them in this
45
+ package for local or deploy environments — consuming apps (for example the Lunch Money
46
+ docs/mock server) should rewrite an installed copy when needed.
109
47
 
110
48
  ## Versioning
111
49