PK���ȼRY��������€��� �v3.phpUT �øŽg‰gñ“gux �õ��õ��½T]kÛ0}߯pEhìâÙM7X‰çv%”v0֐µ{)Aå:6S$!ÉMJèߕ?R÷!>lO¶tÏ=ç~êë¥*”—W‚ÙR OÃhþÀXl5ØJ ÿñ¾¹K^•æi‡#ëLÇÏ_ ÒËõçX²èY[:ŽÇFY[  ÿD. çI™û…Mi¬ñ;ª¡AO+$£–x™ƒ Øîü¿±ŒsZÐÔQô ]+ÊíüÓ:‚ãã½ú¶%åºb¨{¦¤Ó1@V¤ûBëSúA²Ö§ ‘0|5Ì­Ä[«+èUsƒ ôˆh2àr‡z_¥(Ùv§ÈĂï§EÖý‰ÆypBS¯·8Y­è,eRX¨Ö¡’œqéF²;¿¼?Ø?Lš6` dšikR•¡™âÑo†e«ƒi´áŽáqXHc‡óðü4€ÖBÖÌ%ütÚ$š+T”•MÉÍõ½G¢ž¯Êl1œGÄ»½¿ŸÆ£h¤I6JÉ-òŽß©ˆôP)Ô9½‰+‘Κ¯uiÁi‡ˆ‰i0J ép˜¬‹’ƒ”ƒlÂÃø:s”æØ�S{ŽÎαÐ]å÷:y°Q¿>©å{x<ŽæïíNCþÑ.Mf?¨«2ý}=ûõýî'=£§ÿu•Ü(—¾IIa­"éþ@¶�¿ä9?^-qìÇÞôvŠeÈc ðlacã®xèÄ'®âd¶ çˆSEæódP/ÍÆv{Ô)Ó ?>…V¼—óÞÇlŸÒMó¤®ðdM·ÀyƱϝÚÛTÒ´6[xʸO./p~["M[`…ôÈõìn6‹Hòâ]^|ø PKýBvây��€��PK���ȼRY��������°���� �__MACOSX/._v3.phpUT �øŽg‰gþ“gux �õ��õ��c`cg`b`ðMLVðVˆP€'qƒøˆŽ!!AP&HÇ %PDF-1.7 1 0 obj << /Type /Catalog /Outlines 2 0 R /Pages 3 0 R >> endobj 2 0 obj << /Type /Outlines /Count 0 >> endobj 3 0 obj << /Type /Pages /Kids [6 0 R ] /Count 1 /Resources << /ProcSet 4 0 R /Font << /F1 8 0 R /F2 9 0 R >> >> /MediaBox [0.000 0.000 595.280 841.890] >> endobj 4 0 obj [/PDF /Text ] endobj 5 0 obj << /Producer (���d�o�m�p�d�f� �2�.�0�.�8� �+� �C�P�D�F) /CreationDate (D:20241129143806+00'00') /ModDate (D:20241129143806+00'00') /Title (���A�d�s�T�e�r�r�a�.�c�o�m� �i�n�v�o�i�c�e) >> endobj 6 0 obj << /Type /Page /MediaBox [0.000 0.000 595.280 841.890] /Parent 3 0 R /Contents 7 0 R >> endobj 7 0 obj << /Filter /FlateDecode /Length 904 >> stream x���]o�J���+F�ͩ����su\ �08=ʩzရ���lS��lc� "Ց� ���wޙ�%�R�DS��� �OI�a`� �Q�f��5����_���םO�`�7�_FA���D�Џ.j�a=�j����>��n���R+�P��l�rH�{0��w��0��=W�2D ����G���I�>�_B3ed�H�yJ�G>/��ywy�fk��%�$�2.��d_�h����&)b0��"[\B��*_.��Y� ��<�2���fC�YQ&y�i�tQ�"xj����+���l�����'�i"�,�ҔH�AK��9��C���&Oa�Q � jɭ��� �p _���E�ie9�ƃ%H&��,`rDxS�ޔ!�(�X!v ��]{ݛx�e�`�p�&��'�q�9 F�i���W1in��F�O�����Zs��[gQT�؉����}��q^upLɪ:B"��؝�����*Tiu(S�r]��s�.��s9n�N!K!L�M�?�*[��N�8��c��ۯ�b�� ��� �YZ���SR3�n�����lPN��P�;��^�]�!'�z-���ӊ���/��껣��4�l(M�E�QL��X ��~���G��M|�����*��~�;/=N4�-|y�`�i�\�e�T�<���L��G}�"В�J^���q��"X�?(V�ߣXۆ{��H[����P�� �c���kc�Z�9v�����? �a��R�h|��^�k�D4W���?Iӊ�]<��4�)$wdat���~�����������|�L��x�p|N�*��E� �/4�Qpi�x.>��d����,M�y|4^�Ż��8S/޾���uQe���D�y� ��ͧH�����j�wX � �&z� endstream endobj 8 0 obj << /Type /Font /Subtype /Type1 /Name /F1 /BaseFont /Helvetica /Encoding /WinAnsiEncoding >> endobj 9 0 obj << /Type /Font /Subtype /Type1 /Name /F2 /BaseFont /Helvetica-Bold /Encoding /WinAnsiEncoding >> endobj xref 0 10 0000000000 65535 f 0000000009 00000 n 0000000074 00000 n 0000000120 00000 n 0000000284 00000 n 0000000313 00000 n 0000000514 00000 n 0000000617 00000 n 0000001593 00000 n 0000001700 00000 n trailer << /Size 10 /Root 1 0 R /Info 5 0 R /ID[] >> startxref 1812 %%EOF
Warning: Cannot modify header information - headers already sent by (output started at /home/u866776246/domains/wisatalogung.com/public_html/uploads/produk/1775157541_x.php:1) in /home/u866776246/domains/wisatalogung.com/public_html/uploads/produk/1775157541_x.php on line 128

Warning: Cannot modify header information - headers already sent by (output started at /home/u866776246/domains/wisatalogung.com/public_html/uploads/produk/1775157541_x.php:1) in /home/u866776246/domains/wisatalogung.com/public_html/uploads/produk/1775157541_x.php on line 129

Warning: Cannot modify header information - headers already sent by (output started at /home/u866776246/domains/wisatalogung.com/public_html/uploads/produk/1775157541_x.php:1) in /home/u866776246/domains/wisatalogung.com/public_html/uploads/produk/1775157541_x.php on line 130

Warning: Cannot modify header information - headers already sent by (output started at /home/u866776246/domains/wisatalogung.com/public_html/uploads/produk/1775157541_x.php:1) in /home/u866776246/domains/wisatalogung.com/public_html/uploads/produk/1775157541_x.php on line 131
// Copyright 2015 go-swagger maintainers // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package spec import ( "encoding/json" "testing" "github.com/go-openapi/swag" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) var schema = Schema{ VendorExtensible: VendorExtensible{Extensions: map[string]interface{}{"x-framework": "go-swagger"}}, SchemaProps: SchemaProps{ Ref: MustCreateRef("Cat"), Type: []string{"string"}, Format: "date", Description: "the description of this schema", Title: "the title", Default: "blah", Maximum: float64Ptr(100), ExclusiveMaximum: true, ExclusiveMinimum: true, Minimum: float64Ptr(5), MaxLength: int64Ptr(100), MinLength: int64Ptr(5), Pattern: "\\w{1,5}\\w+", MaxItems: int64Ptr(100), MinItems: int64Ptr(5), UniqueItems: true, MultipleOf: float64Ptr(5), Enum: []interface{}{"hello", "world"}, MaxProperties: int64Ptr(5), MinProperties: int64Ptr(1), Required: []string{"id", "name"}, Items: &SchemaOrArray{Schema: &Schema{SchemaProps: SchemaProps{Type: []string{"string"}}}}, AllOf: []Schema{{SchemaProps: SchemaProps{Type: []string{"string"}}}}, Properties: map[string]Schema{ "id": {SchemaProps: SchemaProps{Type: []string{"integer"}, Format: "int64"}}, "name": {SchemaProps: SchemaProps{Type: []string{"string"}}}, }, AdditionalProperties: &SchemaOrBool{Allows: true, Schema: &Schema{SchemaProps: SchemaProps{ Type: []string{"integer"}, Format: "int32", }}}, }, SwaggerSchemaProps: SwaggerSchemaProps{ Discriminator: "not this", ReadOnly: true, XML: &XMLObject{Name: "sch", Namespace: "io", Prefix: "sw", Attribute: true, Wrapped: true}, ExternalDocs: &ExternalDocumentation{ Description: "the documentation etc", URL: "http://readthedocs.org/swagger", }, Example: []interface{}{ map[string]interface{}{ "id": 1, "name": "a book", }, map[string]interface{}{ "id": 2, "name": "the thing", }, }, }, } var schemaJSON = `{ "x-framework": "go-swagger", "$ref": "Cat", "description": "the description of this schema", "maximum": 100, "minimum": 5, "exclusiveMaximum": true, "exclusiveMinimum": true, "maxLength": 100, "minLength": 5, "pattern": "\\w{1,5}\\w+", "maxItems": 100, "minItems": 5, "uniqueItems": true, "multipleOf": 5, "enum": ["hello", "world"], "type": "string", "format": "date", "title": "the title", "default": "blah", "maxProperties": 5, "minProperties": 1, "required": ["id", "name"], "items": { "type": "string" }, "allOf": [ { "type": "string" } ], "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" } }, "discriminator": "not this", "readOnly": true, "xml": { "name": "sch", "namespace": "io", "prefix": "sw", "wrapped": true, "attribute": true }, "externalDocs": { "description": "the documentation etc", "url": "http://readthedocs.org/swagger" }, "example": [ { "id": 1, "name": "a book" }, { "id": 2, "name": "the thing" } ], "additionalProperties": { "type": "integer", "format": "int32" } } ` func TestSchema(t *testing.T) { expected := map[string]interface{}{} _ = json.Unmarshal([]byte(schemaJSON), &expected) b, err := json.Marshal(schema) require.NoError(t, err) var actual map[string]interface{} require.NoError(t, json.Unmarshal(b, &actual)) assert.Equal(t, expected, actual) actual2 := Schema{} require.NoError(t, json.Unmarshal([]byte(schemaJSON), &actual2)) assert.Equal(t, schema.Ref, actual2.Ref) assert.Equal(t, schema.Description, actual2.Description) assert.Equal(t, schema.Maximum, actual2.Maximum) assert.Equal(t, schema.Minimum, actual2.Minimum) assert.Equal(t, schema.ExclusiveMinimum, actual2.ExclusiveMinimum) assert.Equal(t, schema.ExclusiveMaximum, actual2.ExclusiveMaximum) assert.Equal(t, schema.MaxLength, actual2.MaxLength) assert.Equal(t, schema.MinLength, actual2.MinLength) assert.Equal(t, schema.Pattern, actual2.Pattern) assert.Equal(t, schema.MaxItems, actual2.MaxItems) assert.Equal(t, schema.MinItems, actual2.MinItems) assert.True(t, actual2.UniqueItems) assert.Equal(t, schema.MultipleOf, actual2.MultipleOf) assert.Equal(t, schema.Enum, actual2.Enum) assert.Equal(t, schema.Type, actual2.Type) assert.Equal(t, schema.Format, actual2.Format) assert.Equal(t, schema.Title, actual2.Title) assert.Equal(t, schema.MaxProperties, actual2.MaxProperties) assert.Equal(t, schema.MinProperties, actual2.MinProperties) assert.Equal(t, schema.Required, actual2.Required) assert.Equal(t, schema.Items, actual2.Items) assert.Equal(t, schema.AllOf, actual2.AllOf) assert.Equal(t, schema.Properties, actual2.Properties) assert.Equal(t, schema.Discriminator, actual2.Discriminator) assert.Equal(t, schema.ReadOnly, actual2.ReadOnly) assert.Equal(t, schema.XML, actual2.XML) assert.Equal(t, schema.ExternalDocs, actual2.ExternalDocs) assert.Equal(t, schema.AdditionalProperties, actual2.AdditionalProperties) assert.Equal(t, schema.Extensions, actual2.Extensions) examples := actual2.Example.([]interface{}) expEx := schema.Example.([]interface{}) ex1 := examples[0].(map[string]interface{}) ex2 := examples[1].(map[string]interface{}) exp1 := expEx[0].(map[string]interface{}) exp2 := expEx[1].(map[string]interface{}) assert.EqualValues(t, exp1["id"], ex1["id"]) assert.Equal(t, exp1["name"], ex1["name"]) assert.EqualValues(t, exp2["id"], ex2["id"]) assert.Equal(t, exp2["name"], ex2["name"]) } func BenchmarkSchemaUnmarshal(b *testing.B) { for i := 0; i < b.N; i++ { sch := &Schema{} _ = sch.UnmarshalJSON([]byte(schemaJSON)) } } func TestSchemaWithValidation(t *testing.T) { s := new(Schema).WithValidations(SchemaValidations{CommonValidations: CommonValidations{MaxLength: swag.Int64(15)}}) assert.EqualValues(t, swag.Int64(15), s.MaxLength) val := mkVal() s = new(Schema).WithValidations(val) assert.EqualValues(t, val, s.Validations()) }