init
This commit is contained in:
commit
609483c43b
67 files changed
+8380
No files matched your search
@@ -0,0 +1,264 @@
|
||||
import { ChevronRight, MessageSquare, Eye, MoreHorizontal, Download } from 'lucide-react';
|
||||
|
||||
interface MainContentProps {
|
||||
theme: 'light' | 'dark';
|
||||
}
|
||||
|
||||
export function MainContent({ theme }: MainContentProps) {
|
||||
return (
|
||||
<main className="flex-1 max-w-4xl px-4 sm:px-6 lg:px-12 py-4 sm:py-8">
|
||||
{/* Breadcrumb */}
|
||||
<div className={`flex items-center gap-2 text-xs sm:text-sm mb-4 sm:mb-6 ${
|
||||
theme === 'dark' ? 'text-gray-400' : 'text-gray-600'
|
||||
}`}>
|
||||
<a href="#" className="hover:text-blue-600">Learn</a>
|
||||
<ChevronRight className="w-3 h-3 sm:w-4 sm:h-4" />
|
||||
<a href="#" className="hover:text-blue-600">OpenAPI</a>
|
||||
</div>
|
||||
|
||||
{/* Action buttons */}
|
||||
<div className="flex items-center gap-2 mb-4 sm:mb-6 flex-wrap">
|
||||
<button className="flex items-center gap-2 px-3 py-1.5 bg-pink-600 text-white text-xs sm:text-sm rounded hover:bg-pink-700">
|
||||
<MessageSquare className="w-3 h-3 sm:w-4 sm:h-4" />
|
||||
<span className="hidden sm:inline">Ask Learn</span>
|
||||
<span className="sm:hidden">Ask</span>
|
||||
</button>
|
||||
<button className={`flex items-center gap-2 px-3 py-1.5 text-xs sm:text-sm rounded border ${
|
||||
theme === 'dark'
|
||||
? 'bg-[#2d2d2d] text-white border-gray-700 hover:bg-[#3d3d3d]'
|
||||
: 'bg-white text-gray-900 border-gray-300 hover:bg-gray-50'
|
||||
}`}>
|
||||
<Eye className="w-3 h-3 sm:w-4 sm:h-4" />
|
||||
<span className="hidden sm:inline">Focus mode</span>
|
||||
<span className="sm:hidden">Focus</span>
|
||||
</button>
|
||||
<button className={`p-1.5 rounded ${
|
||||
theme === 'dark' ? 'hover:bg-gray-800' : 'hover:bg-gray-100'
|
||||
}`}>
|
||||
<MoreHorizontal className="w-4 h-4" />
|
||||
</button>
|
||||
</div>
|
||||
|
||||
{/* Main heading */}
|
||||
<h1 className="text-2xl sm:text-3xl lg:text-4xl mb-4 sm:mb-6">Kiota API models</h1>
|
||||
|
||||
{/* Introduction */}
|
||||
<p className={`mb-6 sm:mb-8 leading-relaxed text-sm sm:text-base ${
|
||||
theme === 'dark' ? 'text-gray-300' : 'text-gray-700'
|
||||
}`}>
|
||||
The primary goal of Kiota's generated models is to enable a developer to easily craft request payloads and get results as high levels objects. These models eliminate the need for developers to define their own types and/or implement serialization/deserialization.
|
||||
</p>
|
||||
|
||||
{/* Section */}
|
||||
<section className="mb-6 sm:mb-8">
|
||||
<h2 className="text-xl sm:text-2xl mb-3 sm:mb-4" id="components-versus-inline-models">
|
||||
Components versus inline models
|
||||
</h2>
|
||||
<p className={`mb-3 sm:mb-4 leading-relaxed text-sm sm:text-base ${
|
||||
theme === 'dark' ? 'text-gray-300' : 'text-gray-700'
|
||||
}`}>
|
||||
All models declared as components are generated under a <code className={`px-1.5 py-0.5 rounded text-xs sm:text-sm ${
|
||||
theme === 'dark'
|
||||
? 'bg-[#2d2d2d] text-pink-400'
|
||||
: 'bg-gray-100 text-pink-600'
|
||||
}`}>models</code> subnamespace. If models/components are namespaced <code className={`px-1.5 py-0.5 rounded text-xs sm:text-sm ${
|
||||
theme === 'dark'
|
||||
? 'bg-[#2d2d2d] text-pink-400'
|
||||
: 'bg-gray-100 text-pink-600'
|
||||
}`}>components/models</code>, <code className={`px-1.5 py-0.5 rounded text-xs sm:text-sm ${
|
||||
theme === 'dark'
|
||||
? 'bg-[#2d2d2d] text-pink-400'
|
||||
: 'bg-gray-100 text-pink-600'
|
||||
}`}>components/ns1/models</code>, the namespaces are included as subnamespaces of the <code className={`px-1.5 py-0.5 rounded text-xs sm:text-sm ${
|
||||
theme === 'dark'
|
||||
? 'bg-[#2d2d2d] text-pink-400'
|
||||
: 'bg-gray-100 text-pink-600'
|
||||
}`}>models</code> namespace.
|
||||
</p>
|
||||
<p className={`mb-3 sm:mb-4 leading-relaxed text-sm sm:text-base ${
|
||||
theme === 'dark' ? 'text-gray-300' : 'text-gray-700'
|
||||
}`}>
|
||||
All models declared inline with an operation are generated under the namespace of the operation, next to the request builder that uses it. As a reminder, all request builders are put in namespaces according to the path segment they refer to.
|
||||
</p>
|
||||
</section>
|
||||
|
||||
{/* Section */}
|
||||
<section className="mb-6 sm:mb-8">
|
||||
<h2 className="text-xl sm:text-2xl mb-3 sm:mb-4" id="inheritance">
|
||||
Inheritance
|
||||
</h2>
|
||||
<p className={`mb-3 sm:mb-4 leading-relaxed text-sm sm:text-base ${
|
||||
theme === 'dark' ? 'text-gray-300' : 'text-gray-700'
|
||||
}`}>
|
||||
Models in an <a href="#" className="text-blue-600 hover:underline">allOf</a> schema declaration inherit from each other. The uppermost type in the collection is the greatest ancestor of the chain.
|
||||
</p>
|
||||
</section>
|
||||
|
||||
{/* Section */}
|
||||
<section className="mb-6 sm:mb-8">
|
||||
<h3 className="text-lg sm:text-xl mb-3 sm:mb-4" id="allof-interpretation">
|
||||
allOf interpretation rules
|
||||
</h3>
|
||||
<p className={`mb-3 sm:mb-4 leading-relaxed text-sm sm:text-base ${
|
||||
theme === 'dark' ? 'text-gray-300' : 'text-gray-700'
|
||||
}`}>
|
||||
The following table describes how kiota will project any schema with allOf entries when processing an API description:
|
||||
</p>
|
||||
|
||||
{/* Table */}
|
||||
<div className={`border rounded-lg overflow-hidden mt-4 sm:mt-6 ${
|
||||
theme === 'dark' ? 'border-gray-700' : 'border-gray-300'
|
||||
}`}>
|
||||
<button className={`w-full flex items-center justify-center gap-2 py-2 border-b text-xs sm:text-sm ${
|
||||
theme === 'dark'
|
||||
? 'bg-[#0d0d0d] border-gray-700 text-gray-400 hover:text-white'
|
||||
: 'bg-gray-50 border-gray-300 text-gray-600 hover:text-gray-900'
|
||||
}`}>
|
||||
<MoreHorizontal className="w-4 h-4" />
|
||||
<span className="hidden sm:inline">Expand table</span>
|
||||
<span className="sm:hidden">Expand</span>
|
||||
</button>
|
||||
|
||||
<div className="overflow-x-auto">
|
||||
<table className="w-full">
|
||||
<thead>
|
||||
<tr className={`border-b ${
|
||||
theme === 'dark'
|
||||
? 'bg-[#0d0d0d] border-gray-700'
|
||||
: 'bg-gray-50 border-gray-300'
|
||||
}`}>
|
||||
<th className={`px-2 sm:px-4 py-2 sm:py-3 text-left text-xs sm:text-sm ${
|
||||
theme === 'dark' ? 'text-gray-300' : 'text-gray-700'
|
||||
}`}>
|
||||
<span className="hidden sm:inline">Number of peer properties</span>
|
||||
<span className="sm:hidden">Peer props</span>
|
||||
</th>
|
||||
<th className={`px-2 sm:px-4 py-2 sm:py-3 text-left text-xs sm:text-sm ${
|
||||
theme === 'dark' ? 'text-gray-300' : 'text-gray-700'
|
||||
}`}>
|
||||
<span className="hidden sm:inline">Number of inline schemas</span>
|
||||
<span className="sm:hidden">Inline</span>
|
||||
</th>
|
||||
<th className={`px-2 sm:px-4 py-2 sm:py-3 text-left text-xs sm:text-sm ${
|
||||
theme === 'dark' ? 'text-gray-300' : 'text-gray-700'
|
||||
}`}>
|
||||
<span className="hidden sm:inline">Number referenced schemas</span>
|
||||
<span className="sm:hidden">Referenced</span>
|
||||
</th>
|
||||
<th className={`px-2 sm:px-4 py-2 sm:py-3 text-left text-xs sm:text-sm ${
|
||||
theme === 'dark' ? 'text-gray-300' : 'text-gray-700'
|
||||
}`}>
|
||||
<span className="hidden sm:inline">Total number of schemas</span>
|
||||
<span className="sm:hidden">Total</span>
|
||||
</th>
|
||||
<th className={`px-2 sm:px-4 py-2 sm:py-3 text-left text-xs sm:text-sm ${
|
||||
theme === 'dark' ? 'text-gray-300' : 'text-gray-700'
|
||||
}`}>Result</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr className={`border-b ${
|
||||
theme === 'dark' ? 'border-gray-800' : 'border-gray-200'
|
||||
}`}>
|
||||
<td className={`px-2 sm:px-4 py-2 sm:py-3 text-xs sm:text-sm ${
|
||||
theme === 'dark' ? 'text-gray-300' : 'text-gray-700'
|
||||
}`}>0</td>
|
||||
<td className={`px-2 sm:px-4 py-2 sm:py-3 text-xs sm:text-sm ${
|
||||
theme === 'dark' ? 'text-gray-300' : 'text-gray-700'
|
||||
}`}>0</td>
|
||||
<td className={`px-2 sm:px-4 py-2 sm:py-3 text-xs sm:text-sm ${
|
||||
theme === 'dark' ? 'text-gray-300' : 'text-gray-700'
|
||||
}`}>0</td>
|
||||
<td className={`px-2 sm:px-4 py-2 sm:py-3 text-xs sm:text-sm ${
|
||||
theme === 'dark' ? 'text-gray-300' : 'text-gray-700'
|
||||
}`}>0</td>
|
||||
<td className={`px-2 sm:px-4 py-2 sm:py-3 text-xs sm:text-sm ${
|
||||
theme === 'dark' ? 'text-gray-300' : 'text-gray-700'
|
||||
}`}>
|
||||
<span className="hidden sm:inline">Ignored/invalid</span>
|
||||
<span className="sm:hidden">Invalid</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr className={`border-b ${
|
||||
theme === 'dark' ? 'border-gray-800' : 'border-gray-200'
|
||||
}`}>
|
||||
<td className={`px-2 sm:px-4 py-2 sm:py-3 text-xs sm:text-sm ${
|
||||
theme === 'dark' ? 'text-gray-300' : 'text-gray-700'
|
||||
}`}>0</td>
|
||||
<td className={`px-2 sm:px-4 py-2 sm:py-3 text-xs sm:text-sm ${
|
||||
theme === 'dark' ? 'text-gray-300' : 'text-gray-700'
|
||||
}`}>0</td>
|
||||
<td className={`px-2 sm:px-4 py-2 sm:py-3 text-xs sm:text-sm ${
|
||||
theme === 'dark' ? 'text-gray-300' : 'text-gray-700'
|
||||
}`}>1</td>
|
||||
<td className={`px-2 sm:px-4 py-2 sm:py-3 text-xs sm:text-sm ${
|
||||
theme === 'dark' ? 'text-gray-300' : 'text-gray-700'
|
||||
}`}>1</td>
|
||||
<td className={`px-2 sm:px-4 py-2 sm:py-3 text-xs sm:text-sm ${
|
||||
theme === 'dark' ? 'text-gray-300' : 'text-gray-700'
|
||||
}`}>Unwrapped</td>
|
||||
</tr>
|
||||
<tr className={`border-b ${
|
||||
theme === 'dark' ? 'border-gray-800' : 'border-gray-200'
|
||||
}`}>
|
||||
<td className={`px-2 sm:px-4 py-2 sm:py-3 text-xs sm:text-sm ${
|
||||
theme === 'dark' ? 'text-gray-300' : 'text-gray-700'
|
||||
}`}>0</td>
|
||||
<td className={`px-2 sm:px-4 py-2 sm:py-3 text-xs sm:text-sm ${
|
||||
theme === 'dark' ? 'text-gray-300' : 'text-gray-700'
|
||||
}`}>0</td>
|
||||
<td className={`px-2 sm:px-4 py-2 sm:py-3 text-xs sm:text-sm ${
|
||||
theme === 'dark' ? 'text-gray-300' : 'text-gray-700'
|
||||
}`}>2+</td>
|
||||
<td className={`px-2 sm:px-4 py-2 sm:py-3 text-xs sm:text-sm ${
|
||||
theme === 'dark' ? 'text-gray-300' : 'text-gray-700'
|
||||
}`}>2+</td>
|
||||
<td className={`px-2 sm:px-4 py-2 sm:py-3 text-xs sm:text-sm ${
|
||||
theme === 'dark' ? 'text-gray-300' : 'text-gray-700'
|
||||
}`}>
|
||||
<span className="hidden sm:inline">Intersection type</span>
|
||||
<span className="sm:hidden">Intersection</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr className={`border-b ${
|
||||
theme === 'dark' ? 'border-gray-800' : 'border-gray-200'
|
||||
}`}>
|
||||
<td className={`px-2 sm:px-4 py-2 sm:py-3 text-xs sm:text-sm ${
|
||||
theme === 'dark' ? 'text-gray-300' : 'text-gray-700'
|
||||
}`}>1+</td>
|
||||
<td className={`px-2 sm:px-4 py-2 sm:py-3 text-xs sm:text-sm ${
|
||||
theme === 'dark' ? 'text-gray-300' : 'text-gray-700'
|
||||
}`}>any</td>
|
||||
<td className={`px-2 sm:px-4 py-2 sm:py-3 text-xs sm:text-sm ${
|
||||
theme === 'dark' ? 'text-gray-300' : 'text-gray-700'
|
||||
}`}>0</td>
|
||||
<td className={`px-2 sm:px-4 py-2 sm:py-3 text-xs sm:text-sm ${
|
||||
theme === 'dark' ? 'text-gray-300' : 'text-gray-700'
|
||||
}`}>any</td>
|
||||
<td className={`px-2 sm:px-4 py-2 sm:py-3 text-xs sm:text-sm ${
|
||||
theme === 'dark' ? 'text-gray-300' : 'text-gray-700'
|
||||
}`}>
|
||||
<span className="hidden sm:inline">Inline object</span>
|
||||
<span className="sm:hidden">Inline obj</span>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{/* Footer */}
|
||||
<div className={`mt-8 sm:mt-12 pt-4 sm:pt-6 border-t ${
|
||||
theme === 'dark' ? 'border-gray-800' : 'border-gray-200'
|
||||
}`}>
|
||||
<button className={`flex items-center gap-2 text-xs sm:text-sm ${
|
||||
theme === 'dark' ? 'text-gray-400 hover:text-white' : 'text-gray-600 hover:text-gray-900'
|
||||
}`}>
|
||||
<Download className="w-3 h-3 sm:w-4 sm:h-4" />
|
||||
Download PDF
|
||||
</button>
|
||||
</div>
|
||||
</main>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user