apidocly 1.0.5 → 1.0.7

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "apidocly",
3
- "version": "1.0.5",
3
+ "version": "1.0.7",
4
4
  "description": "API documentation generator with beautiful dark UI, password protection, and OpenAPI/Rest client export.",
5
5
  "main": "lib/index.js",
6
6
  "bin": {
@@ -2852,3 +2852,30 @@ a:hover {
2852
2852
  font-family: var(--font-mono);
2853
2853
  color: var(--primary);
2854
2854
  }
2855
+
2856
+ /* ========================================
2857
+ FOOTER CREDIT
2858
+ ======================================== */
2859
+
2860
+ .app-footer {
2861
+ text-align: center;
2862
+ padding: 2rem 1rem;
2863
+ font-size: 0.8125rem;
2864
+ color: var(--muted-foreground);
2865
+ opacity: 0.6;
2866
+ transition: opacity 0.2s;
2867
+ }
2868
+
2869
+ .app-footer:hover {
2870
+ opacity: 0.85;
2871
+ }
2872
+
2873
+ .app-footer a {
2874
+ color: var(--primary);
2875
+ text-decoration: none;
2876
+ font-weight: 500;
2877
+ }
2878
+
2879
+ .app-footer a:hover {
2880
+ text-decoration: underline;
2881
+ }
@@ -244,6 +244,11 @@
244
244
  </div>
245
245
  </div>
246
246
  </main>
247
+
248
+ <!-- Footer Credit -->
249
+ <footer class="app-footer">
250
+ <span>Documentation generated with <a href="https://apidocly.com" target="_blank" rel="noopener noreferrer">apidocly</a></span>
251
+ </footer>
247
252
  </div>
248
253
 
249
254
  <script src="api_data.js?v={{CACHE_VERSION}}"></script>
@@ -1707,8 +1707,20 @@
1707
1707
  });
1708
1708
  });
1709
1709
 
1710
- // Query parameters
1710
+ // Get non-path params from @apiParam (parameters that aren't in the URL path)
1711
+ const nonPathParams = allParams.filter(p => !pathParams.includes(p.field));
1712
+
1713
+ // Query parameters (from @apiQuery + non-path @apiParam for GET/DELETE)
1711
1714
  const queryParams = getAllParams(endpoint.query);
1715
+ // For GET/DELETE methods, @apiParam without explicit @apiQuery should be query params
1716
+ if (['get', 'delete'].includes(method)) {
1717
+ nonPathParams.forEach(param => {
1718
+ // Skip if already defined in query
1719
+ if (!queryParams.some(q => q.field === param.field)) {
1720
+ queryParams.push(param);
1721
+ }
1722
+ });
1723
+ }
1712
1724
  queryParams.forEach(param => {
1713
1725
  operation.parameters.push({
1714
1726
  name: param.field,
@@ -1735,6 +1747,15 @@
1735
1747
 
1736
1748
  // Request body (for POST, PUT, PATCH)
1737
1749
  const bodyParams = getAllParams(endpoint.body);
1750
+ // For POST/PUT/PATCH methods, @apiParam without explicit @apiBody should be body params
1751
+ if (['post', 'put', 'patch'].includes(method)) {
1752
+ nonPathParams.forEach(param => {
1753
+ // Skip if already defined in body
1754
+ if (!bodyParams.some(b => b.field === param.field)) {
1755
+ bodyParams.push(param);
1756
+ }
1757
+ });
1758
+ }
1738
1759
  if (['post', 'put', 'patch'].includes(method) && bodyParams.length > 0) {
1739
1760
  const requiredFields = bodyParams.filter(p => !p.optional).map(p => p.field);
1740
1761
  const properties = {};